Fixed When the Egg Mobile attacks after being spawned through SOC/Lua, the game crashes

Status
Not open for further replies.
Title.

This is easily reproducable with Terminal's spawnobject command and through a simple spawn code such as below.

Code:
COM_AddCommand("eggspawn", function(player)
    P_SpawnMobj(player.mo.x, player.mo.y, player.mo.z + player.mo.height*2, MT_EGGMOBILE)
end)
EDIT: It also crashes through SOC, but if you modify the Egg Mobile's states, it doesn't crash (like my customized Egg Mobile in one of my mods).
 
Last edited by a moderator:
...aha, I can see EXACTLY what's up here! A_Boss1Laser incorrectly assumes actor->spawnpoint will always exist, so when it tries to access actor->spawnpoint->options (to check if the Ambush flag is set) when actor->spawnpoint is NULL (aka nil), BAM the game crashes.
 
Last edited:
That finally explains why I could never manage to get the laser action to not crash the game.
 
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top