]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove unnecessary returns
authorMario <mario@smbclan.net>
Fri, 10 Jun 2016 13:18:32 +0000 (23:18 +1000)
committerMario <mario@smbclan.net>
Fri, 10 Jun 2016 13:18:32 +0000 (23:18 +1000)
35 files changed:
qcsrc/common/mutators/mutator/bloodloss/bloodloss.qc
qcsrc/common/mutators/mutator/breakablehook/breakablehook.qc
qcsrc/common/mutators/mutator/buffs/buffs.qc
qcsrc/common/mutators/mutator/bugrigs/bugrigs.qc
qcsrc/common/mutators/mutator/campcheck/campcheck.qc
qcsrc/common/mutators/mutator/instagib/instagib.qc
qcsrc/common/mutators/mutator/invincibleproj/invincibleproj.qc
qcsrc/common/mutators/mutator/melee_only/melee_only.qc
qcsrc/common/mutators/mutator/midair/midair.qc
qcsrc/common/mutators/mutator/multijump/multijump.qc
qcsrc/common/mutators/mutator/nades/nades.qc
qcsrc/common/mutators/mutator/new_toys/new_toys.qc
qcsrc/common/mutators/mutator/nix/nix.qc
qcsrc/common/mutators/mutator/overkill/overkill.qc
qcsrc/common/mutators/mutator/physical_items/physical_items.qc
qcsrc/common/mutators/mutator/random_gravity/random_gravity.qc
qcsrc/common/mutators/mutator/rocketflying/rocketflying.qc
qcsrc/common/mutators/mutator/rocketminsta/rocketminsta.qc
qcsrc/common/mutators/mutator/sandbox/sandbox.qc
qcsrc/common/mutators/mutator/spawn_near_teammate/spawn_near_teammate.qc
qcsrc/common/mutators/mutator/superspec/superspec.qc
qcsrc/common/mutators/mutator/touchexplode/touchexplode.qc
qcsrc/common/mutators/mutator/vampire/vampire.qc
qcsrc/server/g_damage.qc
qcsrc/server/mutators/mutator/gamemode_assault.qc
qcsrc/server/mutators/mutator/gamemode_ca.qc
qcsrc/server/mutators/mutator/gamemode_ctf.qc
qcsrc/server/mutators/mutator/gamemode_cts.qc
qcsrc/server/mutators/mutator/gamemode_domination.qc
qcsrc/server/mutators/mutator/gamemode_freezetag.qc
qcsrc/server/mutators/mutator/gamemode_invasion.qc
qcsrc/server/mutators/mutator/gamemode_keepaway.qc
qcsrc/server/mutators/mutator/gamemode_keyhunt.qc
qcsrc/server/mutators/mutator/gamemode_lms.qc
qcsrc/server/mutators/mutator/gamemode_race.qc

index 9bb88a2f8ccc9ecd8540704b1b8a916dccc0f959..a335bf1cc409a1f57e85b17b164bc504f34a958c 100644 (file)
@@ -29,8 +29,6 @@ MUTATOR_HOOKFUNCTION(bloodloss, PlayerJump)
 
        if(player.health <= autocvar_g_bloodloss)
                return true;
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(bloodloss, BuildMutatorsString)
index e0cf91b35f57c809c5f130b423eb85b8eddc34eb..ca266eb5af648ec965d63beb3109473f7a5c9e22 100644 (file)
@@ -23,10 +23,8 @@ MUTATOR_HOOKFUNCTION(breakablehook, PlayerDamage_Calculate)
                {
                        Damage (frag_target.realowner, frag_attacker, frag_attacker, 5, WEP_HOOK.m_id | HITTYPE_SPLASH, frag_target.realowner.origin, '0 0 0');
                        RemoveGrapplingHook(frag_target.realowner);
-                       return false; // dead
+                       return; // dead
                }
        }
-
-       return false;
 }
 #endif
index dbddbfc840bf918e20d8ff294c492adf5cbee0bb..87046b96e4df075cb74d51f97d3b0a9fa9f9d6f4 100644 (file)
@@ -509,7 +509,7 @@ MUTATOR_HOOKFUNCTION(buffs, PlayerDamage_SplitHealthArmor)
        float frag_deathtype = M_ARGV(6, float);
        float frag_damage = M_ARGV(7, float);
 
-       if(frag_deathtype == DEATH_BUFF.m_id) { return false; }
+       if(frag_deathtype == DEATH_BUFF.m_id) { return; }
 
        if(frag_target.buffs & BUFF_RESISTANCE.m_itemid)
        {
@@ -517,8 +517,6 @@ MUTATOR_HOOKFUNCTION(buffs, PlayerDamage_SplitHealthArmor)
                M_ARGV(4, float) = v.x; // take
                M_ARGV(5, float) = v.y; // save
        }
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(buffs, PlayerDamage_Calculate)
@@ -529,7 +527,7 @@ MUTATOR_HOOKFUNCTION(buffs, PlayerDamage_Calculate)
        float frag_damage = M_ARGV(4, float);
        vector frag_force = M_ARGV(6, vector);
 
-       if(frag_deathtype == DEATH_BUFF.m_id) { return false; }
+       if(frag_deathtype == DEATH_BUFF.m_id) { return; }
 
        if(frag_target.buffs & BUFF_SPEED.m_itemid)
        if(frag_target != frag_attacker)
@@ -620,8 +618,6 @@ MUTATOR_HOOKFUNCTION(buffs, PlayerDamage_Calculate)
 
        M_ARGV(4, float) = frag_damage;
        M_ARGV(6, vector) = frag_force;
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(buffs, PlayerSpawn)
@@ -632,7 +628,6 @@ MUTATOR_HOOKFUNCTION(buffs, PlayerSpawn)
        // reset timers here to prevent them continuing after re-spawn
        player.buff_disability_time = 0;
        player.buff_disability_effect_time = 0;
-       return false;
 }
 
 .float stat_sv_maxspeed;
@@ -697,7 +692,6 @@ MUTATOR_HOOKFUNCTION(buffs, PlayerDies)
                        frag_target.buff_model = world;
                }
        }
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(buffs, PlayerUseKey, CBC_ORDER_FIRST)
@@ -720,7 +714,7 @@ MUTATOR_HOOKFUNCTION(buffs, PlayerUseKey, CBC_ORDER_FIRST)
 
 MUTATOR_HOOKFUNCTION(buffs, ForbidThrowCurrentWeapon)
 {
-       if(MUTATOR_RETURNVALUE || gameover) { return false; }
+       if(MUTATOR_RETURNVALUE || gameover) { return; }
        entity player = M_ARGV(0, entity);
 
        if(player.buffs & BUFF_SWAPPER.m_itemid)
@@ -785,7 +779,6 @@ MUTATOR_HOOKFUNCTION(buffs, ForbidThrowCurrentWeapon)
                        return true;
                }
        }
-       return false;
 }
 
 bool buffs_RemovePlayer(entity player)
