REGoth-project/REGoth

Invalid Item Handle when killing a Goblins/Skeletons after loading a savegame

markusobi opened this issue · 0 comments

When killing a goblin/skeleton after loading a savegame the game tries to equip an invalid item.
The callstack looked like this:
PlayerController::AniEvent_SFX
PlayerController::die
PlayerController::interrupt
PlayerController::undrawWeapon
PlayerController::equipItem
DaedalusGameState::getItem

The handle PlayerController::m_EquipmentState.activeWeapon of the dying monster is not longer valid, because the internal handle's generation increased by 1.

Might be related to the special case for goblins/skeletons: AFAIK they are in FIST mode, but hold a weapon. It only happens when loading a savegame not - not in a new game!