]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
get rid of SUB_Null
authorRudolf Polzer <divverent@xonotic.org>
Wed, 19 Dec 2012 15:46:49 +0000 (16:46 +0100)
committerRudolf Polzer <divverent@xonotic.org>
Wed, 19 Dec 2012 15:46:49 +0000 (16:46 +0100)
42 files changed:
qcsrc/client/projectile.qc
qcsrc/menu/item/button.c
qcsrc/menu/menu.qc
qcsrc/menu/menu.qh
qcsrc/menu/xonotic/inputbox.c
qcsrc/server/attic/monsters/m_monsters.qc
qcsrc/server/attic/monsters/monster_zombie.qc
qcsrc/server/attic/nexball.qc
qcsrc/server/attic/vehicles/bumblebee.qc
qcsrc/server/cl_client.qc
qcsrc/server/func_breakable.qc
qcsrc/server/g_hook.qc
qcsrc/server/g_lights.qc
qcsrc/server/g_subs.qc
qcsrc/server/g_triggers.qc
qcsrc/server/mutators/gamemode_keepaway.qc
qcsrc/server/mutators/gamemode_nexball.qc
qcsrc/server/mutators/gamemode_onslaught.qc
qcsrc/server/portals.qc
qcsrc/server/runematch.qc
qcsrc/server/secret.qc
qcsrc/server/t_items.qc
qcsrc/server/t_jumppads.qc
qcsrc/server/t_plats.qc
qcsrc/server/tturrets/system/system_damage.qc
qcsrc/server/tturrets/system/system_main.qc
qcsrc/server/vehicles/bumblebee.qc
qcsrc/server/vehicles/racer.qc
qcsrc/server/vehicles/raptor.qc
qcsrc/server/vehicles/spiderbot.qc
qcsrc/server/vehicles/vehicles.qc
qcsrc/server/w_common.qc
qcsrc/server/w_electro.qc
qcsrc/server/w_fireball.qc
qcsrc/server/w_grenadelauncher.qc
qcsrc/server/w_hagar.qc
qcsrc/server/w_hlac.qc
qcsrc/server/w_hook.qc
qcsrc/server/w_laser.qc
qcsrc/server/w_minelayer.qc
qcsrc/server/w_rocketlauncher.qc
qcsrc/server/w_seeker.qc

index 4081bd8d1800c147a4867d2a6b6321bb11ed5e39..bdf633468df3bb34fb0c0da2225bc5155e0eeb0f 100644 (file)
@@ -4,10 +4,6 @@
 .float trail_oldtime;
 .float fade_time, fade_rate;
 
-void SUB_Null()
-{
-}
-
 void SUB_Stop()
 {
        self.move_velocity = self.move_avelocity = '0 0 0';
@@ -327,7 +323,7 @@ void Ent_Projectile()
                                self.mins = '0 0 -4';
                                self.maxs = '0 0 -4';
                                self.move_movetype = MOVETYPE_BOUNCE;
-                               self.move_touch = SUB_Null;
+                               self.move_touch = func_null;
                                self.move_bounce_factor = g_balance_electro_secondary_bouncefactor;
                                self.move_bounce_stopspeed = g_balance_electro_secondary_bouncestop;
                                break;
@@ -344,7 +340,7 @@ void Ent_Projectile()
                                self.mins = '-3 -3 -3';
                                self.maxs = '3 3 3';
                                self.move_movetype = MOVETYPE_BOUNCE;
-                               self.move_touch = SUB_Null;
+                               self.move_touch = func_null;
                                self.move_bounce_factor = g_balance_grenadelauncher_bouncefactor;
                                self.move_bounce_stopspeed = g_balance_grenadelauncher_bouncestop;
                                break;
@@ -356,21 +352,21 @@ void Ent_Projectile()
                                self.colormod = '2 1 1';
                                self.alphamod = 0.5;
                                self.move_movetype = MOVETYPE_BOUNCE;
-                               self.move_touch = SUB_Null;
+                               self.move_touch = func_null;
                                break;
                        case PROJECTILE_PORTO_BLUE:
                                self.colormod = '1 1 2';
                                self.alphamod = 0.5;
                                self.move_movetype = MOVETYPE_BOUNCE;
-                               self.move_touch = SUB_Null;
+                               self.move_touch = func_null;
                                break;
                        case PROJECTILE_HAGAR_BOUNCING:
                                self.move_movetype = MOVETYPE_BOUNCE;
-                               self.move_touch = SUB_Null;
+                               self.move_touch = func_null;
                                break;
                        case PROJECTILE_CRYLINK_BOUNCING:
                                self.move_movetype = MOVETYPE_BOUNCE;
-                               self.move_touch = SUB_Null;
+                               self.move_touch = func_null;
                                break;
                        case PROJECTILE_FIREBALL:
                                loopsound(self, CH_SHOTS_SINGLE, "weapons/fireball_fly2.wav", VOL_BASE, ATTN_NORM);
@@ -380,7 +376,7 @@ void Ent_Projectile()
                        case PROJECTILE_FIREMINE:
                                loopsound(self, CH_SHOTS_SINGLE, "weapons/fireball_fly.wav", VOL_BASE, ATTN_NORM);
                                self.move_movetype = MOVETYPE_BOUNCE;
-                               self.move_touch = SUB_Null;
+                               self.move_touch = func_null;
                                self.mins = '-4 -4 -4';
                                self.maxs = '4 4 4';
                                break;
@@ -420,7 +416,7 @@ void Ent_Projectile()
                                self.mins = '0 0 -4';
                                self.maxs = '0 0 -4';
                                self.move_movetype = MOVETYPE_BOUNCE;
-                               self.move_touch = SUB_Null;
+                               self.move_touch = func_null;
                                self.move_bounce_factor = g_balance_electro_secondary_bouncefactor;
                                self.move_bounce_stopspeed = g_balance_electro_secondary_bouncestop;
                                break;
index 20bc4ab9c911459c109cb7ebf57001b108a00a46..6b32bae27080d279c760923b4ddd613868469079 100644 (file)
@@ -9,7 +9,7 @@ CLASS(Button) EXTENDS(Label)
        METHOD(Button, mouseDrag, float(entity, vector))
        METHOD(Button, mouseRelease, float(entity, vector))
        METHOD(Button, focusEnter, void(entity))
-       ATTRIB(Button, onClick, void(entity, entity), SUB_Null)
+       ATTRIB(Button, onClick, void(entity, entity), func_null)
        ATTRIB(Button, onClickEntity, entity, NULL)
        ATTRIB(Button, src, string, string_null)
        ATTRIB(Button, srcSuffix, string, string_null)
@@ -81,7 +81,8 @@ float Button_mouseRelease(entity me, vector pos)
                {
                        if(cvar("menu_sounds"))
                                localsound("sound/misc/menu2.wav");
-                       me.onClick(me, me.onClickEntity);
+                       if(me.onClick)
+                               me.onClick(me, me.onClickEntity);
                }
                me.pressed = 0;
        }
