Skip to content

Commit

Permalink
NO_CORPSE_ROTTING corpse will dissapear after a while
Browse files Browse the repository at this point in the history
A fix for #69. NO_CORPSE_ROTTING should just mean the corps of a unit with this property cannot turn into a vampire, and it would not get dragged to a graveyard.

Before this fix, setting this property on a unit would mean its corpse would never dissapear from the map.
  • Loading branch information
Loobinex committed May 28, 2019
1 parent 7754c16 commit 2e2fb0a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/thing_corpses.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,9 @@ TngUpdateRet update_dead_creature(struct Thing *thing)
set_thing_draw(thing, i, 64, -1, 1, 0, 2);
}
} else
if ( corpse_is_rottable(thing) )
if (thing->byte_14 != 0)
{
if (thing->byte_14 != 0)
if ( corpse_is_rottable(thing) )
{
if (thing->health > 0)
thing->health--;
Expand All @@ -222,6 +222,12 @@ TngUpdateRet update_dead_creature(struct Thing *thing)
return TUFRet_Deleted;
}
}
} else
{
if (game.play_gameturn - thing->creation_turn > game.body_remains_for) {
delete_thing_structure(thing, 0);
return TUFRet_Deleted;
}
}
}
if (subtile_has_water_on_top(thing->mappos.x.stl.num, thing->mappos.y.stl.num)) {
Expand Down

0 comments on commit 2e2fb0a

Please sign in to comment.