[saco] Implement/match CGame::SetRaceCheckpointInformation(...)

This commit is contained in:
RD42 2024-11-08 00:25:56 +08:00
parent ee78eae116
commit 24f318de7a
2 changed files with 24 additions and 1 deletions

View File

@ -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();

View File

@ -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);