Use NO_MATERIAL instead of a magic number

This commit is contained in:
Pasi Kallinen
2024-12-20 19:39:16 +02:00
parent 45b2a6c49a
commit cc31017265
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -10,6 +10,7 @@
(liquid potion inside glass bottle, metal arrowhead on wooden shaft) (liquid potion inside glass bottle, metal arrowhead on wooden shaft)
and object definitions only specify one type on a best-fit basis */ and object definitions only specify one type on a best-fit basis */
enum obj_material_types { enum obj_material_types {
NO_MATERIAL = 0,
LIQUID = 1, /* currently only for venom */ LIQUID = 1, /* currently only for venom */
WAX = 2, WAX = 2,
VEGGY = 3, /* foodstuffs */ VEGGY = 3, /* foodstuffs */
+1 -1
View File
@@ -1732,7 +1732,7 @@ hmon_hitmon(
hmd.silverobj = FALSE; hmd.silverobj = FALSE;
hmd.lightobj = FALSE; hmd.lightobj = FALSE;
hmd.material = obj ? objects[obj->otyp].oc_material hmd.material = obj ? objects[obj->otyp].oc_material
: 0; /* 0 == NO_MATERIAL */ : NO_MATERIAL;
hmd.jousting = 0; hmd.jousting = 0;
hmd.hittxt = FALSE; hmd.hittxt = FALSE;
hmd.get_dmg_bonus = TRUE; hmd.get_dmg_bonus = TRUE;