@@ -817,8 +810,6 @@ MUTATOR_HOOKFUNCTION(buffs, CustomizeWaypoint)
        if((wp.owner.flags & FL_CLIENT) && (wp.owner.buffs & BUFF_INVISIBLE.m_itemid) && (e == player))
        if(DIFF_TEAM(wp.owner, e))
                return true;
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(buffs, OnEntityPreSpawn, CBC_ORDER_LAST)
@@ -836,7 +827,6 @@ MUTATOR_HOOKFUNCTION(buffs, OnEntityPreSpawn, CBC_ORDER_LAST)
                        return true;
                }
        }
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(buffs, WeaponRateFactor)
@@ -865,7 +855,7 @@ MUTATOR_HOOKFUNCTION(buffs, PlayerPreThink)
 {
        entity player = M_ARGV(0, entity);
 
-       if(gameover || IS_DEAD(player)) { return false; }
+       if(gameover || IS_DEAD(player)) { return; }
 
        if(time < player.buff_disability_time)
        if(time >= player.buff_disability_effect_time)
@@ -1055,8 +1045,6 @@ MUTATOR_HOOKFUNCTION(buffs, PlayerRegen)
 
        if(self.buffs & BUFF_SPEED.m_itemid)
                regen_mod_regen = autocvar_g_buffs_speed_regen;
-
-       return false;
 }
 
 REPLICATE(cvar_cl_buffs_autoreplace, bool, "cl_buffs_autoreplace");
index df25ad4c5965083c67e7cd88c569b1a1bbda7c1b..96490700e567ee5eb356678641f334e204639021 100644 (file)
@@ -273,7 +273,7 @@ MUTATOR_HOOKFUNCTION(bugrigs, PM_Physics)
 {
     entity player = M_ARGV(0, entity);
 
-       if(!PHYS_BUGRIGS(player) || !IS_PLAYER(player)) { return false; }
+       if(!PHYS_BUGRIGS(player) || !IS_PLAYER(player)) { return; }
 
 #ifdef SVQC
        player.angles = player.bugrigs_prevangles;
@@ -285,7 +285,7 @@ MUTATOR_HOOKFUNCTION(bugrigs, PM_Physics)
 
 MUTATOR_HOOKFUNCTION(bugrigs, PlayerPhysics)
 {
-       if(!PHYS_BUGRIGS(M_ARGV(0, entity))) { return false; }
+       if(!PHYS_BUGRIGS(M_ARGV(0, entity))) { return; }
 #ifdef SVQC
        entity player = M_ARGV(0, entity);
        player.bugrigs_prevangles = player.angles;
index 38a1ab835231780e93fba8031fc6b58572e729d0..48b90ae7bb196d8e804241f4050f6a0e6d1b528a 100644 (file)
@@ -13,7 +13,6 @@ MUTATOR_HOOKFUNCTION(campcheck, PlayerDies)
        entity frag_target = M_ARGV(2, entity);
        
        Kill_Notification(NOTIF_ONE, frag_target, MSG_CENTER, CPID_CAMPCHECK);
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(campcheck, PlayerDamage_Calculate)
@@ -28,8 +27,6 @@ MUTATOR_HOOKFUNCTION(campcheck, PlayerDamage_Calculate)
                frag_target.campcheck_traveled_distance = autocvar_g_campcheck_distance;
                frag_attacker.campcheck_traveled_distance = autocvar_g_campcheck_distance;
        }
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(campcheck, PlayerPreThink)
index 0f1b199a446d542e3511925dd1e5d78cb1cdc1e3..89bbf5fae017d1fd176283b1e131ee1c3983d386 100644 (file)
@@ -140,7 +140,6 @@ void instagib_ammocheck(entity this)
 MUTATOR_HOOKFUNCTION(mutator_instagib, MatchEnd)
 {
        FOREACH_CLIENT(IS_PLAYER(it), LAMBDA(instagib_stop_countdown(it)));
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(mutator_instagib, MonsterDropItem)
@@ -148,8 +147,6 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, MonsterDropItem)
        entity item = M_ARGV(1, entity);
 
        item.monster_loot = spawnfunc_item_minst_cells;
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(mutator_instagib, MonsterSpawn)
@@ -159,8 +156,6 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, MonsterSpawn)
        // always refill ammo
        if(mon.monsterid == MON_MAGE.monsterid)
                mon.skin = 1;
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(mutator_instagib, BotShouldAttack)
@@ -169,8 +164,6 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, BotShouldAttack)
 
        if (targ.items & ITEM_Invisibility.m_itemid)
                return true;
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(mutator_instagib, MakePlayerObserver)
@@ -269,7 +262,6 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, PlayerDamage_SplitHealthArmor)
 MUTATOR_HOOKFUNCTION(mutator_instagib, ForbidThrowCurrentWeapon)
 {
        // weapon dropping on death handled by FilterItem
-
        return true;
 }
 
@@ -358,8 +350,6 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, PlayerDamage_Calculate)
        M_ARGV(4, float) = frag_damage;
        M_ARGV(5, float) = frag_mirrordamage;
        M_ARGV(6, vector) = frag_force;
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(mutator_instagib, SetStartItems)
@@ -376,8 +366,6 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, SetStartItems)
 
        start_weapons = warmup_start_weapons = WEPSET(VAPORIZER);
        start_items |= IT_UNLIMITED_SUPERWEAPONS;
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(mutator_instagib, FilterItem)
@@ -429,8 +417,6 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, CustomizeWaypoint)
        if((wp.owner.flags & FL_CLIENT) && (wp.owner.items & ITEM_Invisibility.m_itemid) && (e == player))
        if(DIFF_TEAM(wp.owner, e))
                return true;
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(mutator_instagib, PlayerDies)
@@ -439,8 +425,6 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, PlayerDies)
 
        if(DEATH_ISWEAPON(frag_deathtype, WEP_VAPORIZER))
                M_ARGV(4, float) = 1000; // always gib if it was a vaporizer death
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(mutator_instagib, ItemTouch)
@@ -477,11 +461,11 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, ItemTouch)
 
 MUTATOR_HOOKFUNCTION(mutator_instagib, OnEntityPreSpawn)
 {
-       if (!autocvar_g_powerups) { return false; }
+       if (!autocvar_g_powerups) { return; }
        entity ent = M_ARGV(0, entity);
        // Can't use .itemdef here
        if (!(ent.classname == "item_strength" || ent.classname == "item_invincible" || ent.classname == "item_health_mega"))
-               return false;
+               return;
 
        entity e = spawn();
 
index a35a60a9b670670b279850ba336310885edc8c35..5bdafa1f12a8b9eb598e51066c05de15d511d198 100644 (file)
@@ -10,7 +10,6 @@ MUTATOR_HOOKFUNCTION(invincibleprojectiles, EditProjectile)
                // disable health which in effect disables damage calculations
                proj.health = 0;
        }
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(invincibleprojectiles, BuildMutatorsString)
index ee5de3dfc343ca9fcdf4fa7fc00844b09e972bae..ecd5fc7c8e49cebf4e8949b3bf4096b1bf344b49 100644 (file)
@@ -5,8 +5,6 @@ MUTATOR_HOOKFUNCTION(melee_only, SetStartItems)
 {
        start_ammo_shells = warmup_start_ammo_shells = 0;
        start_weapons = warmup_start_weapons = WEPSET(SHOTGUN);
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(melee_only, ForbidThrowCurrentWeapon)
index 73792896c2ab33526925ecdcf546fb01e3fc2f91..cda6b4c8282d290ff00083d1e76fb4c2ec3531d1 100644 (file)
@@ -15,8 +15,6 @@ MUTATOR_HOOKFUNCTION(midair, PlayerDamage_Calculate)
        if(IS_PLAYER(frag_target))
        if(time < frag_target.midair_shieldtime)
                M_ARGV(4, float) = 0;
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(midair, PlayerPowerups)
@@ -29,8 +27,6 @@ MUTATOR_HOOKFUNCTION(midair, PlayerPowerups)
                player.effects |= (EF_ADDITIVE | EF_FULLBRIGHT);
                player.midair_shieldtime = max(player.midair_shieldtime, time + autocvar_g_midair_shieldtime);
        }
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(midair, PlayerSpawn)
@@ -39,8 +35,6 @@ MUTATOR_HOOKFUNCTION(midair, PlayerSpawn)
 
        if(IS_BOT_CLIENT(player))
                player.bot_moveskill = 0; // disable bunnyhopping
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(midair, BuildMutatorsString)
index cafe5255f150db4f8b0d2a7f4ffc530f856283a8..780836d4986166d4c6f6cce4457dbc2a0e90d1a0 100644 (file)
@@ -47,11 +47,11 @@ MUTATOR_HOOKFUNCTION(multijump, PlayerJump)
 {
        entity player = M_ARGV(0, entity);
 
-       if(!PHYS_MULTIJUMP(player)) { return false; }
+       if(!PHYS_MULTIJUMP(player)) { return; }
 
        int client_multijump = PHYS_MULTIJUMP_CLIENT(player);
        if(client_multijump > 1)
-               return false; // nope
+               return; // nope
 
        if (!IS_JUMP_HELD(player) && !IS_ONGROUND(player) && client_multijump) // jump button pressed this frame and we are in midair
                player.multijump_ready = true;  // this is necessary to check that we released the jump button and pressed it again
index 07bac08daafd8d184cfa44a35d42025ef51b8739..1ad59926e546a44e04a8b12421d02e307e77bc35 100644 (file)
@@ -1144,14 +1144,13 @@ MUTATOR_HOOKFUNCTION(nades, ForbidThrowCurrentWeapon, CBC_ORDER_LAST)
                nades_CheckThrow(player);
                return true;
        }
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(nades, PlayerPreThink)
 {
        entity player = M_ARGV(0, entity);
 
-       if (!IS_PLAYER(player)) { return false; }
+       if (!IS_PLAYER(player)) { return; }
 
        if (player.nade && (player.offhand != OFFHAND_NADE || (player.weapons & WEPSET(HOOK)))) OFFHAND_NADE.offhand_think(OFFHAND_NADE, player, player.nade_altbutton);
 
@@ -1264,8 +1263,6 @@ MUTATOR_HOOKFUNCTION(nades, PlayerSpawn)
                        player.nade_spawnloc = world;
                }
        }
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(nades, PlayerDies, CBC_ORDER_LAST)
@@ -1324,8 +1321,6 @@ MUTATOR_HOOKFUNCTION(nades, PlayerDamage_Calculate)
                Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_FREEZETAG_REVIVED_NADE, frag_target.netname);
                Send_Notification(NOTIF_ONE, frag_target, MSG_CENTER, CENTER_FREEZETAG_REVIVE_SELF);
        }
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(nades, MonsterDies)
@@ -1337,8 +1332,6 @@ MUTATOR_HOOKFUNCTION(nades, MonsterDies)
        if(DIFF_TEAM(frag_attacker, frag_target))
        if(!(frag_target.spawnflags & MONSTERFLAG_SPAWNED))
                nades_GiveBonus(frag_attacker, autocvar_g_nades_bonus_score_minor);
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(nades, DropSpecialItems)
@@ -1347,8 +1340,6 @@ MUTATOR_HOOKFUNCTION(nades, DropSpecialItems)
        
        if(frag_target.nade)
                toss_nade(frag_target, true, '0 0 0', time + 0.05);
-
-       return false;
 }
 
 void nades_RemovePlayer(entity this)
index 9816572342bc1010cde220032418b834f2bca33d..a52fc46704e9edaeb5bcd3f752e4f087d2db9663 100644 (file)
@@ -111,7 +111,6 @@ const float NT_AUTOREPLACE_RANDOM = 2;
 MUTATOR_HOOKFUNCTION(nt, SetModname)
 {
        M_ARGV(0, string) = "NewToys";
-       return false;
 }
 
 bool nt_IsNewToy(int w)
@@ -191,8 +190,6 @@ MUTATOR_HOOKFUNCTION(nt, SetStartItems)
        warmup_newdefault &= warmup_start_weapons_defaultmask;
        warmup_start_weapons &= ~warmup_start_weapons_defaultmask;
        warmup_start_weapons |= warmup_newdefault;
-
-       return 0;
 }
 
 MUTATOR_HOOKFUNCTION(nt, SetWeaponreplace)
@@ -227,6 +224,5 @@ MUTATOR_HOOKFUNCTION(nt, FilterItem)
                item.item_pickupsound = string_null;
                item.item_pickupsound_ent = SND_WEAPONPICKUP_NEW_TOYS;
        }
-       return false;
 }
 #endif
index c94198c80699ac94fb2235ad137112e093bf3933..cfc89b057645e96f060b54b30cb2349c32801a4e 100644 (file)
@@ -66,8 +66,6 @@ REGISTER_MUTATOR(nix, cvar("g_nix") && !cvar("g_instagib") && !cvar("g_overkill"
                                PS(it).m_switchweapon = w_getbestweapon(it);
                });
        }
-
-       return false;
 }
 
 bool NIX_CanChooseWeapon(int wpn)
@@ -260,7 +258,6 @@ MUTATOR_HOOKFUNCTION(nix, OnEntityPreSpawn)
 
        if(ent.classname == "target_items") // items triggers cannot work in nix (as they change weapons/ammo)
                return true;
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(nix, PlayerPreThink)
@@ -280,12 +277,10 @@ MUTATOR_HOOKFUNCTION(nix, PlayerSpawn)
        player.nix_lastchange_id = -1;
        NIX_GiveCurrentWeapon(player); // overrides the weapons you got when spawning
        player.items |= IT_UNLIMITED_SUPERWEAPONS;
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(nix, SetModname, CBC_ORDER_LAST)
 {
        M_ARGV(0, string) = "NIX";
-       return false;
 }
 #endif
index d97e375b71d7725243af683deef8271aa668c05c..19e88cd6387ce6d863a160868a1b393e372714af 100644 (file)
@@ -35,8 +35,6 @@ REGISTER_MUTATOR(ok, cvar("g_overkill") && !cvar("g_instagib") && !g_nexball &&
                WEP_RPC.spawnflags |= WEP_FLAG_MUTATORBLOCKED;
                WEP_HMG.spawnflags |= WEP_FLAG_MUTATORBLOCKED;
        }
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(ok, W_DecreaseAmmo)
@@ -87,7 +85,7 @@ float ok_CheckWeaponCharge(entity ent, int wep)
 
        entity wepent = Weapons_from(wep);
 
-       if(wepent == WEP_Null) return 0;  // dummy
+       if(wepent == WEP_Null) return false;  // dummy
 
        return (ent.ammo_charge[wep] >= cvar(sprintf("g_overkill_ammo_decharge_%s", wepent.netname)));
 }
