diff --git a/src/object.cc b/src/object.cc index 29f64d4..b4f18f0 100644 --- a/src/object.cc +++ b/src/object.cc @@ -29,7 +29,6 @@ namespace fallout { static int objectLoadAllInternal(File* stream); -static void _obj_fix_combat_cid_for_dude(); static void _object_fix_weapon_ammo(Object* obj); static int objectWrite(Object* obj, File* stream); static int _obj_offset_table_init(); @@ -588,29 +587,6 @@ static int objectLoadAllInternal(File* stream) return 0; } -// 0x48909C -static void _obj_fix_combat_cid_for_dude() -{ - Object** critterList; - int critterListLength = objectListCreate(-1, gElevation, OBJ_TYPE_CRITTER, &critterList); - - if (gDude->data.critter.combat.whoHitMeCid == -1) { - gDude->data.critter.combat.whoHitMe = NULL; - } else { - int index = _find_cid(0, gDude->data.critter.combat.whoHitMeCid, critterList, critterListLength); - if (index != critterListLength) { - gDude->data.critter.combat.whoHitMe = critterList[index]; - } else { - gDude->data.critter.combat.whoHitMe = NULL; - } - } - - if (critterListLength != 0) { - // NOTE: Uninline. - objectListFree(critterList); - } -} - // Fixes ammo pid and number of charges. // // 0x48911C @@ -3732,8 +3708,6 @@ int _obj_load_dude(File* stream) inventoryItem->item->owner = gDude; } - _obj_fix_combat_cid_for_dude(); - // Dude has claimed ownership of items in temporary instance's inventory. // We don't need object's dealloc routine to remove these items from the // game, so simply nullify temporary inventory as if nothing was there.