Make thief explode when killed
Commit1a9fba804d
made an incorrect simplification. It observed that thief robots are not boss robots and vice versa, and from that changed: ``` if (is_thief) { drop_stolen_items(); } if (is_boss) { start_boss_death_sequence(); } else if (death_roll) { start_robot_death_sequence(); } else { regular_death(); } ``` to ``` if (is_thief) { drop_stolen_items(); } else if (is_boss) { start_boss_death_sequence(); } else if (death_roll) { start_robot_death_sequence(); } else { regular_death(); } ``` This was incorrect, because although a thief is not a boss, a thief does need to proceed through the other non-boss if tests. This error caused a thief not to explode on death, and instead continue to fly around and absorb weapon fire. Fix the logic error by removing the incorrect `else`, so that a thief can be tested for is_boss, get false, and then proceed through the non-boss death logic. Fixes:1a9fba804d
("Avoid repeated valptridx dereferences in multibot.cpp")
This commit is contained in:
parent
092daecb61
commit
0de494c2e0
|
@ -965,7 +965,7 @@ int multi_explode_robot_sub(const vmobjptridx_t robot)
|
|||
const auto robot_id = get_robot_id(objrobot);
|
||||
if (robot_is_thief(Robot_info[robot_id]))
|
||||
drop_stolen_items(vmsegptridx, LevelUniqueObjectState, Vclip, robot);
|
||||
else if (Robot_info[robot_id].boss_flag)
|
||||
if (Robot_info[robot_id].boss_flag)
|
||||
{
|
||||
if (!BossUniqueState.Boss_dying)
|
||||
start_boss_death_sequence(LevelUniqueObjectState.BossState, LevelSharedRobotInfoState.Robot_info, robot);
|
||||
|
|
Loading…
Reference in a new issue