mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 14:37:29 +08:00
[saco] Implement/match CGame::SetCheckpointInformation(...)
This commit is contained in:
parent
98b7dfc413
commit
b8af4eacc3
@ -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)
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user