mirror of
https://github.com/GTAmodding/re3.git
synced 2024-11-15 02:09:02 +00:00
Fix waypoint disappearing after each save
This commit is contained in:
parent
0542b1bd4d
commit
865ce46fdb
1 changed files with 12 additions and 0 deletions
|
@ -1022,6 +1022,10 @@ const char* gRadarTexNames[] = {
|
||||||
void
|
void
|
||||||
CRadar::Initialise()
|
CRadar::Initialise()
|
||||||
{
|
{
|
||||||
|
#ifdef MENU_MAP
|
||||||
|
TargetMarkerId = -1;
|
||||||
|
#endif
|
||||||
|
|
||||||
for (int i = 0; i < NUMRADARBLIPS; i++) {
|
for (int i = 0; i < NUMRADARBLIPS; i++) {
|
||||||
ms_RadarTrace[i].m_BlipIndex = 1;
|
ms_RadarTrace[i].m_BlipIndex = 1;
|
||||||
SetRadarMarkerState(i, false);
|
SetRadarMarkerState(i, false);
|
||||||
|
@ -1107,15 +1111,23 @@ INITSAVEBUF
|
||||||
WriteSaveHeader(buf, 'R', 'D', 'R', '\0', *size - SAVE_HEADER_SIZE);
|
WriteSaveHeader(buf, 'R', 'D', 'R', '\0', *size - SAVE_HEADER_SIZE);
|
||||||
|
|
||||||
#ifdef MENU_MAP
|
#ifdef MENU_MAP
|
||||||
|
bool bWaypointDeleted = false;
|
||||||
if (TargetMarkerId != -1) {
|
if (TargetMarkerId != -1) {
|
||||||
ClearBlip(TargetMarkerId);
|
ClearBlip(TargetMarkerId);
|
||||||
TargetMarkerId = -1;
|
TargetMarkerId = -1;
|
||||||
|
bWaypointDeleted = true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (int i = 0; i < NUMRADARBLIPS; i++)
|
for (int i = 0; i < NUMRADARBLIPS; i++)
|
||||||
WriteSaveBuf(buf, ms_RadarTrace[i]);
|
WriteSaveBuf(buf, ms_RadarTrace[i]);
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef MENU_MAP
|
||||||
|
if(bWaypointDeleted)
|
||||||
|
ToggleTargetMarker(TargetMarkerPos.x, TargetMarkerPos.y);
|
||||||
|
#endif
|
||||||
|
|
||||||
VALIDATESAVEBUF(*size);
|
VALIDATESAVEBUF(*size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue