mirror of
https://github.com/DrBeef/Quake2Quest.git
synced 2025-03-01 14:40:52 +00:00
Fixed laser lagging behind during movement
This commit is contained in:
parent
3f79287af5
commit
f664a51977
3 changed files with 6 additions and 4 deletions
|
@ -800,6 +800,8 @@ CL_AddViewWeapon(player_state_t *ps, player_state_t *ops)
|
|||
gun.flags = RF_MINLIGHT | RF_DEPTHHACK | RF_WEAPONMODEL;
|
||||
gun.backlerp = 1.0f - cl.lerpfrac;
|
||||
VectorCopy(gun.origin, gun.oldorigin); /* don't lerp at all */
|
||||
//HACK!
|
||||
CL_UpdateLaserSightOrigins(/*gun.origin*/);
|
||||
V_AddEntity(&gun);
|
||||
}
|
||||
|
||||
|
|
|
@ -799,10 +799,6 @@ CL_BeginFrame(int packetdelta, int renderdelta, int timedelta, qboolean packetfr
|
|||
VID_CheckChanges();
|
||||
CL_PredictMovement();
|
||||
|
||||
|
||||
//HACK!
|
||||
CL_UpdateLaserSightOrigins();
|
||||
|
||||
if (!cl.refresh_prepped && (cls.state == ca_active)) {
|
||||
CL_PrepRefresh();
|
||||
}
|
||||
|
|
|
@ -538,6 +538,8 @@ trace_t CL_Trace (vec3_t start, vec3_t end, float size, int contentmask)
|
|||
|
||||
extern vec3_t weaponangles;
|
||||
extern vec3_t weaponoffset;
|
||||
extern vec3_t hmdPosition;
|
||||
extern cvar_t *vr_height_adjust;
|
||||
|
||||
void CL_UpdateLaserSightOrigins ()
|
||||
{
|
||||
|
@ -548,6 +550,8 @@ void CL_UpdateLaserSightOrigins ()
|
|||
|
||||
//At the point of calling this, the vieworg should already have the player height included
|
||||
convertFromVRtoQ2(weaponoffset, cl.refdef.vieworg, gunorigin);
|
||||
gunorigin[2] -= (QUAKE_MARINE_HEIGHT * vr_worldscale->value);
|
||||
gunorigin[2] += ((hmdPosition[1] + vr_height_adjust->value) * vr_worldscale->value);
|
||||
//gunorigin[2] += 1; // just add a little bit
|
||||
AngleVectors(weaponangles, forward, right, NULL);
|
||||
|
||||
|
|
Loading…
Reference in a new issue