this.angles_z = 0;
this.fixangle = true;
// offset it so that the spectator spawns higher off the ground, looks better this way
- setorigin(this, spot.origin + STAT(PL_VIEW_OFS, NULL));
+ setorigin(this, spot.origin + STAT(PL_VIEW_OFS, this));
this.prevorigin = this.origin;
if (IS_REAL_CLIENT(this))
{
FixPlayermodel(this);
}
setmodel(this, MDL_Null);
- setsize(this, STAT(PL_CROUCH_MIN, NULL), STAT(PL_CROUCH_MAX, NULL));
+ setsize(this, STAT(PL_CROUCH_MIN, this), STAT(PL_CROUCH_MAX, this));
this.view_ofs = '0 0 0';
}
if (this.killcount != FRAGS_SPECTATOR)
{
Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_QUIT_SPECTATE, this.netname);
- if(!intermission_running)
- if(autocvar_g_chat_nospectators == 1 || (!(warmup_stage || gameover) && autocvar_g_chat_nospectators == 2))
+ if(!gameover)
+ if(autocvar_g_chat_nospectators == 1 || (!warmup_stage && autocvar_g_chat_nospectators == 2))
Send_Notification(NOTIF_ONE_ONLY, this, MSG_INFO, INFO_CHAT_NOSPECTATORS);
if(this.just_joined == false) {
this.weaponmodel = "";
for (int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
{
- if(!this.weaponentities[slot])
- continue; // first load
- this.weaponentities[slot].hook_time = 0;
- this.weaponentities[slot].weaponname = "";
this.weaponentities[slot] = NULL;
}
this.exteriorweaponentity = NULL;
this.(weaponentity).cnt = -1;
}
+ MUTATOR_CALLHOOK(PlayerWeaponSelect, this);
+
if (!warmup_stage && !this.alivetime)
this.alivetime = time;
if (IS_PLAYER(this)) {
CheckRules_Player(this);
- if (intermission_running) {
- IntermissionThink(this);
+ if (gameover || intermission_running) {
+ if(intermission_running)
+ IntermissionThink(this);
return;
}
this.prevorigin = this.origin;
+ bool have_hook = false;
+ for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
+ {
+ .entity weaponentity = weaponentities[slot];
+ if(this.(weaponentity).hook.state)
+ {
+ have_hook = true;
+ break;
+ }
+ }
bool do_crouch = PHYS_INPUT_BUTTON_CROUCH(this);
- if (this.hook.state) {
+ if (have_hook) {
do_crouch = false;
} else if (this.waterlevel >= WATERLEVEL_SWIMMING) {
do_crouch = false;
this.dmg_team = max(0, this.dmg_team - autocvar_g_teamdamage_resetspeed * frametime);
}
- else if (gameover) {
- if (intermission_running) IntermissionThink(this);
+ else if (gameover || intermission_running) {
+ if(intermission_running)
+ IntermissionThink(this);
return;
}
else if (IS_OBSERVER(this)) {
CheatFrame(this);
//CheckPlayerJump();
+ if (gameover)
+ {
+ this.solid = SOLID_NOT;
+ this.takedamage = DAMAGE_NO;
+ set_movetype(this, MOVETYPE_NONE);
+ }
if (IS_PLAYER(this)) {
DrownPlayer(this);
CheckRules_Player(this);
UpdateChatBubble(this);
if (this.impulse) ImpulseCommands(this);
- if (intermission_running) return; // intermission or finale
+ if (gameover)
+ {
+ CSQCMODEL_AUTOUPDATE(this);
+ return;
+ }
GetPressedKeys(this);
}