NX/VITA: Restored Weapon Kickback

This commit is contained in:
cypress 2023-09-03 11:29:29 -04:00
parent e6827d3140
commit 0b44621e33
3 changed files with 8 additions and 7 deletions

View file

@ -572,7 +572,7 @@ void CL_SendMove (const usercmd_t *cmd)
int bits; int bits;
sizebuf_t buf; sizebuf_t buf;
byte data[128]; byte data[128];
vec3_t tempv;
buf.maxsize = 128; buf.maxsize = 128;
buf.cursize = 0; buf.cursize = 0;
buf.data = data; buf.data = data;
@ -628,12 +628,13 @@ void CL_SendMove (const usercmd_t *cmd)
MSG_WriteFloat (&buf, cl.mtime[0]); // so server can get ping times MSG_WriteFloat (&buf, cl.mtime[0]); // so server can get ping times
VectorAdd(cl.gun_kick, cl.viewangles, tempv);
for (i=0 ; i<3 ; i++) for (i=0 ; i<3 ; i++)
//johnfitz -- 16-bit angles for PROTOCOL_FITZQUAKE //johnfitz -- 16-bit angles for PROTOCOL_FITZQUAKE
if (cl.protocol == PROTOCOL_NETQUAKE) if (cl.protocol == PROTOCOL_NETQUAKE)
MSG_WriteAngle (&buf, cl.viewangles[i], cl.protocolflags); MSG_WriteAngle (&buf, tempv[i], cl.protocolflags);
else else
MSG_WriteAngle16 (&buf, cl.viewangles[i], cl.protocolflags); MSG_WriteAngle16 (&buf, tempv[i], cl.protocolflags);
//johnfitz //johnfitz
MSG_WriteShort (&buf, cmd->forwardmove); MSG_WriteShort (&buf, cmd->forwardmove);

View file

@ -1180,9 +1180,9 @@ void CL_ParseWeaponFire (void)
return_time = (double)6/MSG_ReadLong (); return_time = (double)6/MSG_ReadLong ();
crosshair_spread_time = return_time + sv.time; crosshair_spread_time = return_time + sv.time;
kick[0] = MSG_ReadCoord (cl.protocolflags)/5; kick[0] = (float)(MSG_ReadCoord (cl.protocolflags)/3.75f);
kick[1] = MSG_ReadCoord (cl.protocolflags)/5; kick[1] = (float)(MSG_ReadCoord (cl.protocolflags)/3.75f);
kick[2] = MSG_ReadCoord (cl.protocolflags)/5; kick[2] = (float)(MSG_ReadCoord (cl.protocolflags)/3.75f);
cl.gun_kick[0] += kick[0]; cl.gun_kick[0] += kick[0];
cl.gun_kick[1] += kick[1]; cl.gun_kick[1] += kick[1];

View file

@ -933,7 +933,7 @@ void DropRecoilKick (void)
len = VectorNormalize (cl.gun_kick); len = VectorNormalize (cl.gun_kick);
//Con_Printf ("len = %f\n",len); //Con_Printf ("len = %f\n",len);
len = len - 5*host_frametime; len = len - 3.5f*host_frametime;
if (len < 0) if (len < 0)
len = 0; len = 0;
VectorScale (cl.gun_kick, len, cl.gun_kick); VectorScale (cl.gun_kick, len, cl.gun_kick);