Skip to content

Commit 162c14c

Browse files
committed
Fix flickering viewmodel
1 parent df95109 commit 162c14c

File tree

3 files changed

+29
-12
lines changed

3 files changed

+29
-12
lines changed

cl_dll/hud.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,7 @@ void PrintVersion()
567567
gEngfuncs.Con_Printf("\n Client binary SDK - %s", auraCL);
568568
gEngfuncs.Con_Printf("\n Server binary - %s", auraSE);
569569
gEngfuncs.Con_Printf("\n Configuration - %s \n", buildCfg);
570+
gEngfuncs.Con_Printf("\n Build System - %s \n", buildSys);
570571
}
571572

572573

cl_dll/versioninfo.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,20 @@
2828
#define buildCfg "HaloRelease"
2929
#elif defined(_HALO) && defined(_DEBUG)
3030
#define buildCfg "HaloDebug"
31+
#endif
32+
33+
#ifdef _LINUX
34+
#define buildSys "Linux"
35+
#endif
36+
37+
#ifdef _WIN32
38+
#if _MSC_VER >= 1910 && _MSC_VER <= 1916
39+
#define buildSys "Microsoft Visual C++ 2017"
40+
#elif _MSC_VER >= 1920 && _MSC_VER <= 1929
41+
#define buildSys "Microsoft Visual C++ 2019"
42+
#elif _MSC_VER >= 1930 && _MSC_VER <= 1944
43+
#define buildSys "Microsoft Visual C++ 2022"
44+
#elif _MSC_VER >= 1950
45+
#define buildSys "Microsoft Visual C++ 2026"
46+
#endif
3147
#endif

cl_dll/view.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// view/refresh setup functions
1+
// view/refresh setup functions.
22
#include <cmath>
33
#include <algorithm>
44
#include "hud.h"
@@ -1153,17 +1153,6 @@ void V_CalcNormalRefdef(struct ref_params_s* pparams)
11531153
// Let the viewmodel shake at about 10% of the amplitude
11541154
gEngfuncs.V_ApplyShake(view->origin, view->angles, 0.9);
11551155

1156-
for (i = 0; i < 3; i++)
1157-
{
1158-
view->origin[i] += bob * 0.4 * pparams->forward[i];
1159-
}
1160-
view->origin[2] += bob;
1161-
1162-
// throw in a little tilt.
1163-
view->angles[YAW] -= bob * 0.5;
1164-
view->angles[ROLL] -= bob * 1;
1165-
view->angles[PITCH] -= bob * 0.3;
1166-
11671156
if (cl_legacy_bob_enabled->value != 0)
11681157
{
11691158
bob = V_CalcLegacyBob(pparams);
@@ -1175,6 +1164,17 @@ void V_CalcNormalRefdef(struct ref_params_s* pparams)
11751164
else
11761165
V_ApplyBob(pparams, view);
11771166

1167+
for (i = 0; i < 3; i++)
1168+
{
1169+
view->origin[i] += bob * 0.4 * pparams->forward[i];
1170+
}
1171+
view->origin[2] += bob;
1172+
1173+
// throw in a little tilt.
1174+
view->angles[YAW] -= bob * 0.5;
1175+
view->angles[ROLL] -= bob * 1;
1176+
view->angles[PITCH] -= bob * 0.3;
1177+
11781178
VectorCopy(view->angles, view->curstate.angles);
11791179

11801180
// pushing the view origin down off of the same X/Z plane as the ent's origin will give the

0 commit comments

Comments
 (0)