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(!game_stopped)
+ 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.nextthink = 0;
this.deadflag = DEAD_NO;
this.crouch = false;
+ this.revive_progress = 0;
this.revival_time = 0;
this.items = 0;
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;
WriteByte(MSG_ONE, SVC_SETVIEW);
WriteEntity(MSG_ONE, this);
}
- if (gameover) {
+ if (game_stopped)
TRANSMUTE(Observer, this);
- }
SetSpectatee(this, NULL);
this.strength_finished = 0;
this.invincible_finished = 0;
this.fire_endtime = -1;
+ this.revive_progress = 0;
this.revival_time = 0;
this.air_finished = time + 12;
this.(weaponentity).cnt = -1;
}
+ MUTATOR_CALLHOOK(PlayerWeaponSelect, this);
+
if (!warmup_stage && !this.alivetime)
this.alivetime = time;
}
void KillIndicator_Think(entity this)
{
- if (gameover)
+ if (game_stopped)
{
this.owner.killindicator = NULL;
delete(this);
float killtime;
float starttime;
- if (gameover)
+ if (game_stopped)
return;
killtime = autocvar_g_balance_kill_delay;
void ClientKill (entity this)
{
- if(gameover) return;
+ if(game_stopped) return;
if(this.player_blocked) return;
if(STAT(FROZEN, this)) return;
if (IS_REAL_CLIENT(this))
{
- if (!autocvar_g_campaign)
- {
- this.motd_actived_time = -1;
- Send_Notification(NOTIF_ONE_ONLY, this, MSG_CENTER, CENTER_MOTD, getwelcomemessage(this));
- }
-
if (g_weaponarena_weapons == WEPSET(TUBA))
stuffcmd(this, "cl_cmd settemp chase_active 1\n");
}
});
MUTATOR_CALLHOOK(ClientConnect, this);
+
+ if (IS_REAL_CLIENT(this))
+ {
+ if (!autocvar_g_campaign && !IS_PLAYER(this))
+ {
+ this.motd_actived_time = -1;
+ Send_Notification(NOTIF_ONE_ONLY, this, MSG_CENTER, CENTER_MOTD, getwelcomemessage(this));
+ }
+ }
}
/*
=============
// add a way to see what the items were BEFORE all of these checks for the mutator hook
int items_prev = this.items;
- if((this.items & IT_USING_JETPACK) && !IS_DEAD(this) && !gameover)
+ if((this.items & IT_USING_JETPACK) && !IS_DEAD(this) && !game_stopped)
this.modelflags |= MF_ROCKET;
else
this.modelflags &= ~MF_ROCKET;
if(this.vehicle)
{
- if(!gameover)
+ if(!game_stopped)
{
vehicles_exit(this.vehicle, VHEF_NORMAL);
return;
{
if(!STAT(FROZEN, this))
if(!IS_DEAD(this))
- if(!gameover)
+ if(!game_stopped)
{
entity head, closest_target = NULL;
head = WarpZone_FindRadius(this.origin, autocvar_g_vehicles_enter_radius, true);
MUTATOR_CALLHOOK(PlayerPreThink, this);
- if(autocvar_g_vehicles_enter && (time > this.last_vehiclecheck) && !gameover && !this.vehicle)
+ if(autocvar_g_vehicles_enter && (time > this.last_vehiclecheck) && !game_stopped && !this.vehicle)
if(IS_PLAYER(this) && !STAT(FROZEN, this) && !IS_DEAD(this))
{
FOREACH_ENTITY_RADIUS(this.origin, autocvar_g_vehicles_enter_radius, IS_VEHICLE(it),
if (IS_PLAYER(this)) {
CheckRules_Player(this);
- if (intermission_running) {
- IntermissionThink(this);
+ if (game_stopped || 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 (game_stopped || intermission_running) {
+ if(intermission_running)
+ IntermissionThink(this);
return;
}
else if (IS_OBSERVER(this)) {
CheatFrame(this);
//CheckPlayerJump();
+ if (game_stopped)
+ {
+ 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 (game_stopped)
+ {
+ CSQCMODEL_AUTOUPDATE(this);
+ return;
+ }
GetPressedKeys(this);
}