]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix player run animation continuing after match ends, fix players able to aim their...
authorMario <mario@smbclan.net>
Fri, 24 Jun 2016 08:29:51 +0000 (18:29 +1000)
committerMario <mario@smbclan.net>
Fri, 24 Jun 2016 08:29:51 +0000 (18:29 +1000)
qcsrc/client/player_skeleton.qc
qcsrc/common/csqcmodel_settings.qh
qcsrc/lib/csqcmodel/cl_player.qc
qcsrc/server/g_world.qc

index c8abdc6f57b6cf7d62f20ae5c6288aae3397549f..85a798f3f427f39e122f7f6187161d4e00d859ec 100644 (file)
@@ -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)
index ff890afec629db9f70bf333cc0fbbc053659afc3..82662fc41a9639fb1aa9075a4b65cab7f9b35352 100644 (file)
@@ -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) \
index 0b0de75649aab42d97851711fca47dd1342c8bf8..fb68f368af16b2feceddca0fd91a13a7476a7c5f 100644 (file)
@@ -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);
index c959bafd0efabee4f3d41e7e818c6675d5799cbd..f2eb1d1186eb59f793c503e97f2333f23a5a5589 100644 (file)
@@ -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);