@@ -162,7 +163,8 @@ void Button_draw(entity me)
        {
                // keyboard click timer expired? Fire the event then.
                if not(me.disabled)
-                       me.onClick(me, me.onClickEntity);
+                       if(me.onClick)
+                               me.onClick(me, me.onClickEntity);
        }
        me.clickTime -= frametime;
 
index 827f3e7560a8d349952f0ae0441d142d27bac0b7..ddf9ff686adc7b4413086cab0093d08fc6aa0a7a 100644 (file)
@@ -16,8 +16,6 @@ float menuInitialized;
 float menuNotTheFirstFrame;
 float menuMouseMode;
 
-void SUB_Null() { }
-
 void m_sync()
 {
        updateCompression();
index 641ddf7d19df20db49ad73d707a74197cf427ad5..b6c0795a8544424d505b8392d8d7f4f7cec59825 100644 (file)
@@ -33,8 +33,6 @@ entity keyGrabber;
 
 float conwidth, conheight; // "virtual" conwidth/height values for other stuff to assume for scaling
 
-void SUB_Null();
-
 float preMenuInit(); // you have to define this for pre-menu initialization. Return 0 if initialization needs to be retried a frame later, 1 if it succeeded.
 void preMenuDraw(); // this is run before the menu is drawn. You may put some stuff there that has to be done every frame.
 void postMenuDraw(); // this is run just after the menu is drawn (or not). Useful to draw something over everything else.
index 2a9c094b8eb07a74ac6752562b3eecfb87cd200a..dbbcc7b0c495af9609cae5dfac612b2ef4da9f74 100644 (file)
@@ -5,9 +5,9 @@ CLASS(XonoticInputBox) EXTENDS(InputBox)
        METHOD(XonoticInputBox, setText, void(entity, string))
        ATTRIB(XonoticInputBox, fontSize, float, SKINFONTSIZE_NORMAL)
        ATTRIB(XonoticInputBox, image, string, SKINGFX_INPUTBOX)
-       ATTRIB(XonoticInputBox, onChange, void(entity, entity), SUB_Null)
+       ATTRIB(XonoticInputBox, onChange, void(entity, entity), func_null)
        ATTRIB(XonoticInputBox, onChangeEntity, entity, NULL)
-       ATTRIB(XonoticInputBox, onEnter, void(entity, entity), SUB_Null)
+       ATTRIB(XonoticInputBox, onEnter, void(entity, entity), func_null)
        ATTRIB(XonoticInputBox, onEnterEntity, entity, NULL)
        ATTRIB(XonoticInputBox, marginLeft, float, SKINMARGIN_INPUTBOX_CHARS)
        ATTRIB(XonoticInputBox, marginRight, float, SKINMARGIN_INPUTBOX_CHARS)
@@ -55,7 +55,8 @@ void XonoticInputBox_setText(entity me, string new)
        if(me.text != new)
        {
                SUPER(XonoticInputBox).setText(me, new);
-               me.onChange(me, me.onChangeEntity);
+               if(me.onChange)
+                       me.onChange(me, me.onChangeEntity);
                if(me.saveImmediately)
                        me.saveCvars(me);
        }
@@ -85,7 +86,8 @@ float XonoticInputBox_keyDown(entity me, float key, float ascii, float shift)
                        me.saveCvars(me);
                        r = 1;
                }
-               me.onEnter(me, me.onEnterEntity);
+               if(me.onEnter)
+                       me.onEnter(me, me.onEnterEntity);
        }
        if(SUPER(XonoticInputBox).keyDown(me, key, ascii, shift))
                r = 1;
index b450f761e31af442b2c084763e97fd44ae5faf84..0259a5756ea1620c4ab21be3a9f5df3c2dc920c3 100644 (file)
@@ -166,7 +166,7 @@ void() monsterinwall =
        setmodel (e, "models/ebomb.mdl");
        e.movetype = MOVETYPE_NONE;
        e.solid = SOLID_NOT;
-       e.think = SUB_Null;
+       e.think = func_null;
        e.nextthink = -1;
        e.scale = 16;
 }
index c95c2eaf2f819513fee854a5eaaf73ccf9ea426d..eb1105b933f7cec36e83cdd69074dc1dc12bff98 100644 (file)
@@ -170,7 +170,7 @@ void zombie_die(vector dir)
     setmodel(self,"");
     self.solid          = SOLID_NOT;
     self.takedamage     = DAMAGE_NO;
-    self.event_damage   = SUB_Null;
+    self.event_damage   = func_null;
     self.enemy          = world;
     self.think          = zombie_spawn;
     self.nextthink      = time + autocvar_g_monster_zombie_respawntime;
