mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 14:37:29 +08:00
[saco] Implement/match CGame::SetRaceCheckpointInformation(...)
This commit is contained in:
parent
ee78eae116
commit
24f318de7a
@ -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()
|
void CGame::MakeRaceCheckpoint()
|
||||||
{
|
{
|
||||||
DisableRaceCheckpoint();
|
DisableRaceCheckpoint();
|
||||||
|
@ -26,7 +26,7 @@ private:
|
|||||||
float m_fRaceCheckpointSize;
|
float m_fRaceCheckpointSize;
|
||||||
BYTE m_byteRaceType;
|
BYTE m_byteRaceType;
|
||||||
BOOL m_bRaceCheckpointsEnabled;
|
BOOL m_bRaceCheckpointsEnabled;
|
||||||
char gap2D[4];
|
DWORD m_dwRaceCheckpointMarker;
|
||||||
DWORD m_dwRaceCheckpointHandle;
|
DWORD m_dwRaceCheckpointHandle;
|
||||||
VECTOR m_vecCheckpointPos;
|
VECTOR m_vecCheckpointPos;
|
||||||
VECTOR m_vecCheckpointExtent;
|
VECTOR m_vecCheckpointExtent;
|
||||||
@ -87,6 +87,7 @@ public:
|
|||||||
|
|
||||||
void MakeRaceCheckpoint();
|
void MakeRaceCheckpoint();
|
||||||
void DisableRaceCheckpoint();
|
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);
|
DWORD CreateRadarMarkerIcon(int iMarkerType, float fX, float fY, float fZ, DWORD dwColor, int iStyle);
|
||||||
void DisableMarker(DWORD dwMarkerID);
|
void DisableMarker(DWORD dwMarkerID);
|
||||||
|
Loading…
Reference in New Issue
Block a user