Skip to content

Commit

Permalink
Turn off autosaves when a player disconnects
Browse files Browse the repository at this point in the history
  • Loading branch information
ZivDero committed Nov 4, 2024
1 parent 3562d3c commit b62fa68
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/extensions/event/eventext_hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,13 @@ void EventClassExt::_Event_RemovePlayer()
DEBUG_INFO("Executing REMOVEPLAYER event. Frame is %d\n", Frame);
HouseClass* house = Houses[Data.General.Value];

/**
* Turn off autosaves when a player disconnects.
*/
if (Vinifera_SpawnerActive) {
Vinifera_SpawnerConfig->AutoSaveInterval = 0;
}

if ((Session.Type == GAME_INTERNET && PlanetWestwoodTournament) || (Vinifera_SpawnerActive && Session.Type == GAME_IPX && Vinifera_SpawnerConfig->AutoSurrender)) {
house->Flag_To_Die();
}
Expand Down

0 comments on commit b62fa68

Please sign in to comment.