Better fix

This commit is contained in:
fed 2023-08-13 05:32:11 +02:00
parent 208525e682
commit 94d0c7e0bd
2 changed files with 5 additions and 10 deletions

View File

@ -53,14 +53,6 @@ namespace camera
return; return;
} }
if (cg_paused->modified)
{
ps->origin[0] = game::refdef->org[0];
ps->origin[1] = game::refdef->org[1];
ps->origin[2] = game::refdef->org[2];
cg_paused->modified = false;
}
float viewangles[3]{}; float viewangles[3]{};
viewangles[0] = angle_normalize((cmd.angles[0] * 0.000021457672f) + ps->delta_angles[0]); viewangles[0] = angle_normalize((cmd.angles[0] * 0.000021457672f) + ps->delta_angles[0]);
viewangles[1] = angle_normalize((cmd.angles[1] * 0.000021457672f) + ps->delta_angles[1]); viewangles[1] = angle_normalize((cmd.angles[1] * 0.000021457672f) + ps->delta_angles[1]);
@ -124,7 +116,7 @@ namespace camera
game::refdef->org[0] = ps->origin[0]; game::refdef->org[0] = ps->origin[0];
game::refdef->org[1] = ps->origin[1]; game::refdef->org[1] = ps->origin[1];
game::refdef->org[2] = ps->origin[2]; game::refdef->org[2] = ps->origin[2] + ps->viewHeightCurrent;
} }
void set_viewpos_now_stub(void* a1) void set_viewpos_now_stub(void* a1)

View File

@ -752,11 +752,14 @@ namespace game
char __pad2[40]; char __pad2[40];
vec3_t origin; vec3_t origin;
vec3_t velocity; vec3_t velocity;
char __pad3[144]; char __pad3[128];
float viewHeightCurrent;
char __pad4[12];
vec3_t delta_angles; vec3_t delta_angles;
}; };
static_assert(offsetof(playerState_s, origin) == 128); static_assert(offsetof(playerState_s, origin) == 128);
static_assert(offsetof(playerState_s, viewHeightCurrent) == 280);
static_assert(offsetof(playerState_s, delta_angles) == 296); static_assert(offsetof(playerState_s, delta_angles) == 296);
struct SprintState_s struct SprintState_s