Skip to content

Commit 6bf203c

Browse files
committed
Fix item_recalc_light
1 parent 7488c15 commit 6bf203c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/game/item.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4604,7 +4604,7 @@ bool sub_467E70()
46044604
void item_recalc_light(int64_t item_obj, int64_t parent_obj)
46054605
{
46064606
int inventory_location;
4607-
int64_t item_obj;
4607+
int64_t inven_item_obj;
46084608
unsigned int light_flags;
46094609
unsigned int light_size;
46104610
unsigned int critter_flags;
@@ -4619,11 +4619,11 @@ void item_recalc_light(int64_t item_obj, int64_t parent_obj)
46194619

46204620
light_flags = 0;
46214621
for (inventory_location = FIRST_WEAR_INV_LOC; inventory_location <= LAST_WEAR_INV_LOC; inventory_location++) {
4622-
item_obj = item_wield_get(parent_obj, inventory_location);
4623-
if (item_obj != OBJ_HANDLE_NULL) {
4624-
light_size = obj_field_int32_get(item_obj, OBJ_F_ITEM_FLAGS) & OIF_LIGHT_ANY;
4622+
inven_item_obj = item_wield_get(parent_obj, inventory_location);
4623+
if (inven_item_obj != OBJ_HANDLE_NULL) {
4624+
light_size = obj_field_int32_get(inven_item_obj, OBJ_F_ITEM_FLAGS) & OIF_LIGHT_ANY;
46254625
if (light_size != 0) {
4626-
effectiveness = item_effective_power_ratio(item_obj, parent_obj);
4626+
effectiveness = item_effective_power_ratio(inven_item_obj, parent_obj);
46274627
if (effectiveness <= 25) {
46284628
light_size >>= 3;
46294629
} else if (effectiveness <= 50) {

0 commit comments

Comments
 (0)