if(player.health <= autocvar_g_bloodloss)
return true;
-
- return false;
}
MUTATOR_HOOKFUNCTION(bloodloss, BuildMutatorsString)
{
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
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)
{
M_ARGV(4, float) = v.x; // take
M_ARGV(5, float) = v.y; // save
}
-
- return false;
}
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)
M_ARGV(4, float) = frag_damage;
M_ARGV(6, vector) = frag_force;
-
- return false;
}
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;
frag_target.buff_model = world;
}
}
- return false;
}
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)
return true;
}
}
- return false;
}
bool buffs_RemovePlayer(entity player)
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)
return true;
}
}
- return false;
}
MUTATOR_HOOKFUNCTION(buffs, WeaponRateFactor)
{
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)
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");
{
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;
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;
entity frag_target = M_ARGV(2, entity);
Kill_Notification(NOTIF_ONE, frag_target, MSG_CENTER, CPID_CAMPCHECK);
- return false;
}
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)
MUTATOR_HOOKFUNCTION(mutator_instagib, MatchEnd)
{
FOREACH_CLIENT(IS_PLAYER(it), LAMBDA(instagib_stop_countdown(it)));
- return false;
}
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)
// always refill ammo
if(mon.monsterid == MON_MAGE.monsterid)
mon.skin = 1;
-
- return false;
}
MUTATOR_HOOKFUNCTION(mutator_instagib, BotShouldAttack)
if (targ.items & ITEM_Invisibility.m_itemid)
return true;
-
- return false;
}
MUTATOR_HOOKFUNCTION(mutator_instagib, MakePlayerObserver)
MUTATOR_HOOKFUNCTION(mutator_instagib, ForbidThrowCurrentWeapon)
{
// weapon dropping on death handled by FilterItem
-
return true;
}
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)
start_weapons = warmup_start_weapons = WEPSET(VAPORIZER);
start_items |= IT_UNLIMITED_SUPERWEAPONS;
-
- return false;
}
MUTATOR_HOOKFUNCTION(mutator_instagib, FilterItem)
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)
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)
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();
// disable health which in effect disables damage calculations
proj.health = 0;
}
- return false;
}
MUTATOR_HOOKFUNCTION(invincibleprojectiles, BuildMutatorsString)
{
start_ammo_shells = warmup_start_ammo_shells = 0;
start_weapons = warmup_start_weapons = WEPSET(SHOTGUN);
-
- return false;
}
MUTATOR_HOOKFUNCTION(melee_only, ForbidThrowCurrentWeapon)
if(IS_PLAYER(frag_target))
if(time < frag_target.midair_shieldtime)
M_ARGV(4, float) = 0;
-
- return false;
}
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)
if(IS_BOT_CLIENT(player))
player.bot_moveskill = 0; // disable bunnyhopping
-
- return false;
}
MUTATOR_HOOKFUNCTION(midair, BuildMutatorsString)
{
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
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);
player.nade_spawnloc = world;
}
}
-
- return false;
}
MUTATOR_HOOKFUNCTION(nades, PlayerDies, CBC_ORDER_LAST)
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)
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)
if(frag_target.nade)
toss_nade(frag_target, true, '0 0 0', time + 0.05);
-
- return false;
}
void nades_RemovePlayer(entity this)
MUTATOR_HOOKFUNCTION(nt, SetModname)
{
M_ARGV(0, string) = "NewToys";
- return false;
}
bool nt_IsNewToy(int w)
warmup_newdefault &= warmup_start_weapons_defaultmask;
warmup_start_weapons &= ~warmup_start_weapons_defaultmask;
warmup_start_weapons |= warmup_newdefault;
-
- return 0;
}
MUTATOR_HOOKFUNCTION(nt, SetWeaponreplace)
item.item_pickupsound = string_null;
item.item_pickupsound_ent = SND_WEAPONPICKUP_NEW_TOYS;
}
- return false;
}
#endif
PS(it).m_switchweapon = w_getbestweapon(it);
});
}
-
- return false;
}
bool NIX_CanChooseWeapon(int wpn)
if(ent.classname == "target_items") // items triggers cannot work in nix (as they change weapons/ammo)
return true;
- return false;
}
MUTATOR_HOOKFUNCTION(nix, PlayerPreThink)
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
WEP_RPC.spawnflags |= WEP_FLAG_MUTATORBLOCKED;
WEP_HMG.spawnflags |= WEP_FLAG_MUTATORBLOCKED;
}
-
- return false;
}
MUTATOR_HOOKFUNCTION(ok, W_DecreaseAmmo)
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)));
}
M_ARGV(4, float) = 0;
}
-
- return false;
}
MUTATOR_HOOKFUNCTION(ok, PlayerDamage_SplitHealthArmor)
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)
{
player.ok_lastwep = 0;
player.ok_pauseregen_finished = time + 2;
-
- return false;
}
void self_spawnfunc_weapon_hmg(entity this) { spawnfunc_weapon_hmg(this); }
return true;
}
}
-
- return false;
}
MUTATOR_HOOKFUNCTION(ok, FilterItem)
entity item = M_ARGV(0, entity);
if(item.ok_item)
- return false;
+ return;
switch(item.items)
{
start_items |= IT_UNLIMITED_WEAPON_AMMO;
start_weapons = warmup_start_weapons = ok_start_items;
-
- return false;
}
MUTATOR_HOOKFUNCTION(ok, BuildMutatorsString)
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.
item.movetype = MOVETYPE_FOLLOW;
item.aiment = wep; // attach the original weapon
item.SendEntity3 = func_null;
-
- return false;
}
#endif
{
cvar_settemp("sv_gravity", cvar_string("sv_gravity")); // settemp current gravity so it's restored on match end
}
-
- return false;
}
float gravity_delay;
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)
// kill detonate delay of rockets
proj.spawnshieldtime = time;
}
- return 0;
}
MUTATOR_HOOKFUNCTION(rocketflying, BuildMutatorsString)
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);
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
{
// nothing to remove
}
-
- return false;
}
const float MAX_STORAGE_ATTACHMENTS = 16;
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);
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();
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(
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);
});
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))
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;
}
}
}
sprint(player, "angles: ", vtos(player.angles), "\n");
*/
}
-
- return false;
}
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");
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")
{
superspec_msg("", "", player, "No active Shield\n", 1);
return true;
}
-
- return false;
#undef OPTIONINFO
}
entity player = M_ARGV(0, entity);
if(!IS_REAL_CLIENT(player))
- return false;
+ return;
string fn = "superspec-local.options";
float fh;
if (!_ISLOCAL(player))
{
if(player.crypto_idfp == "")
- return false;
+ return;
fn = sprintf("superspec-%s.options", uri_escape(player.crypto_idfp));
}
}
fclose(fh);
}
-
- return false;
}
MUTATOR_HOOKFUNCTION(superspec, PlayerDies)
superspec_Spectate(it, frag_attacker);
}
));
-
- return false;
}
MUTATOR_HOOKFUNCTION(superspec, ClientDisconnect)
player.touchexplode_time = it.touchexplode_time = time + 0.2;
}
));
-
- return false;
}
#endif
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)
// 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;
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)
if(!turret.team || turret.team == MAX_SHOT_DISTANCE)
turret.team = 5; // this gets reversed when match starts?
-
- return false;
}
MUTATOR_HOOKFUNCTION(as, VehicleSpawn)
{
// no assault warmups
warmup_stage = 0;
- return false;
}
MUTATOR_HOOKFUNCTION(as, OnEntityPreSpawn)
case "info_player_team4":
return true;
}
-
- return false;
}
// scoreboard setup
frag_target.respawn_flags = RESPAWN_SILENT;
if (!warmup_stage)
eliminatedPlayers.SendFlags |= 1;
- return 1;
+ return true;
}
MUTATOR_HOOKFUNCTION(ca, ClientDisconnect)
MUTATOR_HOOKFUNCTION(ca, ForbidPlayerScore_Clear)
{
- return 1;
+ return true;
}
MUTATOR_HOOKFUNCTION(ca, MakePlayerObserver)
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)
M_ARGV(4, float) = frag_damage;
M_ARGV(5, float) = frag_mirrordamage;
-
- return false;
}
MUTATOR_HOOKFUNCTION(ca, FilterItem)
if (autocvar_g_pickup_items <= 0)
return true;
-
- return false;
}
MUTATOR_HOOKFUNCTION(ca, PlayerDamage_SplitHealthArmor)
if (!autocvar_g_ca_spectate_enemies && client.caplayer)
if (DIFF_TEAM(targ, client))
return true;
-
- return false;
}
MUTATOR_HOOKFUNCTION(ca, SpectateNext)
targ = CA_SpectateNext(client, targ);
return true;
}
- return false;
}
MUTATOR_HOOKFUNCTION(ca, SpectatePrev)
}
// todo: add notification for when flag carrier needs help?
}
- return false;
}
MUTATOR_HOOKFUNCTION(ctf, PlayerDies)
ctf_Handle_Throw(frag_target, world, DROP_NORMAL);
tmp_entity.ctf_dropper = world;
}
-
- return false;
}
MUTATOR_HOOKFUNCTION(ctf, GiveFragsForKill)
entity player = M_ARGV(0, entity);
ctf_RemovePlayer(player);
- return false;
}
MUTATOR_HOOKFUNCTION(ctf, ClientDisconnect)
MUTATOR_HOOKFUNCTION(ctf, PlayerUseKey)
{
- if(MUTATOR_RETURNVALUE || gameover) { return false; }
+ if(MUTATOR_RETURNVALUE || gameover) { return; }
entity player = M_ARGV(0, entity);
}
return true;
}
-
- return false;
}
MUTATOR_HOOKFUNCTION(ctf, VehicleExit)
player.flagcarried.nodrawtoclient = world;
return true;
}
-
- return false;
}
MUTATOR_HOOKFUNCTION(ctf, AbortSpeedrun)
ctf_RespawnFlag(player.flagcarried);
return true;
}
-
- return false;
}
MUTATOR_HOOKFUNCTION(ctf, MatchEnd)
}
}
}
-
- return false;
}
MUTATOR_HOOKFUNCTION(ctf, HavocBot_ChooseRole)
superspec_msg("", "", player, "No active flag carrier\n", 1);
return true;
}
-
- return false;
}
MUTATOR_HOOKFUNCTION(ctf, DropSpecialItems)
if(frag_target.flagcarried)
ctf_Handle_Throw(frag_target, world, DROP_THROW);
-
- return false;
}
cvar_set("timelimit", ftos(race_timelimit));
cts_ScoreRules();
}
-
- return false;
}
MUTATOR_HOOKFUNCTION(cts, ClientConnect)
race_SendRankings(i, 0, 0, MSG_ONE);
}
}
-
- return false;
}
MUTATOR_HOOKFUNCTION(cts, MakePlayerObserver)
race_PreparePlayer(player);
player.race_checkpoint = -1;
-
- return false;
}
MUTATOR_HOOKFUNCTION(cts, PlayerSpawn)
player.race_respawn_spotref = spawn_spot;
player.race_place = 0;
-
- return false;
}
MUTATOR_HOOKFUNCTION(cts, PutClientInServer)
race_AbandonRaceCheck(player);
}
- return false;
}
MUTATOR_HOOKFUNCTION(cts, PlayerDies)
frag_target.respawn_flags |= RESPAWN_FORCE;
race_AbandonRaceCheck(frag_target);
- return false;
}
MUTATOR_HOOKFUNCTION(cts, HavocBot_ChooseRole)
if(item.classname == "droppedweapon")
return true;
-
- return false;
}
MUTATOR_HOOKFUNCTION(cts, PlayerDamage_Calculate)
frag_damage = 0;
M_ARGV(4, float) = frag_damage;
}
-
- return false;
}
MUTATOR_HOOKFUNCTION(cts, ForbidPlayerScore_Clear)
if(IS_REAL_CLIENT(it))
set_dom_state(it);
));
- return 1;
+ return true;
}
MUTATOR_HOOKFUNCTION(dom, PlayerSpawn)
player.player_blocked = 1;
else
player.player_blocked = 0;
- return false;
}
MUTATOR_HOOKFUNCTION(dom, ClientConnect)
entity player = M_ARGV(0, entity);
ft_RemovePlayer(player);
- return false;
}
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
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);
Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_FREEZETAG_FREEZE, frag_target.netname, frag_attacker.netname);
}
- return 1;
+ return true;
}
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();
freezetag_Freeze(player, world);
}
- return 1;
+ return true;
}
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)
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)
TeamScore_AddToTeam(frag_attacker.team, ST_INV_KILLS, +1);
}
}
-
- return false;
}
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)
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)
entity player = M_ARGV(0, entity);
player.bot_attack = false;
- return false;
}
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);
return true;
}
-
- return false;
}
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)
}
if(frag_target.ballcarried) { ka_DropEvent(frag_target); } // a player with the ball has died, drop it
- return false;
}
MUTATOR_HOOKFUNCTION(ka, GiveFragsForKill)
M_ARGV(4, float) = frag_damage;
M_ARGV(6, vector) = frag_force;
-
- return false;
}
MUTATOR_HOOKFUNCTION(ka, ClientDisconnect)
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)
// 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)
if(frag_target.ballcarried)
ka_DropEvent(frag_target);
-
- return false;
}
kh_Key_DropAll(frag_target, false);
else
kh_Key_DropAll(frag_target, true);
- return 0;
}
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)
return true;
}
}
- return false;
}
MUTATOR_HOOKFUNCTION(kh, HavocBot_ChooseRole)
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
{
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)
entity frag_target = M_ARGV(2, entity);
frag_target.respawn_flags |= RESPAWN_FORCE;
- return false;
}
void lms_RemovePlayer(entity player)
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)
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
cvar_set("timelimit", ftos(race_timelimit));
race_ScoreRules();
}
-
- return false;
}
MUTATOR_HOOKFUNCTION(rc, ClientConnect)
race_SendRankings(i, 0, 0, MSG_ONE);
}
}
-
- return false;
}
MUTATOR_HOOKFUNCTION(rc, MakePlayerObserver)
player.race_respawn_spotref = spawn_spot;
player.race_place = 0;
-
- return false;
}
MUTATOR_HOOKFUNCTION(rc, PutClientInServer)
race_AbandonRaceCheck(player);
}
- return false;
}
MUTATOR_HOOKFUNCTION(rc, PlayerDies)
frag_target.respawn_flags |= RESPAWN_FORCE;
race_AbandonRaceCheck(frag_target);
- return false;
}
MUTATOR_HOOKFUNCTION(rc, HavocBot_ChooseRole)
{
if(g_race_qualifying)
return true; // in qualifying, you don't lose score by observing
-
- return false;
}
MUTATOR_HOOKFUNCTION(rc, GetTeamCount, CBC_ORDER_EXCLUSIVE)
// announce remaining frags if not in qualifying mode
if(!g_race_qualifying)
return true;
-
- return false;
}
MUTATOR_HOOKFUNCTION(rc, GetRecords)
return true;
}
}
-
- return false;
}
MUTATOR_HOOKFUNCTION(rc, ReadLevelCvars)
{
if(g_race_qualifying == 2)
warmup_stage = 0;
- return false;
}
void race_Initialize()