From fb4e563810dab59d88bab0f42590722a4b0c68f3 Mon Sep 17 00:00:00 2001 From: DMD Date: Sat, 27 Jan 2018 11:44:42 +0200 Subject: [PATCH] Added fix for many crashes related to uncleared initiative list --- TemplePlus/gamesystems/legacysystems.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/TemplePlus/gamesystems/legacysystems.cpp b/TemplePlus/gamesystems/legacysystems.cpp index 20f09ba11..5cdab0507 100644 --- a/TemplePlus/gamesystems/legacysystems.cpp +++ b/TemplePlus/gamesystems/legacysystems.cpp @@ -27,6 +27,7 @@ #include "infrastructure/mesparser.h" #include "legacymapsystems.h" #include "infrastructure/meshes.h" +#include "turn_based.h" //***************************************************************************** @@ -172,6 +173,8 @@ void TeleportSystem::AdvanceTime(uint32_t time) { auto &teleportProcessActive = temple::GetRef(0x10AB74B8); teleportProcessActive = 1; + tbSys.groupInitiativeList->Clear(); // fix for common crash - sometimes initiative list isn't cleared and then some other processes get invalid crap + auto teleportProcess = temple::GetRef(0x10085AA0); auto &teleportPacket = temple::GetRef(0x10AB74C8); teleportProcess(teleportPacket);