@@ -112,8 +110,6 @@ MUTATOR_HOOKFUNCTION(ok, PlayerDamage_Calculate, CBC_ORDER_LAST)
 
                M_ARGV(4, float) = 0;
        }
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(ok, PlayerDamage_SplitHealthArmor)
@@ -195,12 +191,12 @@ MUTATOR_HOOKFUNCTION(ok, ForbidThrowCurrentWeapon)
 MUTATOR_HOOKFUNCTION(ok, PlayerPreThink)
 {
        if(intermission_running || gameover)
-               return false;
+               return;
 
        entity player = M_ARGV(0, entity);
 
        if(IS_DEAD(player) || !IS_PLAYER(player) || STAT(FROZEN, player))
-               return false;
+               return;
 
        if(player.ok_lastwep)
        {
@@ -283,8 +279,6 @@ MUTATOR_HOOKFUNCTION(ok, PlayerSpawn)
                player.ok_lastwep = 0;
 
        player.ok_pauseregen_finished = time + 2;
-
-       return false;
 }
 
 void self_spawnfunc_weapon_hmg(entity this) { spawnfunc_weapon_hmg(this); }
@@ -331,8 +325,6 @@ MUTATOR_HOOKFUNCTION(ok, OnEntityPreSpawn)
                        return true;
                }
        }
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(ok, FilterItem)
@@ -340,7 +332,7 @@ MUTATOR_HOOKFUNCTION(ok, FilterItem)
        entity item = M_ARGV(0, entity);
 
        if(item.ok_item)
-               return false;
+               return;
 
        switch(item.items)
        {
@@ -369,8 +361,6 @@ MUTATOR_HOOKFUNCTION(ok, SetStartItems)
 
        start_items |= IT_UNLIMITED_WEAPON_AMMO;
        start_weapons = warmup_start_weapons = ok_start_items;
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(ok, BuildMutatorsString)
index 82d6e6cc85a9ab826b0c35fbe9846c4142c10597..aad331527335362cc2d48c5b04a1c801fc51eb9e 100644 (file)
@@ -93,9 +93,9 @@ MUTATOR_HOOKFUNCTION(physical_items, Item_Spawn)
        entity item = M_ARGV(0, entity);
 
        if(item.owner == world && autocvar_g_physical_items <= 1)
-               return false;
+               return;
        if (item.spawnflags & 1) // floating item
-               return false;
+               return;
 
        // The actual item can't be physical and trigger at the same time, so make it invisible and use a second entity for physics.
        // Ugly hack, but unless SOLID_TRIGGER is gotten to work with MOVETYPE_PHYSICS in the engine it can't be fixed.
@@ -137,7 +137,5 @@ MUTATOR_HOOKFUNCTION(physical_items, Item_Spawn)
        item.movetype = MOVETYPE_FOLLOW;
        item.aiment = wep; // attach the original weapon
        item.SendEntity3 = func_null;
-
-       return false;
 }
 #endif
index 22c312637efe1351b92c1240230b235980b6da78..a384a2b9c2284923d987181ca4bea8fe4c6f83e9 100644 (file)
@@ -17,8 +17,6 @@ REGISTER_MUTATOR(random_gravity, cvar("g_random_gravity"))
        {
                cvar_settemp("sv_gravity", cvar_string("sv_gravity")); // settemp current gravity so it's restored on match end
        }
-
-       return false;
 }
 
 float gravity_delay;
@@ -38,8 +36,6 @@ MUTATOR_HOOKFUNCTION(random_gravity, SV_StartFrame)
        gravity_delay = time + autocvar_g_random_gravity_delay;
 
        LOG_TRACE("Gravity is now: ", ftos(autocvar_sv_gravity), "\n");
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(random_gravity, BuildMutatorsString)
index e45c4fe1eb536f51cb3f2a99b88d387cffe52e29..da7e1c3ec05a3a9e09dcc7def609f6c931193e59 100644 (file)
@@ -10,7 +10,6 @@ MUTATOR_HOOKFUNCTION(rocketflying, EditProjectile)
                // kill detonate delay of rockets
                proj.spawnshieldtime = time;
        }
-       return 0;
 }
 
 MUTATOR_HOOKFUNCTION(rocketflying, BuildMutatorsString)
index ca4356ce1954f6c8cf0e84cb558a0120100f968d..b0a740391f291fd5ec50e56369314a7159e23882 100644 (file)
@@ -7,7 +7,7 @@ REGISTER_MUTATOR(rm, cvar("g_instagib"));
 MUTATOR_HOOKFUNCTION(rm, PlayerDamage_Calculate)
 {
        // we do it this way, so rm can be toggled during the match
-       if(!autocvar_g_rm) { return false; }
+       if(!autocvar_g_rm) { return; }
 
        entity frag_attacker = M_ARGV(1, entity);
        entity frag_target = M_ARGV(2, entity);
@@ -24,21 +24,17 @@ MUTATOR_HOOKFUNCTION(rm, PlayerDamage_Calculate)
                frag_damage = 0;
 
        M_ARGV(4, float) = frag_damage;
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(rm, PlayerDies)
 {
        // we do it this way, so rm can be toggled during the match
-       if(!autocvar_g_rm) { return false; }
+       if(!autocvar_g_rm) { return; }
 
        float frag_deathtype = M_ARGV(3, float);
 
        if(DEATH_ISWEAPON(frag_deathtype, WEP_DEVASTATOR) || DEATH_ISWEAPON(frag_deathtype, WEP_ELECTRO))
                M_ARGV(4, float) = 1000; // always gib if it was a vaporizer death
-
-       return false;
 }
 
 #endif
index e6b857a10013253a4a910c094b9c8caa66fc3b6d..62b3fb0bc9484cc7117f17c8104df0112312de61 100644 (file)
@@ -35,8 +35,6 @@ REGISTER_MUTATOR(sandbox, cvar("g_sandbox"))
        {
                // nothing to remove
        }
-
-       return false;
 }
 
 const float MAX_STORAGE_ATTACHMENTS = 16;
