mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-30 11:06:43 +00:00
[Client] Fix error when trying to delete player markers that don't exist
This commit is contained in:
parent
cf41956cad
commit
e042673779
1 changed files with 5 additions and 2 deletions
|
@ -235,7 +235,7 @@ void DedicatedPlayer::setCell()
|
||||||
|
|
||||||
// Remove the marker entirely if this player has moved to an interior that is inactive for us
|
// Remove the marker entirely if this player has moved to an interior that is inactive for us
|
||||||
if (!cell.isExterior() && !Main::get().getCellController()->isActiveWorldCell(cell))
|
if (!cell.isExterior() && !Main::get().getCellController()->isActiveWorldCell(cell))
|
||||||
Main::get().getGUIController()->mPlayerMarkers.deleteMarker(marker);
|
removeMarker();
|
||||||
// Otherwise, update their marker so the player shows up in the right cell on the world map
|
// Otherwise, update their marker so the player shows up in the right cell on the world map
|
||||||
else
|
else
|
||||||
updateMarker();
|
updateMarker();
|
||||||
|
@ -269,6 +269,9 @@ void DedicatedPlayer::removeMarker()
|
||||||
return;
|
return;
|
||||||
|
|
||||||
markerEnabled = false;
|
markerEnabled = false;
|
||||||
|
GUIController *gui = Main::get().getGUIController();
|
||||||
|
|
||||||
|
if (gui->mPlayerMarkers.contains(marker))
|
||||||
Main::get().getGUIController()->mPlayerMarkers.deleteMarker(marker);
|
Main::get().getGUIController()->mPlayerMarkers.deleteMarker(marker);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue