diff --git a/saco/game/game.cpp b/saco/game/game.cpp index 9b5f8a2..afb85a3 100644 --- a/saco/game/game.cpp +++ b/saco/game/game.cpp @@ -727,6 +727,28 @@ void CGame::SetCheckpointInformation(VECTOR *pos, VECTOR *extent) //----------------------------------------------------------- +void CGame::SetRaceCheckpointInformation(BYTE byteType, VECTOR *pos, VECTOR *next, float fSize) //VECTOR *extent) +{ + memcpy(&m_vecRaceCheckpointPos,pos,sizeof(VECTOR)); + memcpy(&m_vecRaceCheckpointNext,next,sizeof(VECTOR)); + m_fRaceCheckpointSize = fSize; + m_byteRaceType = byteType; + if(m_dwRaceCheckpointMarker) + { + DisableMarker(m_dwRaceCheckpointMarker); + m_dwRaceCheckpointMarker = NULL; + + DWORD dwMarkerID = 0; + ScriptCommand(&create_radar_marker_without_sphere, m_vecRaceCheckpointPos.X, m_vecRaceCheckpointPos.Y, m_vecRaceCheckpointPos.Z, 0, &dwMarkerID); + ScriptCommand(&set_marker_color, dwMarkerID, 1005); + ScriptCommand(&show_on_radar, dwMarkerID, 3); + m_dwRaceCheckpointMarker = dwMarkerID; + } + MakeRaceCheckpoint(); +} + +//----------------------------------------------------------- + void CGame::MakeRaceCheckpoint() { DisableRaceCheckpoint(); diff --git a/saco/game/game.h b/saco/game/game.h index acaa9fa..4dc0c17 100644 --- a/saco/game/game.h +++ b/saco/game/game.h @@ -26,7 +26,7 @@ private: float m_fRaceCheckpointSize; BYTE m_byteRaceType; BOOL m_bRaceCheckpointsEnabled; - char gap2D[4]; + DWORD m_dwRaceCheckpointMarker; DWORD m_dwRaceCheckpointHandle; VECTOR m_vecCheckpointPos; VECTOR m_vecCheckpointExtent; @@ -87,6 +87,7 @@ public: void MakeRaceCheckpoint(); void DisableRaceCheckpoint(); + void SetRaceCheckpointInformation(BYTE byteType, VECTOR *pos, VECTOR *next, float fSize); DWORD CreateRadarMarkerIcon(int iMarkerType, float fX, float fY, float fZ, DWORD dwColor, int iStyle); void DisableMarker(DWORD dwMarkerID);