Couple of Blood fixes

- Projectile and crosshair origin now correct
- Don't shift view up/down in relation to pitch
- Version number update
This commit is contained in:
Simon 2023-07-03 21:51:47 +01:00
parent 0848094228
commit 1d682e8a96
3 changed files with 7 additions and 4 deletions

View file

@ -44,7 +44,7 @@ const char *GetVersionString();
#define VERSIONSTR "1.7pre" #define VERSIONSTR "1.7pre"
#define RAZEXR_VERSIONSTR "RazeXR 0.2.5" #define RAZEXR_VERSIONSTR "RazeXR 0.2.6"
// The version as seen in the Windows resource // The version as seen in the Windows resource
#define RC_FILEVERSION 1,6,9999,0 #define RC_FILEVERSION 1,6,9999,0

View file

@ -1541,7 +1541,7 @@ void ProcessInput(PLAYER* pPlayer)
get_weapon_pos_and_angle(px, py, pz, pitch, yaw); get_weapon_pos_and_angle(px, py, pz, pitch, yaw);
//Position for crosshair calculation //Position for crosshair calculation
DVector3 spos = actor->spr.pos.plusZ(-((pz * vr_hunits_per_meter()) + actor->viewzoffset)); DVector3 spos = actor->spr.pos.plusZ(-((pz * vr_hunits_per_meter()) + actor->viewzoffset - pPosture->weaponAboveZ));
posXY = DVector2(px * vr_hunits_per_meter(), py * vr_hunits_per_meter()).Rotated(-DAngle90 + actor->spr.Angles.Yaw); posXY = DVector2(px * vr_hunits_per_meter(), py * vr_hunits_per_meter()).Rotated(-DAngle90 + actor->spr.Angles.Yaw);
spos.X -= posXY.X; spos.X -= posXY.X;
spos.Y -= posXY.Y; spos.Y -= posXY.Y;
@ -1549,7 +1549,8 @@ void ProcessInput(PLAYER* pPlayer)
//Update player angles and position for shooting //Update player angles and position for shooting
actor->spr.pos.X -= posXY.X; actor->spr.pos.X -= posXY.X;
actor->spr.pos.Y -= posXY.Y; actor->spr.pos.Y -= posXY.Y;
pPlayer->zWeapon = actor->spr.pos.Z - ((pz * vr_hunits_per_meter()) + actor->viewzoffset);
pPlayer->zWeapon = actor->spr.pos.Z - ((pz * vr_hunits_per_meter()) + actor->viewzoffset - pPosture->weaponAboveZ);
actor->spr.Angles.Yaw += DAngle::fromDeg(yaw); actor->spr.Angles.Yaw += DAngle::fromDeg(yaw);
actor->spr.Angles.Pitch -= DAngle::fromDeg(pitch); actor->spr.Angles.Pitch -= DAngle::fromDeg(pitch);
pPlayer->slope = actor->spr.Angles.Pitch.Tan(); pPlayer->slope = actor->spr.Angles.Pitch.Tan();

View file

@ -489,7 +489,9 @@ static void SetupView(PLAYER* pPlayer, DVector3& cPos, DRotator& cAngles, sector
{ {
cPos.Z += bobHeight; cPos.Z += bobHeight;
} }
cPos.Z -= 10. * (cAngles.Pitch / DAngle90);
//Don't do this in VR, feels weird
// cPos.Z -= 10. * (cAngles.Pitch / DAngle90);
} }
else else
{ {