index d3f4b55f4a49acf42693df6e04df24942a1b99f3..a0e4dc097d8585cfc1e88e9f7ffebc0eb9800471 100644 (file)
@@ -165,7 +165,7 @@ void GiveBall (entity plyr, entity ball)
 
        ball.velocity = '0 0 0';
        ball.movetype = MOVETYPE_NONE;
-       ball.touch = SUB_Null;
+       ball.touch = func_null;
        ball.effects |= EF_NOSHADOW;
        ball.scale = 1; // scale down.
 
@@ -235,7 +235,7 @@ void ResetBall (void)
        if (self.cnt < 2) { // step 1
                if (time == self.teamtime)
                        bprint("The ", ColoredTeamName(self.team), " held the ball for too long.\n");
-               self.touch = SUB_Null;
+               self.touch = func_null;
                self.movetype = MOVETYPE_NOCLIP;
                self.velocity = '0 0 0'; // just in case?
                if(!self.cnt)
@@ -394,7 +394,7 @@ void GoalTouch (void)
        ball.cnt = 1;
        ball.think = ResetBall;
        if (ball.classname == "nexball_basketball")
-               ball.touch = football_touch; // better than SUB_Null: football control until the ball gets reset
+               ball.touch = football_touch; // better than func_null: football control until the ball gets reset
        ball.nextthink = time + autocvar_g_nexball_delay_goal * (self.team != GOAL_OUT);
 }
 
index f7845637121c90e6cb2f58c80f314391d8990e5d..067b174369ea3cd8f1b0b22c6d83ded256f880ca 100644 (file)
@@ -261,7 +261,7 @@ void bumb_spawn()
 void bumb_die()
 {
     self.health       = 0;
-    self.event_damage = SUB_Null;
+    self.event_damage = func_null;
     self.solid        = SOLID_CORPSE;
     self.takedamage   = DAMAGE_NO;
     self.deadflag     = DEAD_DYING;
index 4c11f9469d648b8de20b74b5d172c8a8815bf478..627cf6c6ba5cddb3fda6d67aa6d1d689be564e4e 100644 (file)
@@ -471,7 +471,7 @@ void PutObserverInServer (void)
        self.superweapons_finished = 0;
        self.pushltime = 0;
        self.istypefrag = 0;
-       self.think = SUB_Null;
+       self.think = func_null;
        self.nextthink = 0;
        self.hook_time = 0;
        self.runes = 0;
@@ -787,7 +787,7 @@ void PutClientInServer (void)
                self.invincible_finished = 0;
                self.pushltime = 0;
                // players have no think function
-               self.think = SUB_Null;
+               self.think = func_null;
                self.nextthink = 0;
                self.hook_time = 0;
                self.dmg_team = 0;
index 4d29b014faff68c9528bb954d3d51512e88b6d3e..9560133bd08b6f3d0e3180b073108eaa66715f53 100644 (file)
@@ -115,7 +115,7 @@ void func_breakable_behave_destroyed()
        self.health = self.max_health;
        self.takedamage = DAMAGE_NO;
        self.bot_attack = FALSE;
-       self.event_damage = SUB_Null;
+       self.event_damage = func_null;
        self.state = 1;
        func_breakable_colormod();
 }
index 8867d0725b0f7c3a6cea40d022c5e133a01291dc..f7af47d924036f121a6b8340a8dc2df5a0edaee4 100644 (file)
@@ -79,7 +79,7 @@ void GrapplingHook_Stop()
        self.state = 1;
        self.think = GrapplingHookThink;
        self.nextthink = time;
-       self.touch = SUB_Null;
+       self.touch = func_null;
        self.velocity = '0 0 0';
        self.movetype = MOVETYPE_NONE;
        self.hook_length = -1;
index b5f4bcf8441b0f382dd10813e60c1517c80107be..854b7fef24f7466c86a373ec784ed69fea9cc420 100644 (file)
@@ -96,7 +96,7 @@ void spawnfunc_dynlight()
        setorigin (self, self.origin);
        //self.pflags = PFLAGS_FULLDYNAMIC;
        self.solid = SOLID_NOT;
-       //self.blocked = SUB_Null;
+       //self.blocked = func_null;
        //if (self.spawnflags & DNOSHADOW)
        //      self.pflags = self.pflags + PFLAGS_NOSHADOW;
        //if (self.spawnflags & START_OFF)
index b07cae2714e19770ca08d721d26fd0cec4885575..6c43c985f38b869a22c7e6f33bde7c847685ad60 100644 (file)
@@ -1,4 +1,3 @@
-void SUB_Null() {}
 float SUB_True() { return 1; }
 float SUB_False() { return 0; }
 
@@ -280,7 +279,7 @@ void SUB_CalcMove_Bezier (vector tcontrol, vector tdest, float tspeed, void() fu
        controller.think1 = self.think;
 
        // the thinking is now done by the controller
-       self.think = SUB_Null;
+       self.think = func_null;
        self.nextthink = self.ltime + traveltime;
        
        // invoke controller
index 20ddc655170cfbc483ff0b41fe22ccec1e2c2284..10a78fb99dfe0230943211b4f259c47f7a7f2185 100644 (file)
@@ -192,7 +192,7 @@ void multi_trigger()
        else
        {       // we can't just remove (self) here, because this is a touch function
                // called wheil C code is looping through area links...
-               self.touch = SUB_Null;
+               self.touch = func_null;
        }
 }
 
@@ -254,7 +254,7 @@ void multi_reset()
                self.takedamage = DAMAGE_YES;
                self.solid = SOLID_BBOX;
        }
-       self.think = SUB_Null;
+       self.think = func_null;
        self.team = self.team_saved;
 }
 
