]> granicus.if.org Git - nethack/commit
Merge fire-based erosion to common codepaths.
authorSean Hunt <scshunt@csclub.uwaterloo.ca>
Sun, 1 Mar 2015 16:54:40 +0000 (11:54 -0500)
committerPasi Kallinen <paxed@alt.org>
Tue, 17 Mar 2015 16:47:10 +0000 (18:47 +0200)
commitb98fd27f9d20b63b2e3d49c52775a771cf90ca9e
tree7d7d72bc4d357f1d4e0a2b7c8e97d2b92cf40a8e
parentd58a9bb56e739ef1d0e3936708c7f7e65ec1d8fe
Merge fire-based erosion to common codepaths.

This finally eliminates all direct increases of `oeroded` and `oeroded2`
and moves them all to go via `erode_obj()`. They are still manipulated
directly in a few places, but not to erode objects.

This now merges the `fire_damage()` function to a common codepath, used
for items on lava and burning oil, but fire needs more work. There is
still a duplication between `destroy_item()` and `fire_damage()`; the
two codepaths should eventually be merged in some manner so that there
is only one codepath to say "an object was affected by fire". This path
might require some parameters, such as whether the fire will just erode
objects or burn them outright, but that can happen another day.
13 files changed:
include/extern.h
include/hack.h
include/obj.h
src/do.c
src/dokick.c
src/fountain.c
src/mhitm.c
src/mkobj.c
src/mon.c
src/potion.c
src/spell.c
src/trap.c
src/uhitm.c