@@ -452,7 +450,7 @@ void sandbox_Database_Load()
 MUTATOR_HOOKFUNCTION(sandbox, SV_ParseClientCommand)
 {
        if(MUTATOR_RETURNVALUE) // command was already handled?
-               return false;
+               return;
 
        entity player = M_ARGV(0, entity);
        string cmd_name = M_ARGV(1, string);
@@ -823,15 +821,14 @@ MUTATOR_HOOKFUNCTION(sandbox, SV_ParseClientCommand)
                                return true;
                }
        }
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(sandbox, SV_StartFrame)
 {
        if(!autocvar_g_sandbox_storage_autosave)
-               return false;
+               return;
        if(time < autosave_time)
-               return false;
+               return;
        autosave_time = time + autocvar_g_sandbox_storage_autosave;
 
        sandbox_Database_Save();
index 03854839983cf784f14f079844dcdf72774f05a3..c53e9d1448d540f6d26226b91251c58fc9aa0a69 100644 (file)
@@ -23,12 +23,12 @@ MUTATOR_HOOKFUNCTION(spawn_near_teammate, Spawn_Score)
        vector spawn_score = M_ARGV(2, vector);
 
        if(autocvar_g_spawn_near_teammate_ignore_spawnpoint == 1 || (autocvar_g_spawn_near_teammate_ignore_spawnpoint == 2 && player.cvar_cl_spawn_near_teammate))
-               return false;
+               return;
 
        spawn_spot.msnt_lookat = world;
 
        if(!teamplay)
-               return false;
+               return;
 
        RandomSelection_Init();
        FOREACH_CLIENT(IS_PLAYER(it) && it != player && SAME_TEAM(it, player) && !IS_DEAD(it), LAMBDA(
@@ -50,13 +50,11 @@ MUTATOR_HOOKFUNCTION(spawn_near_teammate, Spawn_Score)
                spawn_score.x += SPAWN_PRIO_NEAR_TEAMMATE_SAMETEAM; // prefer same team, if we can't find a spawn near teammate
 
        M_ARGV(2, vector) = spawn_score;
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(spawn_near_teammate, PlayerSpawn)
 {
-       if(!teamplay) { return false; }
+       if(!teamplay) { return; }
        entity player = M_ARGV(0, entity);
        entity spawn_spot = M_ARGV(1, entity);
 
@@ -73,7 +71,7 @@ MUTATOR_HOOKFUNCTION(spawn_near_teammate, PlayerSpawn)
        });
 
        if(num_red == 1 || num_blue == 1 || num_yellow == 1 || num_pink == 1)
-               return false; // at least 1 team has only 1 player, let's not give the bigger team too much of an advantage!
+               return; // at least 1 team has only 1 player, let's not give the bigger team too much of an advantage!
 
        // Note: when entering this, fixangle is already set.
        if(autocvar_g_spawn_near_teammate_ignore_spawnpoint == 1 || (autocvar_g_spawn_near_teammate_ignore_spawnpoint == 2 && player.cvar_cl_spawn_near_teammate))
@@ -147,7 +145,7 @@ MUTATOR_HOOKFUNCTION(spawn_near_teammate, PlayerSpawn)
                                                                                player.angles = it.angles;
                                                                                player.angles_z = 0; // never spawn tilted even if the spot says to
                                                                                it.msnt_timer = time + autocvar_g_spawn_near_teammate_ignore_spawnpoint_delay;
-                                                                               return false;
+                                                                               return;
                                                                        }
                                                                }
                                                        }
@@ -177,8 +175,6 @@ MUTATOR_HOOKFUNCTION(spawn_near_teammate, PlayerSpawn)
                sprint(player, "angles: ", vtos(player.angles), "\n");
                */
        }
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(spawn_near_teammate, PlayerDies)
@@ -186,7 +182,6 @@ MUTATOR_HOOKFUNCTION(spawn_near_teammate, PlayerDies)
        entity frag_target = M_ARGV(0, entity);
 
        frag_target.msnt_deathloc = frag_target.origin;
-       return false;
 }
 
 REPLICATE(cvar_cl_spawn_near_teammate, bool, "cl_spawn_near_teammate");
index 93f35f13ff93f60573dd5081554318d18a281ea4..786796866cdc0e0335b4f091223418393682d6d8 100644 (file)
@@ -154,14 +154,14 @@ MUTATOR_HOOKFUNCTION(superspec, SV_ParseClientCommand)
     var = strcat(var, text," ^7(^3 ", long, "^7 | ^3", short, " ^7)\n")
 
        if(MUTATOR_RETURNVALUE) // command was already handled?
-               return false;
+               return;
 
        entity player = M_ARGV(0, entity);
        string cmd_name = M_ARGV(1, string);
        int cmd_argc = M_ARGV(2, int);
 
        if(IS_PLAYER(player))
-               return false;
+               return;
 
        if(cmd_name == "superspec_itemfilter")
        {
@@ -365,8 +365,6 @@ MUTATOR_HOOKFUNCTION(superspec, SV_ParseClientCommand)
                superspec_msg("", "", player, "No active Shield\n", 1);
                return true;
        }
-
-       return false;
 #undef OPTIONINFO
 }
 
@@ -393,7 +391,7 @@ MUTATOR_HOOKFUNCTION(superspec, ClientConnect)
        entity player = M_ARGV(0, entity);
 
        if(!IS_REAL_CLIENT(player))
-               return false;
+               return;
 
        string fn = "superspec-local.options";
        float fh;
@@ -409,7 +407,7 @@ MUTATOR_HOOKFUNCTION(superspec, ClientConnect)
        if (!_ISLOCAL(player))
        {
                if(player.crypto_idfp == "")
-                       return false;
+                       return;
 
                fn = sprintf("superspec-%s.options", uri_escape(player.crypto_idfp));
        }
@@ -434,8 +432,6 @@ MUTATOR_HOOKFUNCTION(superspec, ClientConnect)
                }
                fclose(fh);
        }
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(superspec, PlayerDies)
@@ -452,8 +448,6 @@ MUTATOR_HOOKFUNCTION(superspec, PlayerDies)
                        superspec_Spectate(it, frag_attacker);
                }
        ));
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(superspec, ClientDisconnect)
index 1698b3a64bd7c1d658cd3d6e05a9bb1a8a376fc2..fc3177aa237cb4aadd35fa499f3ecf804a600947 100644 (file)
@@ -43,7 +43,5 @@ MUTATOR_HOOKFUNCTION(touchexplode, PlayerPreThink)
                                player.touchexplode_time = it.touchexplode_time = time + 0.2;
                        }
                ));
-
-       return false;
 }
 #endif
index 61b0adc45e99dc4b20e4dd597158f6fc0a4c1ddb..d245c8059b7856a421dd5bc2a2c3e72e3b262168 100644 (file)
@@ -14,8 +14,6 @@ MUTATOR_HOOKFUNCTION(vampire, PlayerDamage_SplitHealthArmor)
                frag_attacker.health += bound(0, damage_take, frag_target.health);
                frag_attacker.health = bound(0, frag_attacker.health, autocvar_g_balance_health_limit);
        }
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(vampire, BuildMutatorsString)
index 7bb41c6d2b306e6875fb025a695787f1064b4765..beaf7805a28f5d3f9778707fc9996fc031455ffe 100644 (file)
@@ -103,9 +103,7 @@ void GiveFrags (entity attacker, entity targ, float f, int deathtype)
 
        // FIXME fix the mess this is (we have REAL points now!)
        if(MUTATOR_CALLHOOK(GiveFragsForKill, attacker, targ, f))
-       {
                f = M_ARGV(2, float);
-       }
 
        attacker.totalfrags += f;
 
index 9446080bcdff1d1c450739dacaae0d6a6154d1c6..7c32b077ab87d70ae69cf83983b7eb562383fe81 100644 (file)
@@ -615,8 +615,6 @@ MUTATOR_HOOKFUNCTION(as, PlayerSpawn)
                Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_ASSAULT_ATTACKING);
        else
                Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_ASSAULT_DEFENDING);
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(as, TurretSpawn)
@@ -625,8 +623,6 @@ MUTATOR_HOOKFUNCTION(as, TurretSpawn)
 
        if(!turret.team || turret.team == MAX_SHOT_DISTANCE)
                turret.team = 5; // this gets reversed when match starts?
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(as, VehicleSpawn)
@@ -668,7 +664,6 @@ MUTATOR_HOOKFUNCTION(as, ReadLevelCvars)
 {
        // no assault warmups
        warmup_stage = 0;
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(as, OnEntityPreSpawn)
@@ -683,8 +678,6 @@ MUTATOR_HOOKFUNCTION(as, OnEntityPreSpawn)
                case "info_player_team4":
                        return true;
        }
