From 306a02204b47c5982cc809acc151539f2c8a2b2c Mon Sep 17 00:00:00 2001 From: Mark Olsen Date: Sun, 14 Oct 2007 00:54:29 +0000 Subject: [PATCH] Workaround for broken bot angles. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2742 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/server/sv_ents.c | 8 ++++---- engine/server/sv_phys.c | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/engine/server/sv_ents.c b/engine/server/sv_ents.c index 134d90531..a5bbc7eb1 100644 --- a/engine/server/sv_ents.c +++ b/engine/server/sv_ents.c @@ -1321,15 +1321,15 @@ void SV_WritePlayerToClient(sizebuf_t *msg, clstate_t *ent) else { memset(&cmd, 0, sizeof(cmd)); - cmd.angles[0] = ent->angles[0] * 65535/360.0f; - cmd.angles[1] = ent->angles[1] * 65535/360.0f; - cmd.angles[2] = ent->angles[2] * 65535/360.0f; + cmd.angles[0] = (int)(ent->angles[0] * 65535/360.0f); + cmd.angles[1] = (int)(ent->angles[1] * 65535/360.0f); + cmd.angles[2] = (int)(ent->angles[2] * 65535/360.0f); } if (ent->health <= 0) { // don't show the corpse looking around... cmd.angles[0] = 0; - cmd.angles[1] = ent->angles[1]*65535/360; + cmd.angles[1] = (int)(ent->angles[1]*65535/360); cmd.angles[2] = 0; } diff --git a/engine/server/sv_phys.c b/engine/server/sv_phys.c index b1e437783..3b741c839 100644 --- a/engine/server/sv_phys.c +++ b/engine/server/sv_phys.c @@ -2032,9 +2032,9 @@ qboolean SV_Physics (void) SV_PreRunCmd(); ucmd.msec = host_frametime*1000; - ucmd.angles[0] = (unsigned short)(sv_player->v->angles[0] * (65535/360.0f)); - ucmd.angles[1] = (unsigned short)(sv_player->v->angles[1] * (65535/360.0f)); - ucmd.angles[2] = (unsigned short)(sv_player->v->angles[2] * (65535/360.0f)); + ucmd.angles[0] = (int)(sv_player->v->angles[0] * (65535/360.0f)); + ucmd.angles[1] = (int)(sv_player->v->angles[1] * (65535/360.0f)); + ucmd.angles[2] = (int)(sv_player->v->angles[2] * (65535/360.0f)); ucmd.forwardmove = sv_player->xv->movement[0]; ucmd.sidemove = sv_player->xv->movement[1]; ucmd.upmove = sv_player->xv->movement[2];