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 4081bd8..bdf6334 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 20bc4ab..6b32bae 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 827f3e7..ddf9ff6 100644 (file)
@@ -16,8 +16,6 @@ float menuInitialized;
 float menuNotTheFirstFrame;
 float menuMouseMode;
 
-void SUB_Null() { }
-
 void m_sync()
 {
        updateCompression();
index 641ddf7..b6c0795 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 2a9c094..dbbcc7b 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 b450f76..0259a57 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 c95c2ea..eb1105b 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 d3f4b55..a0e4dc0 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 f784563..067b174 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 4c11f94..627cf6c 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 4d29b01..9560133 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 8867d07..f7af47d 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 b5f4bcf..854b7fe 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 b07cae2..6c43c98 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 20ddc65..10a78fb 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 07c9667..9f8647d 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 808d1a2..f328162 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 6508163..8137cc3 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 75dae14..3e83c97 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 7116c33..952bb34 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 2694cb3..54d60a1 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 b56dfec..33b5338 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 8923c19..8d21766 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 8c27662..d7a3b29 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 48f7621..971d65c 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 891941c..dd58b3c 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 4b0f1d1..b9c7dbf 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 792be58..ad7bd2d 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 a623bd5..11b9081 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 6a307d5..ebd7475 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 95ab657..5e37707 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 3780fc7..bbd9c64 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 04d136a..ad1fbf0 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 67547e3..02557ad 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 5f6c034..91b50fe 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 9a4b1ef..de444cb 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 a2697b2..716d0a1 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 63d0260..c6644f1 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 5e2bb07..ecedc89 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 4d98f0c..1b4f7c6 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 2fba614..add0207 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 7cf6cfb..9bdd890 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)