@@ -359,7 +359,7 @@ void delay_use()
 
 void delay_reset()
 {
-       self.think = SUB_Null;
+       self.think = func_null;
 }
 
 void spawnfunc_trigger_delay()
index 07c96671c67e28b0eddc529b6e83bb58aa79d369..9f8647d9dfa5cab3a61a1a37735360bcaf4602ec 100644 (file)
@@ -89,7 +89,7 @@ void ka_TouchEvent() // runs any time that the ball comes in contact with someth
        self.velocity = '0 0 0';
        self.movetype = MOVETYPE_NONE;
        self.effects |= EF_NODRAW;
-       self.touch = SUB_Null;
+       self.touch = func_null;
        self.think = ka_TimeScoring;
        self.nextthink = time + autocvar_g_keepaway_score_timeinterval;
        self.takedamage = DAMAGE_NO;
index 808d1a29b35229d56931b9645642a524d95e833b..f328162ff3f00a83b784646500613ffacd9ddd53 100644 (file)
@@ -124,7 +124,7 @@ void GiveBall(entity plyr, entity ball)
 
        ball.velocity = '0 0 0';
        ball.movetype = MOVETYPE_NONE;
-       ball.touch = SUB_Null;
+       ball.touch = func_null;
        ball.effects |= EF_NOSHADOW;
        ball.scale = 1; // scale down.
 
@@ -205,7 +205,7 @@ void ResetBall(void)
        {
                if(time == self.teamtime)
                        bprint("The ", ColoredTeamName(self.team), " held the ball for too long.\n");
-               self.touch = SUB_Null;
+               self.touch = func_null;
                self.movetype = MOVETYPE_NOCLIP;
                self.velocity = '0 0 0'; // just in case?
                if(!self.cnt)
@@ -387,7 +387,7 @@ void GoalTouch(void)
        ball.cnt = 1;
        ball.think = ResetBall;
        if(ball.classname == "nexball_basketball")
-               ball.touch = football_touch; // better than SUB_Null: football control until the ball gets reset
+               ball.touch = football_touch; // better than func_null: football control until the ball gets reset
        ball.nextthink = time + autocvar_g_nexball_delay_goal * (self.team != GOAL_OUT);
 }
 
