entity spot;
self.hud = HUD_NORMAL;
- if(IS_PLAYER(self)) { pointparticles(particleeffectnum("spawn_event_neutral"), self.origin, '0 0 0', 1); }
+ if(IS_PLAYER(self)) { Send_Effect("spawn_event_neutral", self.origin, '0 0 0', 1); }
spot = SelectSpawnPoint (true);
if(!spot)
if(IS_REAL_CLIENT(self))
{
- Item_ItemsTime_Get(self);
+ Item_ItemsTime_SetTimesForPlayer(self);
msg_entity = self;
WriteByte(MSG_ONE, SVC_SETVIEW);
WriteEntity(MSG_ONE, self);
if(self.killcount != -666)
{
Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_QUIT_SPECTATE, self.netname);
- if(autocvar_g_chat_nospectators == 1 || (cvar("g_warmup") && !(warmup_stage || gameover) && autocvar_g_chat_nospectators == 2))
+ if(!intermission_running)
+ if(autocvar_g_chat_nospectators == 1 || (!(warmup_stage || gameover) && autocvar_g_chat_nospectators == 2))
Send_Notification(NOTIF_ONE_ONLY, self, MSG_INFO, INFO_CHAT_NOSPECTATORS);
if(self.just_joined == false) {
// reset player keys
self.itemkeys = 0;
- MUTATOR_CALLHOOK(PutClientInServer);
+ MUTATOR_CALLHOOK(PutClientInServer, self);
if(gameover)
self.classname = "observer";
self.superweapons_finished = 0;
if(!warmup_stage)
- Item_ItemsTime_ResetForPlayer(self);
+ Item_ItemsTime_ResetTimesForPlayer(self);
if(g_weaponarena_random) // WEAPONTODO: more stuff that should be in a mutator. also: rename those cvars
{
Unfreeze(self);
- spawn_spot = spot;
- MUTATOR_CALLHOOK(PlayerSpawn);
+ MUTATOR_CALLHOOK(PlayerSpawn, spot);
if(autocvar_spawn_debug)
{
self = oldself;
}
- MUTATOR_CALLHOOK(ClientConnect);
+ MUTATOR_CALLHOOK(ClientConnect, self);
}
/*
=============
PlayerStats_GameReport_FinalizePlayer(self);
- if(IS_PLAYER(self)) { pointparticles(particleeffectnum("spawn_event_neutral"), self.origin, '0 0 0', 1); }
+ if(IS_PLAYER(self)) { Send_Effect("spawn_event_neutral", self.origin, '0 0 0', 1); }
CheatShutdownClient();
self.velocity = '0 0 1' * autocvar_g_respawn_ghosts_speed;
self.avelocity = randomvec() * autocvar_g_respawn_ghosts_speed * 3 - randomvec() * autocvar_g_respawn_ghosts_speed * 3;
self.effects |= CSQCMODEL_EF_RESPAWNGHOST;
- pointparticles(particleeffectnum("respawn_ghost"), self.origin, '0 0 0', 1);
+ Send_Effect("respawn_ghost", self.origin, '0 0 0', 1);
if(autocvar_g_respawn_ghosts_maxtime)
SUB_SetFade (self, time + autocvar_g_respawn_ghosts_maxtime / 2 + random () * (autocvar_g_respawn_ghosts_maxtime - autocvar_g_respawn_ghosts_maxtime / 2), 1.5);
}
void player_powerups (void)
{
// add a way to see what the items were BEFORE all of these checks for the mutator hook
- olditems = self.items;
+ int items_prev = self.items;
if((self.items & IT_USING_JETPACK) && !self.deadflag && !gameover)
self.modelflags |= MF_ROCKET;
if (time < self.spawnshieldtime)
self.effects = self.effects | (EF_ADDITIVE | EF_FULLBRIGHT);
- MUTATOR_CALLHOOK(PlayerPowerups);
+ MUTATOR_CALLHOOK(PlayerPowerups, self, items_prev);
}
float CalcRegen(float current, float stable, float regenfactor, float regenframetime)
{
float max_mod, regen_mod, rot_mod, limit_mod;
max_mod = regen_mod = rot_mod = limit_mod = 1;
- regen_mod_max = max_mod;
- regen_mod_regen = regen_mod;
- regen_mod_rot = rot_mod;
- regen_mod_limit = limit_mod;
- if(!MUTATOR_CALLHOOK(PlayerRegen))
+ if(!MUTATOR_CALLHOOK(PlayerRegen, max_mod, regen_mod, rot_mod, limit_mod))
if(!self.frozen)
{
float minh, mina, maxh, maxa, limith, limita;
*/
void SpectateCopy(entity spectatee) {
- other = spectatee;
- MUTATOR_CALLHOOK(SpectateCopy);
+ MUTATOR_CALLHOOK(SpectateCopy, spectatee, self);
self.armortype = spectatee.armortype;
self.armorvalue = spectatee.armorvalue;
self.ammo_cells = spectatee.ammo_cells;
self.stat_allow_oldvortexbeam = autocvar_g_allow_oldvortexbeam;
self.stat_leadlimit = autocvar_leadlimit;
+ self.weaponsinmap = weaponsInMap;
+
if(frametime)
{
// physics frames: update anticheat stuff