Skip to content

Commit

Permalink
Merge MR 'Fix monsters that do not use MOVETYPE_STEP appearing choppy'
Browse files Browse the repository at this point in the history
See merge request https://gitlab.com/xonotic/darkplaces/-/merge_requests/154

Signed-off-by: bones_was_here <[email protected]>
  • Loading branch information
bones-was-here committed Aug 1, 2024
2 parents e0ae552 + 4f55c33 commit 5540eaf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions dpdefs/progsdefs.qc
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ float FL_FLY = 1;
float FL_SWIM = 2;
float FL_CLIENT = 8; // set for all client edicts
float FL_INWATER = 16; // for enter / leave water splash
float FL_MONSTER = 32;
float FL_MONSTER = 32; // movement is smoothed on the client side by step based interpolation
float FL_GODMODE = 64; // player cheat
float FL_NOTARGET = 128; // player cheat
float FL_ITEM = 256; // extra wide size for bonus items IF sv_legacy_bbox_expand is 1
Expand All @@ -247,7 +247,7 @@ float MOVETYPE_NONE = 0; // never moves
//float MOVETYPE_ANGLENOCLIP = 1;
//float MOVETYPE_ANGLECLIP = 2;
float MOVETYPE_WALK = 3; // players only
float MOVETYPE_STEP = 4; // discrete, not real time unless fall
float MOVETYPE_STEP = 4; // discrete, not real time unless fall, client side interpolates in steps
float MOVETYPE_FLY = 5;
float MOVETYPE_TOSS = 6; // gravity
float MOVETYPE_PUSH = 7; // no clip to world, push and crush
Expand Down
4 changes: 2 additions & 2 deletions server.h
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ typedef struct client_s
#define MOVETYPE_ANGLENOCLIP 1
#define MOVETYPE_ANGLECLIP 2
#define MOVETYPE_WALK 3 ///< gravity
#define MOVETYPE_STEP 4 ///< gravity, special edge handling
#define MOVETYPE_STEP 4 ///< gravity, special edge handling, special step based client side interpolation
#define MOVETYPE_FLY 5
#define MOVETYPE_TOSS 6 ///< gravity
#define MOVETYPE_PUSH 7 ///< no clip to world, push and crush
Expand Down Expand Up @@ -359,7 +359,7 @@ typedef struct client_s
#define FL_CONVEYOR 4
#define FL_CLIENT 8
#define FL_INWATER 16
#define FL_MONSTER 32
#define FL_MONSTER 32 ///< movement is smoothed on the client side by step based interpolation
#define FL_GODMODE 64
#define FL_NOTARGET 128
#define FL_ITEM 256
Expand Down
2 changes: 1 addition & 1 deletion sv_send.c
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ static qbool SV_PrepareEntityForSending (prvm_edict_t *ent, entity_state_t *cs,
if (f)
cs->effects |= ((unsigned int)f & 0xff) << 24;

if (PRVM_serveredictfloat(ent, movetype) == MOVETYPE_STEP)
if (PRVM_serveredictfloat(ent, movetype) == MOVETYPE_STEP || ((int)PRVM_serveredictfloat(ent, flags) & FL_MONSTER))
cs->flags |= RENDER_STEP;
if (cs->number != sv.writeentitiestoclient_cliententitynumber && (cs->effects & EF_LOWPRECISION) && cs->origin[0] >= -32768 && cs->origin[1] >= -32768 && cs->origin[2] >= -32768 && cs->origin[0] <= 32767 && cs->origin[1] <= 32767 && cs->origin[2] <= 32767)
cs->flags |= RENDER_LOWPRECISION;
Expand Down

0 comments on commit 5540eaf

Please sign in to comment.