-
-       return false;
 }
 
 // scoreboard setup
index 943fd27d7a27fe86c27750264bb279626f4646c7..fe31e37cc0aba72757d6606a4bc1951fcf627bf9 100644 (file)
@@ -313,7 +313,7 @@ MUTATOR_HOOKFUNCTION(ca, PlayerDies)
                frag_target.respawn_flags =  RESPAWN_SILENT;
        if (!warmup_stage)
                eliminatedPlayers.SendFlags |= 1;
-       return 1;
+       return true;
 }
 
 MUTATOR_HOOKFUNCTION(ca, ClientDisconnect)
@@ -327,7 +327,7 @@ MUTATOR_HOOKFUNCTION(ca, ClientDisconnect)
 
 MUTATOR_HOOKFUNCTION(ca, ForbidPlayerScore_Clear)
 {
-       return 1;
+       return true;
 }
 
 MUTATOR_HOOKFUNCTION(ca, MakePlayerObserver)
@@ -367,8 +367,6 @@ MUTATOR_HOOKFUNCTION(ca, SetStartItems)
        start_ammo_cells   = warmup_start_ammo_cells   = cvar("g_lms_start_ammo_cells");
        start_ammo_plasma  = warmup_start_ammo_plasma  = cvar("g_lms_start_ammo_plasma");
        start_ammo_fuel    = warmup_start_ammo_fuel    = cvar("g_lms_start_ammo_fuel");
-
-       return 0;
 }
 
 MUTATOR_HOOKFUNCTION(ca, PlayerDamage_Calculate)
@@ -388,8 +386,6 @@ MUTATOR_HOOKFUNCTION(ca, PlayerDamage_Calculate)
 
        M_ARGV(4, float) = frag_damage;
        M_ARGV(5, float) = frag_mirrordamage;
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(ca, FilterItem)
@@ -402,8 +398,6 @@ MUTATOR_HOOKFUNCTION(ca, FilterItem)
 
        if (autocvar_g_pickup_items <= 0)
                return true;
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(ca, PlayerDamage_SplitHealthArmor)
@@ -440,8 +434,6 @@ MUTATOR_HOOKFUNCTION(ca, SpectateSet)
        if (!autocvar_g_ca_spectate_enemies && client.caplayer)
        if (DIFF_TEAM(targ, client))
                return true;
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(ca, SpectateNext)
@@ -454,7 +446,6 @@ MUTATOR_HOOKFUNCTION(ca, SpectateNext)
                targ = CA_SpectateNext(client, targ);
                return true;
        }
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(ca, SpectatePrev)
index a2e90dda309a23d6940d45e108dd7819591040ab..fe63fa7e4ec2fb023a922f9c3793d2ca086c645a 100644 (file)
@@ -2059,7 +2059,6 @@ MUTATOR_HOOKFUNCTION(ctf, PlayerDamage_Calculate) // for changing damage and for
                }
                // todo: add notification for when flag carrier needs help?
        }
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(ctf, PlayerDies)
@@ -2079,8 +2078,6 @@ MUTATOR_HOOKFUNCTION(ctf, PlayerDies)
                ctf_Handle_Throw(frag_target, world, DROP_NORMAL);
                tmp_entity.ctf_dropper = world;
        }
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(ctf, GiveFragsForKill)
@@ -2107,7 +2104,6 @@ MUTATOR_HOOKFUNCTION(ctf, MakePlayerObserver)
        entity player = M_ARGV(0, entity);
 
        ctf_RemovePlayer(player);
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(ctf, ClientDisconnect)
@@ -2128,7 +2124,7 @@ MUTATOR_HOOKFUNCTION(ctf, PortalTeleport)
 
 MUTATOR_HOOKFUNCTION(ctf, PlayerUseKey)
 {
-       if(MUTATOR_RETURNVALUE || gameover) { return false; }
+       if(MUTATOR_RETURNVALUE || gameover) { return; }
 
        entity player = M_ARGV(0, entity);
 
@@ -2257,8 +2253,6 @@ MUTATOR_HOOKFUNCTION(ctf, VehicleEnter)
                }
                return true;
        }
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(ctf, VehicleExit)
@@ -2274,8 +2268,6 @@ MUTATOR_HOOKFUNCTION(ctf, VehicleExit)
                player.flagcarried.nodrawtoclient = world;
                return true;
        }
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(ctf, AbortSpeedrun)
@@ -2288,8 +2280,6 @@ MUTATOR_HOOKFUNCTION(ctf, AbortSpeedrun)
                ctf_RespawnFlag(player.flagcarried);
                return true;
        }
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(ctf, MatchEnd)
@@ -2322,8 +2312,6 @@ MUTATOR_HOOKFUNCTION(ctf, MatchEnd)
                        }
                }
        }
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(ctf, HavocBot_ChooseRole)
@@ -2415,8 +2403,6 @@ MUTATOR_HOOKFUNCTION(ctf, SV_ParseClientCommand)
                        superspec_msg("", "", player, "No active flag carrier\n", 1);
                return true;
        }
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(ctf, DropSpecialItems)
@@ -2425,8 +2411,6 @@ MUTATOR_HOOKFUNCTION(ctf, DropSpecialItems)
        
        if(frag_target.flagcarried)
                ctf_Handle_Throw(frag_target, world, DROP_THROW);
-
-       return false;
 }
 
 
index f72d932c161b467823cf28dd2a744d33176023e1..a308925fba3e11a37e509d8e61c83c870ee7e161 100644 (file)
@@ -208,8 +208,6 @@ MUTATOR_HOOKFUNCTION(cts, reset_map_global)
                cvar_set("timelimit", ftos(race_timelimit));
                cts_ScoreRules();
        }
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(cts, ClientConnect)
@@ -237,8 +235,6 @@ MUTATOR_HOOKFUNCTION(cts, ClientConnect)
                        race_SendRankings(i, 0, 0, MSG_ONE);
                }
        }
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(cts, MakePlayerObserver)
@@ -252,8 +248,6 @@ MUTATOR_HOOKFUNCTION(cts, MakePlayerObserver)
 
        race_PreparePlayer(player);
        player.race_checkpoint = -1;
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(cts, PlayerSpawn)
@@ -270,8 +264,6 @@ MUTATOR_HOOKFUNCTION(cts, PlayerSpawn)
        player.race_respawn_spotref = spawn_spot;
 
        player.race_place = 0;
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(cts, PutClientInServer)
@@ -288,7 +280,6 @@ MUTATOR_HOOKFUNCTION(cts, PutClientInServer)
 
                race_AbandonRaceCheck(player);
        }
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(cts, PlayerDies)
@@ -297,7 +288,6 @@ MUTATOR_HOOKFUNCTION(cts, PlayerDies)
        
        frag_target.respawn_flags |= RESPAWN_FORCE;
        race_AbandonRaceCheck(frag_target);
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(cts, HavocBot_ChooseRole)
@@ -363,8 +353,6 @@ MUTATOR_HOOKFUNCTION(cts, FilterItem)
 
        if(item.classname == "droppedweapon")
                return true;
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(cts, PlayerDamage_Calculate)
@@ -380,8 +368,6 @@ MUTATOR_HOOKFUNCTION(cts, PlayerDamage_Calculate)
                frag_damage = 0;
                M_ARGV(4, float) = frag_damage;
        }
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(cts, ForbidPlayerScore_Clear)
index 01c5e4bd827041c26779e972d4c70674b6d4717b..5f17bf6a120a3c31ca41d950888cc385bf40560a 100644 (file)
@@ -501,7 +501,7 @@ MUTATOR_HOOKFUNCTION(dom, reset_map_players)
                if(IS_REAL_CLIENT(it))
                        set_dom_state(it);
        ));
