From: Mario Date: Mon, 3 Aug 2020 11:25:38 +0000 (+1000) Subject: Network the ground entity of the player for the sake of disabling stair smoothing... X-Git-Tag: xonotic-v0.8.5~787 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7a19dd740b86699b7e2e40ab86f6c05d25babc98;p=xonotic%2Fxonotic-data.pk3dir.git Network the ground entity of the player for the sake of disabling stair smoothing when the player is standing on a server-side object, fixes #2440 --- diff --git a/qcsrc/common/csqcmodel_settings.qh b/qcsrc/common/csqcmodel_settings.qh index f342bdde7..503cc1f22 100644 --- a/qcsrc/common/csqcmodel_settings.qh +++ b/qcsrc/common/csqcmodel_settings.qh @@ -21,6 +21,10 @@ # define ALPHA m_alpha .float m_alpha; + +# define GROUNDENTITY_NAME ground_networkentity +# define GROUNDENTITY_TYPE float +.float ground_networkentity; #else # define TAG_ENTITY_NAME tag_entity # define TAG_ENTITY_TYPE entity @@ -29,6 +33,9 @@ # define TAG_VIEWLOC_TYPE entity # define ALPHA alpha + +# define GROUNDENTITY_NAME groundentity +# define GROUNDENTITY_TYPE entity #endif // add properties you want networked to CSQC here @@ -66,6 +73,9 @@ CSQCMODEL_PROPERTY(BIT(14), TAG_VIEWLOC_TYPE, ReadShort, WriteEntity, TAG_VIEWLOC_NAME) \ CSQCMODEL_PROPERTY(BIT(16), int, ReadByte, WriteByte, multijump_count) \ CSQCMODEL_PROPERTY(BIT(16), int, ReadByte, WriteByte, move_movetype) \ + CSQCMODEL_IF(isplayer) \ + CSQCMODEL_PROPERTY(BIT(17), GROUNDENTITY_TYPE, ReadShort, WriteEntity, GROUNDENTITY_NAME) \ + CSQCMODEL_ENDIF \ CSQCMODEL_PROPERTY(BIT(17), int, ReadByte, WriteByte, clipgroup) // TODO get rid of colormod/glowmod here; also get rid of some useless properties on non-players that only exist for CopyBody diff --git a/qcsrc/lib/csqcmodel/cl_player.qc b/qcsrc/lib/csqcmodel/cl_player.qc index ef2ca0b9f..d8ea2a070 100644 --- a/qcsrc/lib/csqcmodel/cl_player.qc +++ b/qcsrc/lib/csqcmodel/cl_player.qc @@ -219,7 +219,7 @@ vector CSQCPlayer_ApplySmoothing(entity this, vector v) float smoothtime = bound(0, time - smooth_prevtime, 0.1); smooth_prevtime = max(smooth_prevtime, drawtime); // drawtime is the previous frame's time at this point - if(this.csqcmodel_teleported || !(this.pmove_flags & PMF_ONGROUND) || autocvar_cl_stairsmoothspeed <= 0) + if(this.csqcmodel_teleported || !(this.pmove_flags & PMF_ONGROUND) || autocvar_cl_stairsmoothspeed <= 0 || this.ground_networkentity) stairsmoothz = v.z; else {