]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote-tracking branch 'origin/Mario/gameover_fixes'
authorMario <mario@smbclan.net>
Sun, 3 Jul 2016 23:16:41 +0000 (09:16 +1000)
committerMario <mario@smbclan.net>
Sun, 3 Jul 2016 23:16:41 +0000 (09:16 +1000)
defaultXonotic.cfg
qcsrc/client/player_skeleton.qc
qcsrc/common/csqcmodel_settings.qh
qcsrc/lib/csqcmodel/cl_player.qc
qcsrc/server/g_world.qc

index 3b3e48b620dfb44c67d77f686452699ac5693dc0..7af1e09ebeebf6b9ec7f44dd8269800e96d47566 100644 (file)
@@ -1197,6 +1197,7 @@ seta cl_forcemyplayermodel "" "set to the model file name you want to show yours
 seta cl_forcemyplayerskin 0 "set to the skin number you want to show yourself as (does not affect how enemies look with cl_forceplayermodels)"
 seta cl_forcemyplayercolors 0 "set to the color value (encoding is same as _cl_color) for your own player model (ignored in teamplay; does not affect how enemies look with cl_forceplayermodels)"
 seta cl_movement_errorcompensation 1 "try to compensate for prediction errors and reduce preceived lag"
+seta cl_movement_intermissionrunning 0 "keep velocity after the match ends, players may appear to continue running while stationary"
 
 // campaign internal, set when loading a campaign map1G
 set _campaign_index ""
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..3b4c5fe69024ee713d9a8afa83c8c3a4d214213a 100644 (file)
@@ -35,6 +35,7 @@
 #include <common/viewloc.qh>
 
 float autocvar_cl_movement_errorcompensation = 0;
+bool autocvar_cl_movement_intermissionrunning = false;
 
 // engine stuff
 float pmove_onground; // weird engine flag we shouldn't really use but have to for now
@@ -254,7 +255,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 && autocvar_cl_movement_intermissionrunning) ? '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);