X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fclient.qc;h=d4a3e9febfa359aef00e37995c6b56961d0a8a25;hp=f9c4662c366f11c5a7be7829e2e92ede2958c0e3;hb=c5fcf672c473edef7139d4250398184b8ae17224;hpb=b875911644402f13894f0bad68536bfde0bc3201 diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index f9c4662c36..d4a3e9febf 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -236,7 +236,7 @@ void PutObserverInServer(entity this) 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)) { @@ -253,7 +253,7 @@ void PutObserverInServer(entity 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'; } @@ -284,8 +284,8 @@ void PutObserverInServer(entity this) 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) { @@ -339,6 +339,7 @@ void PutObserverInServer(entity this) this.hook_time = 0; this.deadflag = DEAD_NO; this.crouch = false; + this.revive_progress = 0; this.revival_time = 0; this.items = 0; @@ -616,6 +617,7 @@ void PutClientInServer(entity this) 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; @@ -1190,12 +1192,6 @@ void ClientConnect(entity this) 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"); } @@ -1222,6 +1218,15 @@ void ClientConnect(entity this) }); 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)); + } + } } /* ============= @@ -2315,8 +2320,9 @@ void PlayerPreThink (entity this) if (IS_PLAYER(this)) { CheckRules_Player(this); - if (intermission_running) { - IntermissionThink(this); + if (gameover || intermission_running) { + if(intermission_running) + IntermissionThink(this); return; } @@ -2467,8 +2473,9 @@ void PlayerPreThink (entity this) 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)) { @@ -2610,13 +2617,23 @@ void PlayerPostThink (entity 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); }