void PutObserverInServer()
{
SELFPARAM();
- bool mutator_returnvalue = MUTATOR_CALLHOOK(MakePlayerObserver);
+ bool mutator_returnvalue = MUTATOR_CALLHOOK(MakePlayerObserver, this);
PlayerState_detach(this);
if (IS_PLAYER(this) && this.health >= 1) {
}
MUTATOR_CALLHOOK(FixPlayermodel, defaultmodel, defaultskin);
- defaultmodel = ret_string;
- defaultskin = ret_int;
+ defaultmodel = M_ARGV(0, string);
+ defaultskin = M_ARGV(1, int);
bool chmdl = false;
int oldskin;
Unfreeze(this);
- MUTATOR_CALLHOOK(PlayerSpawn, spot);
+ MUTATOR_CALLHOOK(PlayerSpawn, this, spot);
if (autocvar_spawn_debug)
{
}
float clientkilltime;
-void ClientKill_TeamChange (float targetteam) // 0 = don't change, -1 = auto, -2 = spec
-{SELFPARAM();
+void ClientKill_TeamChange (entity this, float targetteam) // 0 = don't change, -1 = auto, -2 = spec
+{
float killtime;
float starttime;
entity e;
if(killtime <= 0 || !IS_PLAYER(this) || IS_DEAD(this))
{
- ClientKill_Now();
+ WITHSELF(this, ClientKill_Now());
}
else
{
if(this.player_blocked) return;
if(STAT(FROZEN, this)) return;
- ClientKill_TeamChange(0);
+ ClientKill_TeamChange(this, 0);
}
void FixClientCvars(entity e)
sv_notice_join(this);
FOREACH_ENTITY_FLOAT(init_for_player_needed, true, {
- WITHSELF(it, it.init_for_player(it));
+ it.init_for_player(it, this);
});
MUTATOR_CALLHOOK(ClientConnect, this);
Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_QUIT_DISCONNECT, this.netname);
- MUTATOR_CALLHOOK(ClientDisconnect);
+ MUTATOR_CALLHOOK(ClientDisconnect, this);
ClientState_detach(this);
if (this.chatbubbleentity) remove(this.chatbubbleentity);
if (this.killindicator) remove(this.killindicator);
- WaypointSprite_PlayerGone();
+ WaypointSprite_PlayerGone(this);
bot_relinkplayerlist();
zoomstate_set = true;
}
-void GetPressedKeys()
+void GetPressedKeys(entity this)
{
- SELFPARAM();
- MUTATOR_CALLHOOK(GetPressedKeys);
+ MUTATOR_CALLHOOK(GetPressedKeys, this);
int keys = this.pressedkeys;
keys = BITSET(keys, KEY_FORWARD, this.movement.x > 0);
keys = BITSET(keys, KEY_BACKWARD, this.movement.x < 0);
{SELFPARAM();
if(MUTATOR_CALLHOOK(SpectateSet, this, pl))
return false;
- pl = spec_player;
+ pl = M_ARGV(1, entity);
SetSpectatee(this, pl);
return SpectateSet();
other = find(this.enemy, classname, STR_PLAYER);
if (MUTATOR_CALLHOOK(SpectateNext, this, other))
- other = spec_player;
+ other = M_ARGV(1, entity);
else if (!other)
other = find(other, classname, STR_PLAYER);
switch (MUTATOR_CALLHOOK(SpectatePrev, this, other, first))
{
case MUT_SPECPREV_FOUND:
- other = spec_player;
+ other = M_ARGV(1, entity);
break;
case MUT_SPECPREV_RETURN:
- other = spec_player;
+ other = M_ARGV(1, entity);
return true;
case MUT_SPECPREV_CONTINUE:
default:
}
// a use key was pressed; call handlers
- MUTATOR_CALLHOOK(PlayerUseKey);
+ MUTATOR_CALLHOOK(PlayerUseKey, this);
}
Unfreeze(this);
}
- MUTATOR_CALLHOOK(PlayerPreThink);
+ MUTATOR_CALLHOOK(PlayerPreThink, this);
if(autocvar_g_vehicles_enter)
if(time > this.last_vehiclecheck)
if (frametime) player_anim();
// secret status
- secrets_setstatus();
+ secrets_setstatus(this);
// monsters status
monsters_setstatus(this);
UpdateChatBubble();
if (this.impulse) ImpulseCommands(this);
if (intermission_running) return; // intermission or finale
- GetPressedKeys();
+ GetPressedKeys(this);
}
if (this.waypointsprite_attachedforcarrier) {
WaypointSprite_UpdateHealth(this.waypointsprite_attachedforcarrier, '1 0 0' * v);
}
- playerdemo_write();
+ playerdemo_write(this);
CSQCMODEL_AUTOUPDATE(this);
}