Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

creature: fix killing skidoo riders via cheat #192

Merged
merged 1 commit into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion src/game/creature.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,23 @@ int32_t __cdecl Creature_CheckBaddieOverlap(const int16_t item_num)

void __cdecl Creature_Die(const int16_t item_num, const bool explode)
{
ITEM_INFO *item = &g_Items[item_num];
ITEM_INFO *const item = &g_Items[item_num];

if (item->object_num == O_DRAGON_FRONT) {
item->hit_points = 0;
return;
}

if (item->object_num == O_SKIDMAN) {
if (explode) {
Effect_ExplodingDeath(item_num, -1, 0);
}
const int16_t vehicle_item_num = (int16_t)(intptr_t)item->data;
ITEM_INFO *const vehicle_item = &g_Items[vehicle_item_num];
vehicle_item->hit_points = 0;
return;
}

item->collidable = 0;
item->hit_points = DONT_TARGET;
if (explode) {
Expand Down
5 changes: 0 additions & 5 deletions src/game/lara/lara_cheat.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,11 +372,6 @@ bool Lara_Cheat_KillEnemy(const int16_t item_num)
return false;
}

if (item->object_num == O_DRAGON_FRONT) {
item->hit_points = 0;
return true;
}

Sound_Effect(SFX_EXPLOSION1, &item->pos, SPM_NORMAL);
Creature_Die(item_num, true);
return true;
Expand Down
Loading