-       return 1;
+       return true;
 }
 
 MUTATOR_HOOKFUNCTION(dom, PlayerSpawn)
@@ -513,7 +513,6 @@ MUTATOR_HOOKFUNCTION(dom, PlayerSpawn)
                player.player_blocked = 1;
        else
                player.player_blocked = 0;
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(dom, ClientConnect)
index e58dbd8b75d61187def0819c363c3b51af2606f4..12e4df68ad1ba429c6f4ab08902e9416e1e1cba3 100644 (file)
@@ -374,7 +374,6 @@ MUTATOR_HOOKFUNCTION(ft, MakePlayerObserver)
        entity player = M_ARGV(0, entity);
 
        ft_RemovePlayer(player);
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(ft, PlayerDies)
@@ -389,7 +388,7 @@ MUTATOR_HOOKFUNCTION(ft, PlayerDies)
                if(STAT(FROZEN, frag_target))
                        freezetag_Unfreeze(frag_target);
                freezetag_count_alive_players();
-               return 1; // let the player die so that he can respawn whenever he wants
+               return true; // let the player die so that he can respawn whenever he wants
        }
 
        // Cases DEATH_TEAMCHANGE and DEATH_AUTOTEAMCHANGE are needed to fix a bug whe
@@ -408,11 +407,11 @@ MUTATOR_HOOKFUNCTION(ft, PlayerDies)
                        freezetag_Unfreeze(frag_target); // remove ice
                frag_target.health = 0; // Unfreeze resets health
                frag_target.freezetag_frozen_timeout = -2; // freeze on respawn
-               return 1;
+               return true;
        }
 
        if(STAT(FROZEN, frag_target))
-               return 1;
+               return true;
 
        freezetag_Freeze(frag_target, frag_attacker);
        freezetag_LastPlayerForTeam_Notify(frag_target);
@@ -432,7 +431,7 @@ MUTATOR_HOOKFUNCTION(ft, PlayerDies)
                Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_FREEZETAG_FREEZE, frag_target.netname, frag_attacker.netname);
        }
 
-       return 1;
+       return true;
 }
 
 MUTATOR_HOOKFUNCTION(ft, PlayerSpawn)
@@ -440,12 +439,12 @@ MUTATOR_HOOKFUNCTION(ft, PlayerSpawn)
        entity player = M_ARGV(0, entity);
 
        if(player.freezetag_frozen_timeout == -1) // if PlayerSpawn is called by reset_map_players
-               return 1; // do nothing, round is starting right now
+               return true; // do nothing, round is starting right now
 
        if(player.freezetag_frozen_timeout == -2) // player was dead
        {
                freezetag_Freeze(player, world);
-               return 1;
+               return true;
        }
 
        freezetag_count_alive_players();
@@ -457,7 +456,7 @@ MUTATOR_HOOKFUNCTION(ft, PlayerSpawn)
                freezetag_Freeze(player, world);
        }
 
-       return 1;
+       return true;
 }
 
 MUTATOR_HOOKFUNCTION(ft, reset_map_players)
@@ -469,13 +468,13 @@ MUTATOR_HOOKFUNCTION(ft, reset_map_players)
                it.freezetag_frozen_timeout = 0;
        ));
        freezetag_count_alive_players();
-       return 1;
+       return true;
 }
 
 MUTATOR_HOOKFUNCTION(ft, GiveFragsForKill, CBC_ORDER_FIRST)
 {
        M_ARGV(2, float) = 0; // no frags counted in Freeze Tag
-       return 1;
+       return true;
 }
 
 MUTATOR_HOOKFUNCTION(ft, PlayerPreThink, CBC_ORDER_FIRST)
@@ -583,8 +582,6 @@ MUTATOR_HOOKFUNCTION(ft, SetStartItems)
        start_ammo_cells   = warmup_start_ammo_cells   = cvar("g_lms_start_ammo_cells");
        start_ammo_plasma  = warmup_start_ammo_plasma  = cvar("g_lms_start_ammo_plasma");
        start_ammo_fuel    = warmup_start_ammo_fuel    = cvar("g_lms_start_ammo_fuel");
-
-       return 0;
 }
 
 MUTATOR_HOOKFUNCTION(ft, HavocBot_ChooseRole)
index 2e04b14dd75912d6d668858ab84568aac126007b..c7cd48e8eeb6609182268e9be5f693d4bdc4db39 100644 (file)
@@ -350,8 +350,6 @@ MUTATOR_HOOKFUNCTION(inv, MonsterDies)
                                TeamScore_AddToTeam(frag_attacker.team, ST_INV_KILLS, +1);
                }
        }
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(inv, MonsterSpawn)
@@ -373,8 +371,6 @@ MUTATOR_HOOKFUNCTION(inv, MonsterSpawn)
                Send_Notification(NOTIF_ALL, world, MSG_CENTER, CENTER_INVASION_SUPERMONSTER, mon.monster_name);
 
        mon.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_BOTCLIP | DPCONTENTS_MONSTERCLIP;
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(inv, OnEntityPreSpawn)
@@ -384,16 +380,12 @@ MUTATOR_HOOKFUNCTION(inv, OnEntityPreSpawn)
        if(startsWith(ent.classname, "monster_"))
        if(!(ent.spawnflags & MONSTERFLAG_SPAWNED))
                return true;
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(inv, SV_StartFrame)
 {
        monsters_total = inv_maxspawned; // TODO: make sure numspawned never exceeds maxspawned
        monsters_killed = inv_numkilled;
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(inv, PlayerRegen)
@@ -407,7 +399,6 @@ MUTATOR_HOOKFUNCTION(inv, PlayerSpawn)
        entity player = M_ARGV(0, entity);
 
        player.bot_attack = false;
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(inv, PlayerDamage_Calculate)
@@ -425,14 +416,12 @@ MUTATOR_HOOKFUNCTION(inv, PlayerDamage_Calculate)
                M_ARGV(4, float) = frag_damage;
                M_ARGV(6, vector) = frag_force;
        }
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(inv, SV_ParseClientCommand)
 {
        if(MUTATOR_RETURNVALUE) // command was already handled?
-               return false;
+               return;
 
        entity player = M_ARGV(0, entity);
        string cmd_name = M_ARGV(1, string);
@@ -449,8 +438,6 @@ MUTATOR_HOOKFUNCTION(inv, SV_ParseClientCommand)
 
                return true;
        }
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(inv, BotShouldAttack)
@@ -459,15 +446,12 @@ MUTATOR_HOOKFUNCTION(inv, BotShouldAttack)
 
        if(!IS_MONSTER(targ))
                return true;
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(inv, SetStartItems)
 {
        start_health = 200;
        start_armorvalue = 200;
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(inv, AccuracyTargetValid)
index 53d770611f0290ce1ab4d2ffe59141850d741e13..3a6a77df596fae5280e14b8aa3facee9b924fff9 100644 (file)
@@ -335,7 +335,6 @@ MUTATOR_HOOKFUNCTION(ka, PlayerDies)
        }
 
        if(frag_target.ballcarried) { ka_DropEvent(frag_target); } // a player with the ball has died, drop it
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(ka, GiveFragsForKill)
@@ -404,8 +403,6 @@ MUTATOR_HOOKFUNCTION(ka, PlayerDamage_Calculate) // for changing damage and forc
 
        M_ARGV(4, float) = frag_damage;
        M_ARGV(6, vector) = frag_force;
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(ka, ClientDisconnect)
@@ -420,7 +417,6 @@ MUTATOR_HOOKFUNCTION(ka, MakePlayerObserver)
        entity player = M_ARGV(0, entity);
 
        if(player.ballcarried) { ka_DropEvent(player); } // a player with the ball has left the match, drop it
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(ka, PlayerPowerups)
@@ -458,7 +454,6 @@ MUTATOR_HOOKFUNCTION(ka, BotShouldAttack)
        // if neither player has ball then don't attack unless the ball is on the ground
        if(!targ.ballcarried && !bot.ballcarried && ka_ball.owner)
                return true;
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(ka, HavocBot_ChooseRole)
@@ -478,8 +473,6 @@ MUTATOR_HOOKFUNCTION(ka, DropSpecialItems)
        
        if(frag_target.ballcarried)
                ka_DropEvent(frag_target);