@@ -668,7 +668,7 @@ void W_Nexball_Touch(void)
 {
        entity ball, attacker;
        attacker = self.owner;
-       //self.think = SUB_Null;
+       //self.think = func_null;
        //self.enemy = world;
        
        PROJECTILE_TOUCH;
index 6508163764cec58af87dc6cac09a97b1f8b6c67d..8137cc3047d35ed2822d17a9841415e83c991ff5 100644 (file)
@@ -630,7 +630,7 @@ void onslaught_generator_damage(entity inflictor, entity attacker, float damage,
                self.islinked = FALSE;
                self.isshielded = FALSE;
                self.takedamage = DAMAGE_NO; // can't be hurt anymore
-               self.event_damage = SUB_Null; // won't do anything if hurt
+               self.event_damage = func_null; // won't do anything if hurt
                self.count = 0; // reset counter
                self.think = onslaught_generator_deaththink; // explosion sequence
                self.nextthink = time; // start exploding immediately
@@ -1315,8 +1315,8 @@ void onslaught_controlpoint_reset()
        self.isshielded = TRUE;
        self.enemy.solid = SOLID_NOT;
        self.enemy.colormap = self.colormap;
-       self.think = self.enemy.think = SUB_Null;
-       self.nextthink = 0; // don't like SUB_Null :P
+       self.think = self.enemy.think = func_null;
+       self.nextthink = 0; // don't like func_null :P
        setmodel(self, "models/onslaught/controlpoint_pad.md3");
        //setsize(self, '-32 -32 0', '32 32 8');
 
index 75dae14bf5f28d666e9beb91e820e912389a1a54..3e83c972eece82f015fafae1804b1e6db6a0ddda 100644 (file)
@@ -309,8 +309,8 @@ void Portal_MakeBrokenPortal(entity portal)
 {
        portal.skin = 2;
        portal.solid = SOLID_NOT;
-       portal.touch = SUB_Null;
-       portal.think = SUB_Null;
+       portal.touch = func_null;
+       portal.think = func_null;
        portal.effects = 0;
        portal.nextthink = 0;
        portal.takedamage = DAMAGE_NO;
@@ -320,8 +320,8 @@ void Portal_MakeWaitingPortal(entity portal)
 {
        portal.skin = 2;
        portal.solid = SOLID_NOT;
-       portal.touch = SUB_Null;
-       portal.think = SUB_Null;
+       portal.touch = func_null;
+       portal.think = func_null;
        portal.effects = EF_ADDITIVE;
        portal.nextthink = 0;
        portal.takedamage = DAMAGE_YES;
@@ -342,8 +342,8 @@ void Portal_MakeOutPortal(entity portal)
 {
        portal.skin = 1;
        portal.solid = SOLID_NOT;
-       portal.touch = SUB_Null;
-       portal.think = SUB_Null;
+       portal.touch = func_null;
+       portal.think = func_null;
        portal.effects = EF_STARDUST | EF_BLUE;
        portal.nextthink = 0;
        portal.takedamage = DAMAGE_YES;
index 7116c33874d8cb7437c0bf01584ca7228a48d06b..952bb342e99ee408ddcf53233a1692dd488a85b7 100644 (file)
@@ -219,11 +219,11 @@ void rune_touch()
 
        other.runes = other.runes | self.runes | self.enemy.runes;
 
-       //self.think = SUB_Null;
+       //self.think = func_null;
        //self.nextthink = 0;
        self.think = RuneCarriedThink;
        self.nextthink = time;
-       self.touch = SUB_Null;
+       self.touch = func_null;
 
        self.solid = SOLID_NOT;
        setorigin(self, self.origin);
index 2694cb3d6f536ac506b49b4b05f0b07ee9a75389..54d60a14b6ee5b20ad5b3ed5549896d6aae6029a 100644 (file)
@@ -71,6 +71,6 @@ void spawnfunc_trigger_secret() {
        // take over the touch() function, so we can mark secret as found
        self.touch = trigger_secret_touch;
        // ignore triggering;
-       self.use = SUB_Null;
+       self.use = func_null;
 }
 
index b56dfec47d56a79f158cbad1d4e2c74a026467cd..33b53385be0e3adc547a2e808a18f5958e65001d 100644 (file)
@@ -834,7 +834,7 @@ void Item_Reset()
 
        if(self.classname != "droppedweapon")
        {
-               self.think = SUB_Null;
+               self.think = func_null;
                self.nextthink = 0;
 
                if(self.waypointsprite_attached)
index 8923c19f18300e1f742acd0586e61539744c3c15..8d21766a950712365daa0a315ecdce6566da91b9 100644 (file)
@@ -246,7 +246,7 @@ void trigger_push_touch()
 
        if (self.spawnflags & PUSH_ONCE)
        {
-               self.touch = SUB_Null;
+               self.touch = func_null;
                self.think = SUB_Remove;
                self.nextthink = time;
        }
index 8c2766295e7ca3cad676c15247e82c9581404a11..d7a3b29ce24e40ea9dfc68ca564b8488f9c6d619 100644 (file)
@@ -158,7 +158,7 @@ void plat_crush()
 
 void plat_use()
 {
-       self.use = SUB_Null;
+       self.use = func_null;
        if (self.state != 4)
                objerror ("plat_use: not in up state");
        plat_go_down();
@@ -414,7 +414,7 @@ void spawnfunc_func_rotating()
 
        // wait for targets to spawn
        self.nextthink = self.ltime + 999999999;
-       self.think = SUB_Null;
+       self.think = func_null;
 
        // TODO make a reset function for this one
 }
@@ -495,7 +495,7 @@ void spawnfunc_func_bobbing()
        controller.nextthink = time + 1;
        controller.think = func_bobbing_controller_think;
        self.nextthink = self.ltime + 999999999;
-       self.think = SUB_Null;
+       self.think = func_null;
 
        // Savage: Reduce bandwith, critical on e.g. nexdm02
        self.effects |= EF_LOWPRECISION;
@@ -572,7 +572,7 @@ void spawnfunc_func_pendulum()
        controller.nextthink = time + 1;
        controller.think = func_pendulum_controller_think;
        self.nextthink = self.ltime + 999999999;
-       self.think = SUB_Null;
+       self.think = func_null;
 
        //self.effects |= EF_LOWPRECISION;
 
@@ -1388,7 +1388,7 @@ void door_reset()
        setorigin(self, self.pos1);
        self.velocity = '0 0 0';
        self.state = STATE_BOTTOM;
-       self.think = SUB_Null;
+       self.think = func_null;
 }
 
 // spawnflags require key (for now only func_door)
@@ -1500,7 +1500,7 @@ void door_rotating_reset()
        self.angles = self.pos1;
        self.avelocity = '0 0 0';
        self.state = STATE_BOTTOM;
-       self.think = SUB_Null;
+       self.think = func_null;
 }
 
 void door_rotating_init_startopen()
@@ -1769,7 +1769,7 @@ void secret_reset()
                self.takedamage = DAMAGE_YES;
        }
        setorigin(self, self.oldorigin);
-       self.think = SUB_Null;
+       self.think = func_null;
 }
 
 /*QUAKED spawnfunc_func_door_secret (0 .5 .8) ? open_once 1st_left 1st_down no_shoot always_shoot
@@ -1909,7 +1909,7 @@ void spawnfunc_func_fourier()
        controller.nextthink = time + 1;
        controller.think = func_fourier_controller_think;
        self.nextthink = self.ltime + 999999999;
-       self.think = SUB_Null;
+       self.think = func_null;
 
        // Savage: Reduce bandwith, critical on e.g. nexdm02
        self.effects |= EF_LOWPRECISION;
@@ -2065,7 +2065,7 @@ void spawnfunc_func_vectormamamam()
 
        // wait for targets to spawn
        self.nextthink = self.ltime + 999999999;
-       self.think = SUB_Null;
+       self.think = func_null;
 
        // Savage: Reduce bandwith, critical on e.g. nexdm02
        self.effects |= EF_LOWPRECISION;
index 48f76219bd40a6417432422749ab5800f57a1c0f..971d65cca3916eea9f99a17d28b5d41ee096211f 100644 (file)
@@ -18,7 +18,7 @@ void turret_stdproc_die()
     self.solid              = SOLID_NOT;
     self.tur_head.solid     = self.solid;
 
-    self.event_damage           = SUB_Null;
+    self.event_damage           = func_null;
     self.takedamage             = DAMAGE_NO;
 
     self.health             = 0;
@@ -120,8 +120,8 @@ void turret_stdproc_damage (entity inflictor, entity attacker, float damage, flo
     
     if (self.health <= 0)
     {
-        self.event_damage           = SUB_Null;
-        self.tur_head.event_damage  = SUB_Null;
+        self.event_damage           = func_null;
+        self.tur_head.event_damage  = func_null;
         self.takedamage             = DAMAGE_NO;
         self.nextthink = time;
         self.think = turret_stdproc_die;
index 891941c9304d49d1bd047ffeab692db22062778a..dd58b3cee2860e0c031dc131a47eab165c846967 100644 (file)
@@ -145,7 +145,7 @@ void turret_projectile_explode()
 {
     
     self.takedamage = DAMAGE_NO;
-    self.event_damage = SUB_Null;    
+    self.event_damage = func_null;    
 #ifdef TURRET_DEBUG
     float d;
     d = RadiusDamage (self, self.owner, self.owner.shot_dmg, 0, self.owner.shot_radius, self, self.owner.shot_force, self.totalfrags, world);
index 4b0f1d13a4b5b8976eda70b150523fccebd86724..b9c7dbfb8339e406603dbbea763f63c28ea81c24 100644 (file)
@@ -236,7 +236,7 @@ void bumb_gunner_exit(float _exitflag)
        self.movetype       = MOVETYPE_WALK;
        self.effects        &~= EF_NODRAW;
        self.alpha          = 1;
-       self.PlayerPhysplug = SUB_Null;
+       self.PlayerPhysplug = func_null;
        self.view_ofs       = PL_VIEW_OFS;
        self.event_damage   = PlayerDamage;
        self.hud            = HUD_NORMAL;
@@ -307,7 +307,7 @@ float bumb_gunner_enter()
        other.solid             = SOLID_NOT;
        other.movetype          = MOVETYPE_NOCLIP;
        other.alpha             = -1;
-       other.event_damage      = SUB_Null;
+       other.event_damage      = func_null;
        other.view_ofs          = '0 0 0';
        other.hud               = _gun.hud;
        other.PlayerPhysplug    = _gun.PlayerPhysplug;
@@ -794,7 +794,7 @@ void bumb_die()
        if(random() > 0.5)
                _body.touch = bumb_blowup;
        else
-               _body.touch = SUB_Null;
+               _body.touch = func_null;
                
        _body.think = bumb_diethink;
        _body.nextthink = time;
@@ -805,7 +805,7 @@ void bumb_die()
        pointparticles(particleeffectnum("explosion_medium"), findbetterlocation(self.origin, 16), '0 0 0', 1);
        
        self.health                     = 0;
-       self.event_damage       = SUB_Null;
+       self.event_damage       = func_null;
        self.solid                      = SOLID_CORPSE;
        self.takedamage         = DAMAGE_NO;
        self.deadflag           = DEAD_DYING;
@@ -814,7 +814,7 @@ void bumb_die()
        self.colormod           = '0 0 0';
        self.avelocity          = '0 0 0';
        self.velocity           = '0 0 0';
-       self.touch                      = SUB_Null;
+       self.touch                      = func_null;
        self.nextthink          = 0;
 
        setorigin(self, self.pos1);
index 792be585023d064650cad8f9360b771d1d16a4f0..ad7bd2dcf0919f93519329b3124aaaa59156052f 100644 (file)
@@ -569,7 +569,7 @@ void racer_deadtouch()
 void racer_die()
 {
     self.health       = 0;
-    self.event_damage = SUB_Null;
+    self.event_damage = func_null;
     self.solid        = SOLID_CORPSE;
     self.takedamage   = DAMAGE_NO;
     self.deadflag     = DEAD_DYING;
index a623bd540727afbe8f054c6b7fb65ec277004e14..11b9081a6022dc72d9cbbaf45596fbba0fc59308 100644 (file)
@@ -700,7 +700,7 @@ void raptor_blowup()
     self.velocity       = '0 0 0';
 
     setorigin(self, self.pos1);
-    self.touch = SUB_Null;
+    self.touch = func_null;
     self.nextthink = 0;
 }
 
@@ -720,7 +720,7 @@ void raptor_diethink()
 void raptor_die()
 {
     self.health       = 0;
-    self.event_damage = SUB_Null;
+    self.event_damage = func_null;
     self.solid        = SOLID_CORPSE;
     self.takedamage   = DAMAGE_NO;
     self.deadflag     = DEAD_DYING;
index 6a307d53cf6f24b2bf5311d486faa4d833db169d..ebd74754f96abc2144f2818aa775f870e5cb9333 100644 (file)
@@ -736,9 +736,9 @@ void spiderbot_blowup()
 void spiderbot_die()
 {
     self.health             = 0;
-    self.event_damage       = SUB_Null;
+    self.event_damage       = func_null;
     self.takedamage         = DAMAGE_NO;
-    self.touch              = SUB_Null;
+    self.touch              = func_null;
     self.cnt                = 3.4 + time + random() * 2;
     self.think              = spiderbot_blowup;
     self.nextthink          = time;
index 95ab6575b8040fd3e794807d45a0f981d579787b..5e377079e01dd2fc0b1377fde2a884a17e50656a 100644 (file)
@@ -377,7 +377,7 @@ void vehicles_projectile_damage(entity inflictor, entity attacker, float damage,
     if(self.health < 1)
     {
         self.takedamage = DAMAGE_NO;
-        self.event_damage = SUB_Null;
+        self.event_damage = func_null;
         self.think = self.use;
         self.nextthink = time;
     }
@@ -396,7 +396,7 @@ void vehicles_projectile_explode()
 
        PROJECTILE_TOUCH;
 
-       self.event_damage = SUB_Null;
+       self.event_damage = func_null;
     RadiusDamage (self, self.realowner, self.shot_dmg, 0, self.shot_radius, self, self.shot_force, self.totalfrags, other);
 
     remove (self);
@@ -610,7 +610,7 @@ void vehicles_enter()
     self.owner.movetype       = MOVETYPE_NOCLIP;
     self.owner.alpha          = -1;
     self.owner.vehicle        = self;
-    self.owner.event_damage   = SUB_Null;
+    self.owner.event_damage   = func_null;
     self.owner.view_ofs       = '0 0 0';
     self.colormap             = self.owner.colormap;
     if(self.tur_head)
@@ -780,7 +780,7 @@ void vehicles_exit(float eject)
         _player.movetype       = MOVETYPE_WALK;
         _player.effects        &~= EF_NODRAW;
         _player.alpha          = 1;
-        _player.PlayerPhysplug = SUB_Null;
+        _player.PlayerPhysplug = func_null;
         _player.vehicle        = world;
         _player.view_ofs       = PL_VIEW_OFS;
         _player.event_damage   = PlayerDamage;
index 3780fc71384d987160f8e56c3063166fdbcc1bb3..bbd9c647bcc8f578e6f5cd0a1e09652f281620ef 100644 (file)
@@ -229,7 +229,7 @@ void W_BallisticBullet_LeaveSolid_think()
 
        self.think = self.W_BallisticBullet_LeaveSolid_think_save;
        self.nextthink = max(time, self.W_BallisticBullet_LeaveSolid_nextthink_save);
-       self.W_BallisticBullet_LeaveSolid_think_save = SUB_Null;
+       self.W_BallisticBullet_LeaveSolid_think_save = func_null;
 
        self.flags &~= FL_ONGROUND;
 
@@ -628,7 +628,7 @@ float W_CheckProjectileDamage(entity inflictor, entity projowner, float deathtyp
 void W_PrepareExplosionByDamage(entity attacker, void() explode)
 {
        self.takedamage = DAMAGE_NO;
-       self.event_damage = SUB_Null;
+       self.event_damage = func_null;
        
        if((attacker.flags & FL_CLIENT) && !autocvar_g_projectiles_keep_owner)
        {
index 04d136af429449ca8a2ff6f1b1bd52b7bb9e0bd7..ad1fbf0fddcf2a02eb261cd7ec830b4f466c0662 100644 (file)
@@ -35,7 +35,7 @@ void W_Plasma_Explode (void)
                                        if(IsFlying(other))
                                                AnnounceTo(self.realowner, "electrobitch");
 
-       self.event_damage = SUB_Null;
+       self.event_damage = func_null;
        self.takedamage = DAMAGE_NO;
        if (self.movetype == MOVETYPE_BOUNCE)
        {
@@ -54,7 +54,7 @@ void W_Plasma_Explode_Combo (void)
 {
        W_Plasma_TriggerCombo(self.origin, autocvar_g_balance_electro_combo_comboradius, self.realowner);
 
-       self.event_damage = SUB_Null;
+       self.event_damage = func_null;
        RadiusDamage (self, self.realowner, autocvar_g_balance_electro_combo_damage, autocvar_g_balance_electro_combo_edgedamage, autocvar_g_balance_electro_combo_radius, world, autocvar_g_balance_electro_combo_force, WEP_ELECTRO | HITTYPE_BOUNCE, world); // use THIS type for a combo because primary can't bounce
        remove (self);
 }
index 67547e3583efef51458b138d926cfda5daf1ed2d..02557ad94e0da5db1a889ed76bb4abc2afe2fd7a 100644 (file)
@@ -14,7 +14,7 @@ void W_Fireball_Explode (void)
        vector dir;
        float d;
 
-       self.event_damage = SUB_Null;
+       self.event_damage = func_null;
        self.takedamage = DAMAGE_NO;
 
        // 1. dist damage
index 5f6c0346f5cf3c11137bf6e5271487fb764b263e..91b50fe7f76642cf336763a11243baa401a482d5 100644 (file)
@@ -14,7 +14,7 @@ void W_Grenade_Explode (void)
                                        if(IsFlying(other))
                                                AnnounceTo(self.realowner, "airshot");
 
-       self.event_damage = SUB_Null;
+       self.event_damage = func_null;
        self.takedamage = DAMAGE_NO;
 
        if(self.movetype == MOVETYPE_NONE)
@@ -34,7 +34,7 @@ void W_Grenade_Explode2 (void)
                                        if(IsFlying(other))
                                                AnnounceTo(self.realowner, "airshot");
 
-       self.event_damage = SUB_Null;
+       self.event_damage = func_null;
        self.takedamage = DAMAGE_NO;
 
        if(self.movetype == MOVETYPE_NONE)
index 9a4b1ef4495aa95d223d7df5cd15f7e770060f0b..de444cb31e8ae7b4b62cfd1639c0294a6d22b558 100644 (file)
@@ -6,7 +6,7 @@ REGISTER_WEAPON(HAGAR, w_hagar, IT_ROCKETS, 8, WEP_FLAG_NORMAL | WEP_FLAG_RELOAD
 
 void W_Hagar_Explode (void)
 {
-       self.event_damage = SUB_Null;
+       self.event_damage = func_null;
        RadiusDamage (self, self.realowner, autocvar_g_balance_hagar_primary_damage, autocvar_g_balance_hagar_primary_edgedamage, autocvar_g_balance_hagar_primary_radius, world, autocvar_g_balance_hagar_primary_force, self.projectiledeathtype, other);
 
        remove (self);
@@ -14,7 +14,7 @@ void W_Hagar_Explode (void)
 
 void W_Hagar_Explode2 (void)
 {
-       self.event_damage = SUB_Null;
+       self.event_damage = func_null;
        RadiusDamage (self, self.realowner, autocvar_g_balance_hagar_secondary_damage, autocvar_g_balance_hagar_secondary_edgedamage, autocvar_g_balance_hagar_secondary_radius, world, autocvar_g_balance_hagar_secondary_force, self.projectiledeathtype, other);
 
        remove (self);
index a2697b2f5cb527050677ace98031e52896c6b83e..716d0a177cd811bc5c4f91acd7c5238384b1c719 100644 (file)
@@ -7,7 +7,7 @@ void W_HLAC_Touch (void)
 {
        PROJECTILE_TOUCH;
 
-       self.event_damage = SUB_Null;
+       self.event_damage = func_null;
        
        if(self.projectiledeathtype & HITTYPE_SECONDARY)
                RadiusDamage (self, self.realowner, autocvar_g_balance_hlac_secondary_damage, autocvar_g_balance_hlac_secondary_edgedamage, autocvar_g_balance_hlac_secondary_radius, world, autocvar_g_balance_hlac_secondary_force, self.projectiledeathtype, other);
index 63d02604c4271f11cc808099f148f8946393bbf1..c6644f1003be9867516d17c0db4f15d828af9da3 100644 (file)
@@ -35,8 +35,8 @@ void W_Hook_ExplodeThink (void)
 
 void W_Hook_Explode2 (void)
 {
-       self.event_damage = SUB_Null;
-       self.touch = SUB_Null;
+       self.event_damage = func_null;
+       self.touch = func_null;
        self.effects |= EF_NODRAW;
 
        self.think = W_Hook_ExplodeThink;
index 5e2bb075aa5c7ff1a4fd6b258ac2cea9661954a7..ecedc89fc1bb5748ccba92a8f7b7e750c49f3ae4 100644 (file)
@@ -9,7 +9,7 @@ void W_Laser_Touch (void)
 {
        PROJECTILE_TOUCH;
 
-       self.event_damage = SUB_Null;
+       self.event_damage = func_null;
        if (self.dmg)
                RadiusDamage (self, self.realowner, autocvar_g_balance_laser_secondary_damage, autocvar_g_balance_laser_secondary_edgedamage, autocvar_g_balance_laser_secondary_radius, world, autocvar_g_balance_laser_secondary_force, self.projectiledeathtype, other);
        else
index 4d98f0c91cd50927abfecdacd53c1b82c6a35dec..1b4f7c6cd06aa232811c06b67617006ba6f031d2 100644 (file)
@@ -45,7 +45,7 @@ void W_Mine_Stick (entity to)
 
        newmine.mine_time = self.mine_time;
 
-       newmine.touch = SUB_Null;
+       newmine.touch = func_null;
        newmine.think = W_Mine_Think;
        newmine.nextthink = time;
        newmine.cnt = self.cnt;
@@ -67,7 +67,7 @@ void W_Mine_Explode ()
                                        if(IsFlying(other))
                                                AnnounceTo(self.realowner, "airshot");
 
-       self.event_damage = SUB_Null;
+       self.event_damage = func_null;
        self.takedamage = DAMAGE_NO;
 
        RadiusDamage (self, self.realowner, autocvar_g_balance_minelayer_damage, autocvar_g_balance_minelayer_edgedamage, autocvar_g_balance_minelayer_radius, world, autocvar_g_balance_minelayer_force, self.projectiledeathtype, other);
@@ -91,7 +91,7 @@ void W_Mine_Explode ()
 
 void W_Mine_DoRemoteExplode ()
 {
-       self.event_damage = SUB_Null;
+       self.event_damage = func_null;
        self.takedamage = DAMAGE_NO;
 
        if(self.movetype == MOVETYPE_NONE || self.movetype == MOVETYPE_FOLLOW)
index 2fba6144dd5ce7a855852de1c12ad755176855a1..add0207d12b57c8fd1ec90abd776143407bef84a 100644 (file)
@@ -25,7 +25,7 @@ void W_Rocket_Explode ()
                                        if(IsFlying(other))
                                                AnnounceTo(self.realowner, "airshot");
 
-       self.event_damage = SUB_Null;
+       self.event_damage = func_null;
        self.takedamage = DAMAGE_NO;
 
        RadiusDamage (self, self.realowner, autocvar_g_balance_rocketlauncher_damage, autocvar_g_balance_rocketlauncher_edgedamage, autocvar_g_balance_rocketlauncher_radius, world, autocvar_g_balance_rocketlauncher_force, self.projectiledeathtype, other);
@@ -46,7 +46,7 @@ void W_Rocket_DoRemoteExplode ()
 {
        W_Rocket_Unregister();
 
-       self.event_damage = SUB_Null;
+       self.event_damage = func_null;
        self.takedamage = DAMAGE_NO;
 
        RadiusDamage (self, self.realowner, autocvar_g_balance_rocketlauncher_remote_damage, autocvar_g_balance_rocketlauncher_remote_edgedamage, autocvar_g_balance_rocketlauncher_remote_radius, world, autocvar_g_balance_rocketlauncher_remote_force, self.projectiledeathtype | HITTYPE_BOUNCE, world);
index 7cf6cfb73634e11be73aba7215de897f8ee7b715..9bdd89013ad35df1fc3afcc126d203e1cf436668 100644 (file)
@@ -12,7 +12,7 @@ REGISTER_WEAPON(SEEKER, w_seeker, IT_ROCKETS, 8, WEP_FLAG_MUTATORBLOCKED | WEP_F
 // ============================
 void Seeker_Missile_Explode ()
 {
-       self.event_damage = SUB_Null;
+       self.event_damage = func_null;
        RadiusDamage (self, self.realowner, autocvar_g_balance_seeker_missile_damage, autocvar_g_balance_seeker_missile_edgedamage, autocvar_g_balance_seeker_missile_radius, world, autocvar_g_balance_seeker_missile_force, self.projectiledeathtype, other);
 
        remove (self);
@@ -223,7 +223,7 @@ void Seeker_Fire_Missile(vector f_diff, entity m_target)
 // ============================
 void Seeker_Flac_Explode ()
 {
-       self.event_damage = SUB_Null;
+       self.event_damage = func_null;
 
        RadiusDamage (self, self.realowner, autocvar_g_balance_seeker_flac_damage, autocvar_g_balance_seeker_flac_edgedamage, autocvar_g_balance_seeker_flac_radius, world, autocvar_g_balance_seeker_flac_force, self.projectiledeathtype, other);
 
@@ -426,7 +426,7 @@ void Seeker_Tag_Touch()
 
        te_knightspike(org2);
 
-       self.event_damage = SUB_Null;
+       self.event_damage = func_null;
        Damage_DamageInfo(self.origin, 0, 0, 0, self.velocity, WEP_SEEKER | HITTYPE_HEADSHOT, other.species, self);
 
        if (other.takedamage == DAMAGE_AIM && other.deadflag == DEAD_NO)