Skip to content

Commit a9ba717

Browse files
committed
refactor: use friction field
1 parent 886ea72 commit a9ba717

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Features/Tas/TasPlayer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ TasPlayerInfo TasPlayer::GetPlayerInfo(int slot, void *player, CUserCmd *cmd, bo
361361

362362
pi.tick = pl->template field<int>("m_nTickBase");
363363
pi.slot = server->GetSplitScreenPlayerSlot(player);
364-
pi.surfaceFriction = *reinterpret_cast<float *>((uintptr_t)player + Offsets::S_m_surfaceFriction);
364+
pi.surfaceFriction = pl->template field<float>("m_flFriction");
365365
pi.ducked = pl->ducked();
366366

367367
float *m_flMaxspeed = &pl->template field<float>("m_flMaxspeed");
@@ -401,7 +401,7 @@ TasPlayerInfo TasPlayer::GetPlayerInfo(int slot, void *player, CUserCmd *cmd, bo
401401

402402
pi.tick = pl->template field<int>("m_nTickBase");
403403
pi.slot = server->GetSplitScreenPlayerSlot(player);
404-
pi.surfaceFriction = *reinterpret_cast<float *>((uintptr_t)player + Offsets::C_m_surfaceFriction);
404+
pi.surfaceFriction = pl->template field<float>("m_flFriction");
405405
pi.ducked = pl->ducked();
406406

407407
float *m_flMaxspeed = &pl->template field<float>("m_flMaxspeed");

0 commit comments

Comments
 (0)