-
-       return false;
 }
 
 
index 5f4c2e76d84b66469bfa683bd9a06c6d0881f8f8..30653641f49ec17ecf4aff870b3ed07b92162221 100644 (file)
@@ -1314,7 +1314,6 @@ MUTATOR_HOOKFUNCTION(kh, PlayerDies)
                kh_Key_DropAll(frag_target, false);
        else
                kh_Key_DropAll(frag_target, true);
-       return 0;
 }
 
 MUTATOR_HOOKFUNCTION(kh, GiveFragsForKill, CBC_ORDER_FIRST)
@@ -1323,13 +1322,11 @@ MUTATOR_HOOKFUNCTION(kh, GiveFragsForKill, CBC_ORDER_FIRST)
        entity frag_target = M_ARGV(1, entity);
        float frag_score = M_ARGV(2, float);
        M_ARGV(2, float) = kh_HandleFrags(frag_attacker, frag_target, frag_score);
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(kh, MatchEnd)
 {
        kh_finalize();
-       return 0;
 }
 
 MUTATOR_HOOKFUNCTION(kh, GetTeamCount, CBC_ORDER_EXCLUSIVE)
@@ -1358,7 +1355,6 @@ MUTATOR_HOOKFUNCTION(kh, PlayerUseKey)
                        return true;
                }
        }
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(kh, HavocBot_ChooseRole)
@@ -1384,13 +1380,11 @@ MUTATOR_HOOKFUNCTION(kh, DropSpecialItems)
        entity frag_target = M_ARGV(0, entity);
        
        kh_Key_DropAll(frag_target, false);
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(kh, reset_map_global)
 {
        kh_Controller_SetThink(autocvar_g_balance_keyhunt_delay_round + (game_starttime - time), kh_StartRound);
-       return false;
 }
 
 #endif
index d0ef8e1d432aa7b42e566f71c0810bfc67f55c0b..557b48a90972b8faa829386f7ed7726341faa94c 100644 (file)
@@ -156,15 +156,12 @@ MUTATOR_HOOKFUNCTION(lms, reset_map_global)
 {
        lms_lowest_lives = 999;
        lms_next_place = player_count;
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(lms, reset_map_players)
 {
        if(restart_mapalreadyrestarted || (time < game_starttime))
        FOREACH_CLIENT(IS_PLAYER(it), LAMBDA(PlayerScore_Add(it, SP_LMS_LIVES, LMS_NewPlayerLives())));
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(lms, PutClientInServer)
@@ -185,7 +182,6 @@ MUTATOR_HOOKFUNCTION(lms, PlayerDies)
        entity frag_target = M_ARGV(2, entity);
        
        frag_target.respawn_flags |= RESPAWN_FORCE;
-       return false;
 }
 
 void lms_RemovePlayer(entity player)
@@ -287,8 +283,6 @@ MUTATOR_HOOKFUNCTION(lms, SetStartItems)
        start_ammo_cells   = warmup_start_ammo_cells   = cvar("g_lms_start_ammo_cells");
        start_ammo_plasma  = warmup_start_ammo_plasma  = cvar("g_lms_start_ammo_plasma");
        start_ammo_fuel    = warmup_start_ammo_fuel    = cvar("g_lms_start_ammo_fuel");
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(lms, ForbidPlayerScore_Clear)
@@ -400,7 +394,6 @@ MUTATOR_HOOKFUNCTION(lms, AddPlayerScore)
        if(gameover)
        if(M_ARGV(0, int) == SP_LMS_RANK) // score field
                return true; // allow writing to this field in intermission as it is needed for newly joining players
-       return false;
 }
 
 // scoreboard stuff
index f58004f7b3ebb9bb3f2d71069f6dee7147081aa5..d1fa685f7ae5cc2a8402bc8883f4d4878af76430 100644 (file)
@@ -240,8 +240,6 @@ MUTATOR_HOOKFUNCTION(rc, reset_map_global)
                cvar_set("timelimit", ftos(race_timelimit));
                race_ScoreRules();
        }
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(rc, ClientConnect)
@@ -269,8 +267,6 @@ MUTATOR_HOOKFUNCTION(rc, ClientConnect)
                        race_SendRankings(i, 0, 0, MSG_ONE);
                }
        }
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(rc, MakePlayerObserver)
@@ -301,8 +297,6 @@ MUTATOR_HOOKFUNCTION(rc, PlayerSpawn)
        player.race_respawn_spotref = spawn_spot;
 
        player.race_place = 0;
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(rc, PutClientInServer)
@@ -319,7 +313,6 @@ MUTATOR_HOOKFUNCTION(rc, PutClientInServer)
 
                race_AbandonRaceCheck(player);
        }
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(rc, PlayerDies)
@@ -328,7 +321,6 @@ MUTATOR_HOOKFUNCTION(rc, PlayerDies)
        
        frag_target.respawn_flags |= RESPAWN_FORCE;
        race_AbandonRaceCheck(frag_target);
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(rc, HavocBot_ChooseRole)
@@ -386,8 +378,6 @@ MUTATOR_HOOKFUNCTION(rc, ForbidPlayerScore_Clear)
 {
        if(g_race_qualifying)
                return true; // in qualifying, you don't lose score by observing
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(rc, GetTeamCount, CBC_ORDER_EXCLUSIVE)
@@ -400,8 +390,6 @@ MUTATOR_HOOKFUNCTION(rc, Scores_CountFragsRemaining)
        // announce remaining frags if not in qualifying mode
        if(!g_race_qualifying)
                return true;
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(rc, GetRecords)
@@ -451,15 +439,12 @@ MUTATOR_HOOKFUNCTION(rc, CheckRules_World)
                        return true;
                }
        }
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(rc, ReadLevelCvars)
 {
        if(g_race_qualifying == 2)
                warmup_stage = 0;
-       return false;
 }
 
 void race_Initialize()