From d79db7fbacf4e9d69184ed744270b4b8b77aea5d Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Mon, 16 Sep 2024 23:47:34 +0800 Subject: [PATCH] [server] Implement/match `CPlayer::SetRaceCheckpoint(...)` --- server/player.cpp | 20 ++++++++++++++++++++ server/player.h | 1 + 2 files changed, 21 insertions(+) diff --git a/server/player.cpp b/server/player.cpp index 50423f1..469d65e 100644 --- a/server/player.cpp +++ b/server/player.cpp @@ -59,6 +59,26 @@ void CPlayer::ToggleCheckpoint(BOOL bEnabled) //---------------------------------------------------- +// TODO: sub_486D30 +// TODO: sub_486DE0 + +//---------------------------------------------------- + +void CPlayer::SetRaceCheckpoint(int iType, float fX, float fY, float fZ, float fNX, float fNY, float fNZ, float fSize) +{ + m_vecRaceCheckpoint.X = fX; + m_vecRaceCheckpoint.Y = fY; + m_vecRaceCheckpoint.Z = fZ; + m_vecRaceNextCheckpoint.X = fNX; + m_vecRaceNextCheckpoint.Y = fNY; + m_vecRaceNextCheckpoint.Z = fNZ; + m_fRaceCheckpointSize = fSize; + m_byteRaceCheckpointType = iType; + ToggleRaceCheckpoint(TRUE); +} + +//---------------------------------------------------- + void CPlayer::ToggleRaceCheckpoint(BOOL bEnabled) { m_bRaceCheckpointEnabled = bEnabled; diff --git a/server/player.h b/server/player.h index d994a04..fca3ade 100644 --- a/server/player.h +++ b/server/player.h @@ -205,6 +205,7 @@ public: void SetCheckpoint(float fX, float fY, float fZ, float fSize); void ToggleCheckpoint(BOOL bEnabled); + void SetRaceCheckpoint(int iType, float fX, float fY, float fZ, float fNX, float fNY, float fNZ, float fSize); void ToggleRaceCheckpoint(BOOL bEnabled); };