Skip to content

Commit 1f90e4e

Browse files
committed
refactor: organise
1 parent ae34be5 commit 1f90e4e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/Features/RNGManip.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
#include <cstring>
1616
#include <deque>
1717
#include <fstream>
18+
#include <set>
1819
#include <sstream>
1920
#include <string>
20-
#include <set>
2121

2222
static std::optional<json11::Json> g_session_state;
2323
static std::optional<json11::Json> g_pending_load;
@@ -589,13 +589,6 @@ void RngManip::ExitProcessMovement(CMoveData *move) {
589589
playerTrace->ExitLogScope();
590590
}
591591

592-
ON_EVENT(SESSION_START) {
593-
// Reset this between sessions so the stuck check can't depend on previous sessions
594-
if (!g_gamemovement) return;
595-
float *m_flStuckCheckTime = (float *)(((char *)g_gamemovement) + 36 + 33*3*16 + 8);
596-
memset(m_flStuckCheckTime, 0, 34 * 2 * sizeof (float));
597-
}
598-
599592
extern Hook g_Friction_Hook;
600593
DECL_DETOUR_T(void, Friction) {
601594
playerTrace->EnterLogScope("CPortalGameMovement::Friction");
@@ -720,6 +713,13 @@ ON_INIT {
720713
g_AirAccelerate_Hook.SetFunc(AirAccelerate);
721714
}
722715

716+
ON_EVENT(SESSION_START) {
717+
// Reset this between sessions so the stuck check can't depend on previous sessions
718+
if (!g_gamemovement) return;
719+
float *m_flStuckCheckTime = (float *)(((char *)g_gamemovement) + 36 + 33*3*16 + 8);
720+
memset(m_flStuckCheckTime, 0, 34 * 2 * sizeof (float));
721+
}
722+
723723
ON_EVENT(SESSION_END) {
724724
engine->ExecuteCommand("phys_timescale 1", true);
725725
//console->Print("physics rng state reset\n");

0 commit comments

Comments
 (0)