diff --git a/saco/game/game.cpp b/saco/game/game.cpp index 5252d89..57097fc 100644 --- a/saco/game/game.cpp +++ b/saco/game/game.cpp @@ -709,6 +709,24 @@ void CGame::DisplayGameText(char *szStr,int iTime,int iSize) //----------------------------------------------------------- +void CGame::SetCheckpointInformation(VECTOR *pos, VECTOR *extent) +{ + memcpy(&m_vecCheckpointPos,pos,sizeof(VECTOR)); + memcpy(&m_vecCheckpointExtent,extent,sizeof(VECTOR)); + if(m_dwCheckpointMarker) { + DisableMarker(m_dwCheckpointMarker); + m_dwCheckpointMarker = NULL; + + DWORD dwMarkerID = 0; + ScriptCommand(&create_radar_marker_without_sphere, m_vecCheckpointPos.X, m_vecCheckpointPos.Y, m_vecCheckpointPos.Z, 0, &dwMarkerID); + ScriptCommand(&set_marker_color, dwMarkerID, 1005); + ScriptCommand(&show_on_radar, dwMarkerID, 3); + m_dwCheckpointMarker = dwMarkerID; + } +} + +//----------------------------------------------------------- + void CGame::DisableRaceCheckpoint() { if (m_dwRaceCheckpointHandle) diff --git a/saco/game/game.h b/saco/game/game.h index 87bdec6..6d9a242 100644 --- a/saco/game/game.h +++ b/saco/game/game.h @@ -24,9 +24,10 @@ private: BOOL m_bRaceCheckpointsEnabled; char gap2D[4]; DWORD m_dwRaceCheckpointHandle; - char gap35[24]; + VECTOR m_vecCheckpointPos; + VECTOR m_vecCheckpointExtent; int field_4D; - char gap51[4]; + DWORD m_dwCheckpointMarker; int field_55; int field_59; DWORD field_5D; @@ -78,6 +79,8 @@ public: void DrawGangZone(float* fPos, DWORD dwColor); void EnableStuntBonus(bool bEnable); + void SetCheckpointInformation(VECTOR *pos, VECTOR *extent); + void DisableRaceCheckpoint(); DWORD CreateRadarMarkerIcon(int iMarkerType, float fX, float fY, float fZ, DWORD dwColor, int iStyle);