From 44657432578ed559d0c426da18d7678419caf424 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Wed, 19 Dec 2012 16:46:49 +0100 Subject: [PATCH] get rid of SUB_Null --- qcsrc/client/projectile.qc | 20 ++++++++----------- qcsrc/menu/item/button.c | 8 +++++--- qcsrc/menu/menu.qc | 2 -- qcsrc/menu/menu.qh | 2 -- qcsrc/menu/xonotic/inputbox.c | 10 ++++++---- qcsrc/server/attic/monsters/m_monsters.qc | 2 +- qcsrc/server/attic/monsters/monster_zombie.qc | 2 +- qcsrc/server/attic/nexball.qc | 6 +++--- qcsrc/server/attic/vehicles/bumblebee.qc | 2 +- qcsrc/server/cl_client.qc | 4 ++-- qcsrc/server/func_breakable.qc | 2 +- qcsrc/server/g_hook.qc | 2 +- qcsrc/server/g_lights.qc | 2 +- qcsrc/server/g_subs.qc | 3 +-- qcsrc/server/g_triggers.qc | 6 +++--- qcsrc/server/mutators/gamemode_keepaway.qc | 2 +- qcsrc/server/mutators/gamemode_nexball.qc | 8 ++++---- qcsrc/server/mutators/gamemode_onslaught.qc | 6 +++--- qcsrc/server/portals.qc | 12 +++++------ qcsrc/server/runematch.qc | 4 ++-- qcsrc/server/secret.qc | 2 +- qcsrc/server/t_items.qc | 2 +- qcsrc/server/t_jumppads.qc | 2 +- qcsrc/server/t_plats.qc | 18 ++++++++--------- qcsrc/server/tturrets/system/system_damage.qc | 6 +++--- qcsrc/server/tturrets/system/system_main.qc | 2 +- qcsrc/server/vehicles/bumblebee.qc | 10 +++++----- qcsrc/server/vehicles/racer.qc | 2 +- qcsrc/server/vehicles/raptor.qc | 4 ++-- qcsrc/server/vehicles/spiderbot.qc | 4 ++-- qcsrc/server/vehicles/vehicles.qc | 8 ++++---- qcsrc/server/w_common.qc | 4 ++-- qcsrc/server/w_electro.qc | 4 ++-- qcsrc/server/w_fireball.qc | 2 +- qcsrc/server/w_grenadelauncher.qc | 4 ++-- qcsrc/server/w_hagar.qc | 4 ++-- qcsrc/server/w_hlac.qc | 2 +- qcsrc/server/w_hook.qc | 4 ++-- qcsrc/server/w_laser.qc | 2 +- qcsrc/server/w_minelayer.qc | 6 +++--- qcsrc/server/w_rocketlauncher.qc | 4 ++-- qcsrc/server/w_seeker.qc | 6 +++--- 42 files changed, 101 insertions(+), 106 deletions(-) diff --git a/qcsrc/client/projectile.qc b/qcsrc/client/projectile.qc index 4081bd8d1..bdf633468 100644 --- a/qcsrc/client/projectile.qc +++ b/qcsrc/client/projectile.qc @@ -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; diff --git a/qcsrc/menu/item/button.c b/qcsrc/menu/item/button.c index 20bc4ab9c..6b32bae27 100644 --- a/qcsrc/menu/item/button.c +++ b/qcsrc/menu/item/button.c @@ -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; diff --git a/qcsrc/menu/menu.qc b/qcsrc/menu/menu.qc index 827f3e756..ddf9ff686 100644 --- a/qcsrc/menu/menu.qc +++ b/qcsrc/menu/menu.qc @@ -16,8 +16,6 @@ float menuInitialized; float menuNotTheFirstFrame; float menuMouseMode; -void SUB_Null() { } - void m_sync() { updateCompression(); diff --git a/qcsrc/menu/menu.qh b/qcsrc/menu/menu.qh index 641ddf7d1..b6c0795a8 100644 --- a/qcsrc/menu/menu.qh +++ b/qcsrc/menu/menu.qh @@ -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. diff --git a/qcsrc/menu/xonotic/inputbox.c b/qcsrc/menu/xonotic/inputbox.c index 2a9c094b8..dbbcc7b0c 100644 --- a/qcsrc/menu/xonotic/inputbox.c +++ b/qcsrc/menu/xonotic/inputbox.c @@ -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; diff --git a/qcsrc/server/attic/monsters/m_monsters.qc b/qcsrc/server/attic/monsters/m_monsters.qc index b450f761e..0259a5756 100644 --- a/qcsrc/server/attic/monsters/m_monsters.qc +++ b/qcsrc/server/attic/monsters/m_monsters.qc @@ -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; } diff --git a/qcsrc/server/attic/monsters/monster_zombie.qc b/qcsrc/server/attic/monsters/monster_zombie.qc index c95c2eaf2..eb1105b93 100644 --- a/qcsrc/server/attic/monsters/monster_zombie.qc +++ b/qcsrc/server/attic/monsters/monster_zombie.qc @@ -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; diff --git a/qcsrc/server/attic/nexball.qc b/qcsrc/server/attic/nexball.qc index d3f4b55f4..a0e4dc097 100644 --- a/qcsrc/server/attic/nexball.qc +++ b/qcsrc/server/attic/nexball.qc @@ -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); } diff --git a/qcsrc/server/attic/vehicles/bumblebee.qc b/qcsrc/server/attic/vehicles/bumblebee.qc index f78456371..067b17436 100644 --- a/qcsrc/server/attic/vehicles/bumblebee.qc +++ b/qcsrc/server/attic/vehicles/bumblebee.qc @@ -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; diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index 4c11f9469..627cf6c6b 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -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; diff --git a/qcsrc/server/func_breakable.qc b/qcsrc/server/func_breakable.qc index 4d29b014f..9560133bd 100644 --- a/qcsrc/server/func_breakable.qc +++ b/qcsrc/server/func_breakable.qc @@ -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(); } diff --git a/qcsrc/server/g_hook.qc b/qcsrc/server/g_hook.qc index 8867d0725..f7af47d92 100644 --- a/qcsrc/server/g_hook.qc +++ b/qcsrc/server/g_hook.qc @@ -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; diff --git a/qcsrc/server/g_lights.qc b/qcsrc/server/g_lights.qc index b5f4bcf84..854b7fef2 100644 --- a/qcsrc/server/g_lights.qc +++ b/qcsrc/server/g_lights.qc @@ -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) diff --git a/qcsrc/server/g_subs.qc b/qcsrc/server/g_subs.qc index b07cae271..6c43c985f 100644 --- a/qcsrc/server/g_subs.qc +++ b/qcsrc/server/g_subs.qc @@ -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 diff --git a/qcsrc/server/g_triggers.qc b/qcsrc/server/g_triggers.qc index 20ddc6551..10a78fb99 100644 --- a/qcsrc/server/g_triggers.qc +++ b/qcsrc/server/g_triggers.qc @@ -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() diff --git a/qcsrc/server/mutators/gamemode_keepaway.qc b/qcsrc/server/mutators/gamemode_keepaway.qc index 07c96671c..9f8647d9d 100644 --- a/qcsrc/server/mutators/gamemode_keepaway.qc +++ b/qcsrc/server/mutators/gamemode_keepaway.qc @@ -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; diff --git a/qcsrc/server/mutators/gamemode_nexball.qc b/qcsrc/server/mutators/gamemode_nexball.qc index 808d1a29b..f328162ff 100644 --- a/qcsrc/server/mutators/gamemode_nexball.qc +++ b/qcsrc/server/mutators/gamemode_nexball.qc @@ -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; diff --git a/qcsrc/server/mutators/gamemode_onslaught.qc b/qcsrc/server/mutators/gamemode_onslaught.qc index 650816376..8137cc304 100644 --- a/qcsrc/server/mutators/gamemode_onslaught.qc +++ b/qcsrc/server/mutators/gamemode_onslaught.qc @@ -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'); diff --git a/qcsrc/server/portals.qc b/qcsrc/server/portals.qc index 75dae14bf..3e83c972e 100644 --- a/qcsrc/server/portals.qc +++ b/qcsrc/server/portals.qc @@ -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; diff --git a/qcsrc/server/runematch.qc b/qcsrc/server/runematch.qc index 7116c3387..952bb342e 100644 --- a/qcsrc/server/runematch.qc +++ b/qcsrc/server/runematch.qc @@ -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); diff --git a/qcsrc/server/secret.qc b/qcsrc/server/secret.qc index 2694cb3d6..54d60a14b 100644 --- a/qcsrc/server/secret.qc +++ b/qcsrc/server/secret.qc @@ -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; } diff --git a/qcsrc/server/t_items.qc b/qcsrc/server/t_items.qc index b56dfec47..33b53385b 100644 --- a/qcsrc/server/t_items.qc +++ b/qcsrc/server/t_items.qc @@ -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) diff --git a/qcsrc/server/t_jumppads.qc b/qcsrc/server/t_jumppads.qc index 8923c19f1..8d21766a9 100644 --- a/qcsrc/server/t_jumppads.qc +++ b/qcsrc/server/t_jumppads.qc @@ -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; } diff --git a/qcsrc/server/t_plats.qc b/qcsrc/server/t_plats.qc index 8c2766295..d7a3b29ce 100644 --- a/qcsrc/server/t_plats.qc +++ b/qcsrc/server/t_plats.qc @@ -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; diff --git a/qcsrc/server/tturrets/system/system_damage.qc b/qcsrc/server/tturrets/system/system_damage.qc index 48f76219b..971d65cca 100644 --- a/qcsrc/server/tturrets/system/system_damage.qc +++ b/qcsrc/server/tturrets/system/system_damage.qc @@ -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; diff --git a/qcsrc/server/tturrets/system/system_main.qc b/qcsrc/server/tturrets/system/system_main.qc index 891941c93..dd58b3cee 100644 --- a/qcsrc/server/tturrets/system/system_main.qc +++ b/qcsrc/server/tturrets/system/system_main.qc @@ -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); diff --git a/qcsrc/server/vehicles/bumblebee.qc b/qcsrc/server/vehicles/bumblebee.qc index 4b0f1d13a..b9c7dbfb8 100644 --- a/qcsrc/server/vehicles/bumblebee.qc +++ b/qcsrc/server/vehicles/bumblebee.qc @@ -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); diff --git a/qcsrc/server/vehicles/racer.qc b/qcsrc/server/vehicles/racer.qc index 792be5850..ad7bd2dcf 100644 --- a/qcsrc/server/vehicles/racer.qc +++ b/qcsrc/server/vehicles/racer.qc @@ -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; diff --git a/qcsrc/server/vehicles/raptor.qc b/qcsrc/server/vehicles/raptor.qc index a623bd540..11b9081a6 100644 --- a/qcsrc/server/vehicles/raptor.qc +++ b/qcsrc/server/vehicles/raptor.qc @@ -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; diff --git a/qcsrc/server/vehicles/spiderbot.qc b/qcsrc/server/vehicles/spiderbot.qc index 6a307d53c..ebd74754f 100644 --- a/qcsrc/server/vehicles/spiderbot.qc +++ b/qcsrc/server/vehicles/spiderbot.qc @@ -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; diff --git a/qcsrc/server/vehicles/vehicles.qc b/qcsrc/server/vehicles/vehicles.qc index 95ab6575b..5e377079e 100644 --- a/qcsrc/server/vehicles/vehicles.qc +++ b/qcsrc/server/vehicles/vehicles.qc @@ -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; diff --git a/qcsrc/server/w_common.qc b/qcsrc/server/w_common.qc index 3780fc713..bbd9c647b 100644 --- a/qcsrc/server/w_common.qc +++ b/qcsrc/server/w_common.qc @@ -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) { diff --git a/qcsrc/server/w_electro.qc b/qcsrc/server/w_electro.qc index 04d136af4..ad1fbf0fd 100644 --- a/qcsrc/server/w_electro.qc +++ b/qcsrc/server/w_electro.qc @@ -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); } diff --git a/qcsrc/server/w_fireball.qc b/qcsrc/server/w_fireball.qc index 67547e358..02557ad94 100644 --- a/qcsrc/server/w_fireball.qc +++ b/qcsrc/server/w_fireball.qc @@ -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 diff --git a/qcsrc/server/w_grenadelauncher.qc b/qcsrc/server/w_grenadelauncher.qc index 5f6c0346f..91b50fe7f 100644 --- a/qcsrc/server/w_grenadelauncher.qc +++ b/qcsrc/server/w_grenadelauncher.qc @@ -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) diff --git a/qcsrc/server/w_hagar.qc b/qcsrc/server/w_hagar.qc index 9a4b1ef44..de444cb31 100644 --- a/qcsrc/server/w_hagar.qc +++ b/qcsrc/server/w_hagar.qc @@ -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); diff --git a/qcsrc/server/w_hlac.qc b/qcsrc/server/w_hlac.qc index a2697b2f5..716d0a177 100644 --- a/qcsrc/server/w_hlac.qc +++ b/qcsrc/server/w_hlac.qc @@ -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); diff --git a/qcsrc/server/w_hook.qc b/qcsrc/server/w_hook.qc index 63d02604c..c6644f100 100644 --- a/qcsrc/server/w_hook.qc +++ b/qcsrc/server/w_hook.qc @@ -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; diff --git a/qcsrc/server/w_laser.qc b/qcsrc/server/w_laser.qc index 5e2bb075a..ecedc89fc 100644 --- a/qcsrc/server/w_laser.qc +++ b/qcsrc/server/w_laser.qc @@ -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 diff --git a/qcsrc/server/w_minelayer.qc b/qcsrc/server/w_minelayer.qc index 4d98f0c91..1b4f7c6cd 100644 --- a/qcsrc/server/w_minelayer.qc +++ b/qcsrc/server/w_minelayer.qc @@ -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) diff --git a/qcsrc/server/w_rocketlauncher.qc b/qcsrc/server/w_rocketlauncher.qc index 2fba6144d..add0207d1 100644 --- a/qcsrc/server/w_rocketlauncher.qc +++ b/qcsrc/server/w_rocketlauncher.qc @@ -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); diff --git a/qcsrc/server/w_seeker.qc b/qcsrc/server/w_seeker.qc index 7cf6cfb73..9bdd89013 100644 --- a/qcsrc/server/w_seeker.qc +++ b/qcsrc/server/w_seeker.qc @@ -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) -- 2.39.2