From 6691a6c318dc92ece54b9608456e6aa271131871 Mon Sep 17 00:00:00 2001 From: divverent Date: Sun, 15 Mar 2009 20:41:06 +0000 Subject: [PATCH] force 32bit origin for player entiites (TODO: possibly for bmodels too?) to get better prediction git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8809 d7cf8633-e32d-0410-b094-e92efae38249 --- protocol.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/protocol.c b/protocol.c index 6d26ecaf..3bbaa445 100644 --- a/protocol.c +++ b/protocol.c @@ -2011,6 +2011,7 @@ static int EntityState5_Priority(entityframe5_database_t *d, int stateindex) void EntityState5_WriteUpdate(int number, const entity_state_t *s, int changedbits, sizebuf_t *msg) { unsigned int bits = 0; + //dp_model_t *model; ENTITYSIZEPROFILING_START(msg, s->number); prvm_eval_t *val; @@ -2023,7 +2024,8 @@ void EntityState5_WriteUpdate(int number, const entity_state_t *s, int changedbi else { bits = changedbits; - if ((bits & E5_ORIGIN) && (s->exteriormodelforclient || s->tagentity || s->viewmodelforclient || s->origin[0] <= -4096.0625 || s->origin[0] >= 4095.9375 || s->origin[1] <= -4096.0625 || s->origin[1] >= 4095.9375 || s->origin[2] <= -4096.0625 || s->origin[2] >= 4095.9375)) + if ((bits & E5_ORIGIN) && (s->exteriormodelforclient || s->tagentity || s->viewmodelforclient || (s->number >= 1 && s->number <= svs.maxclients) || s->origin[0] <= -4096.0625 || s->origin[0] >= 4095.9375 || s->origin[1] <= -4096.0625 || s->origin[1] >= 4095.9375 || s->origin[2] <= -4096.0625 || s->origin[2] >= 4095.9375)) + // maybe also add: ((model = sv.models[s->modelindex]) != NULL && model->name[0] == '*') bits |= E5_ORIGIN32; // possible values: // negative origin: -- 2.39.2