mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 22:51:57 +00:00
make sure clients always know their own velocity. this is required for cl_bob, and other things I guess.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4583 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
9a38addfaf
commit
964c8899b0
1 changed files with 9 additions and 0 deletions
|
@ -1182,6 +1182,9 @@ void SVFTE_EmitPacketEntities(client_t *client, packet_entities_t *to, sizebuf_t
|
||||||
if (client->pendingentbits[j] & UF_REMOVE)
|
if (client->pendingentbits[j] & UF_REMOVE)
|
||||||
client->pendingentbits[j] = (client->pendingentbits[j] & ~UF_REMOVE) | UF_RESET2;
|
client->pendingentbits[j] = (client->pendingentbits[j] & ~UF_REMOVE) | UF_RESET2;
|
||||||
client->pendingentbits[j] |= SVFTE_DeltaCalcBits(o, n);
|
client->pendingentbits[j] |= SVFTE_DeltaCalcBits(o, n);
|
||||||
|
//even if prediction is disabled, we want to force velocity info to be sent for the local player. This is used by view bob and things.
|
||||||
|
if (j == client->edict->entnum && (n->u.q1.velocity[0] || n->u.q1.velocity[1] || n->u.q1.velocity[2]))
|
||||||
|
client->pendingentbits[j] |= UF_PREDINFO;
|
||||||
}
|
}
|
||||||
*o = *n;
|
*o = *n;
|
||||||
j++;
|
j++;
|
||||||
|
@ -2850,6 +2853,12 @@ void SV_Snapshot_BuildStateQ1(entity_state_t *state, edict_t *ent, client_t *cli
|
||||||
state->u.q1.velocity[1] = ent->v->velocity[1] * 8;
|
state->u.q1.velocity[1] = ent->v->velocity[1] * 8;
|
||||||
state->u.q1.velocity[2] = ent->v->velocity[2] * 8;
|
state->u.q1.velocity[2] = ent->v->velocity[2] * 8;
|
||||||
}
|
}
|
||||||
|
else if (ent == cl->edict)
|
||||||
|
{
|
||||||
|
state->u.q1.velocity[0] = ent->v->velocity[0] * 8;
|
||||||
|
state->u.q1.velocity[1] = ent->v->velocity[1] * 8;
|
||||||
|
state->u.q1.velocity[2] = ent->v->velocity[2] * 8;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (client && client->edict && (ent->v->owner == client->edict->entnum))
|
if (client && client->edict && (ent->v->owner == client->edict->entnum))
|
||||||
|
|
Loading…
Reference in a new issue