From f7c8db9b7f41536dfa9b27e037ee93d506ab59ba Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 24 Jun 2016 18:29:51 +1000 Subject: [PATCH] Fix player run animation continuing after match ends, fix players able to aim their playermodel up and down after match ends, fix last player to die not actually appearing to die --- qcsrc/client/player_skeleton.qc | 2 +- qcsrc/common/csqcmodel_settings.qh | 8 +++++++- qcsrc/lib/csqcmodel/cl_player.qc | 2 +- qcsrc/server/g_world.qc | 1 + 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/qcsrc/client/player_skeleton.qc b/qcsrc/client/player_skeleton.qc index c8abdc6f5..85a798f3f 100644 --- a/qcsrc/client/player_skeleton.qc +++ b/qcsrc/client/player_skeleton.qc @@ -178,7 +178,7 @@ void skeleton_from_frames(entity e, bool is_dead) if(!is_dead) { - if(e == csqcplayer) + if(e == csqcplayer && !intermission) e.v_angle_x = input_angles_x; int i; for(i = 0; i < MAX_AIM_BONES; ++i) diff --git a/qcsrc/common/csqcmodel_settings.qh b/qcsrc/common/csqcmodel_settings.qh index ff890afec..82662fc41 100644 --- a/qcsrc/common/csqcmodel_settings.qh +++ b/qcsrc/common/csqcmodel_settings.qh @@ -21,6 +21,8 @@ .float tag_networkviewloc; # define MOVETYPE_NAME move_movetype + +# define GAMEOVER intermission #else # define TAG_ENTITY_NAME tag_entity # define TAG_ENTITY_TYPE entity @@ -29,6 +31,8 @@ # define TAG_VIEWLOC_TYPE entity # define MOVETYPE_NAME movetype + +# define GAMEOVER gameover #endif // new fields @@ -62,7 +66,9 @@ CSQCMODEL_PROPERTY(BIT(9), float, ReadChar, WriteChar, anim_upper_action) \ CSQCMODEL_PROPERTY(BIT(9), float, ReadApproxPastTime, WriteApproxPastTime, anim_upper_time) \ CSQCMODEL_ENDIF \ - CSQCMODEL_PROPERTY(BIT(10), float, ReadAngle, WriteAngle, v_angle_x) \ + CSQCMODEL_IF(!GAMEOVER) \ + CSQCMODEL_PROPERTY(BIT(10), float, ReadAngle, WriteAngle, v_angle_x) \ + CSQCMODEL_ENDIF \ CSQCMODEL_PROPERTY(BIT(11), int, ReadByte, WriteByte, traileffect) \ CSQCMODEL_PROPERTY_SCALED(BIT(12), float, ReadByte, WriteByte, scale, 16, 0, 255) \ CSQCMODEL_PROPERTY(BIT(13), int, ReadInt24_t, WriteInt24_t, dphitcontentsmask) \ diff --git a/qcsrc/lib/csqcmodel/cl_player.qc b/qcsrc/lib/csqcmodel/cl_player.qc index 0b0de7564..fb68f368a 100644 --- a/qcsrc/lib/csqcmodel/cl_player.qc +++ b/qcsrc/lib/csqcmodel/cl_player.qc @@ -254,7 +254,7 @@ void CSQCPlayer_SetViewLocation() /** Called once per CSQC_UpdateView() */ void CSQCPlayer_SetCamera() { - const vector v0 = pmove_vel; // TRICK: pmove_vel is set by the engine when we get here. No need to network velocity + const vector v0 = ((intermission) ? '0 0 0' : pmove_vel); // TRICK: pmove_vel is set by the engine when we get here. No need to network velocity const float vh = STAT(VIEWHEIGHT); const vector pl_viewofs = STAT(PL_VIEW_OFS, NULL); const vector pl_viewofs_crouch = STAT(PL_CROUCH_VIEW_OFS, NULL); diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index c959bafd0..f2eb1d118 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -1299,6 +1299,7 @@ When the player presses attack or jump, change to the next level void IntermissionThink(entity this) { FixIntermissionClient(this); + CSQCMODEL_AUTOUPDATE(this); // PlayerPostThink returns before calling this during intermission, so run it here float server_screenshot = (autocvar_sv_autoscreenshot && this.cvar_cl_autoscreenshot); float client_screenshot = (this.cvar_cl_autoscreenshot == 2); -- 2.39.2