@@ -127,7 +127,6 @@ procedure check_party_orders;
127127procedure put_away_weapon(variable oC);
128128procedure npc_heal_yourself(variable oC);
129129procedure loot_nearby_corpses(variable oC);
130- procedure loot_nearby_containers(variable oC);
131130procedure npc_regroup(variable oC);
132131procedure npc_spread(variable oC);
133132procedure npc_switch_ammo(variable oC, variable ammo_type);
@@ -483,7 +482,6 @@ procedure keypress_hook begin
483482 end else if (get_sfall_global_int(SGVAR_OPTI01) == 1) then begin
484483 if (oLooter) then call cancel_looting;
485484 call loot_nearby_corpses(dude_obj);
486- call loot_nearby_containers(dude_obj);
487485 end else begin
488486 dude_picking_up = 1;
489487 dude_pickup_delay = game_time;
577575 if oAux then begin
578576 if oLooter == dude_obj then call cancel_looting;
579577 call loot_nearby_corpses(oAux);
580- call loot_nearby_containers(oAux);
581578 end else begin
582579 if party_has_looters then display_msg(m_str((10 + current_order) * 100 + 99));
583580 end
687684 oWho = oC;
688685end
689686
690- procedure run_to_tile(variable who, variable tile) begin
691- ndebug("running to container");
692- end
693-
694- procedure loot_container(variable who, variable cont, variable good_tile) begin
695- ndebug("looting a container");
696- reg_anim_clear(who);
697- reg_anim_begin();
698- reg_anim_obj_run_to_tile(who, good_tile, -1);
699- reg_anim_animate(who, ANIM_magic_hands_middle, -1);
700- reg_anim_end();
701- end
702-
703- procedure loot_nearby_containers(variable looter) begin
704- variable good_tile, i, items = list_as_array(LIST_GROUNDITEMS);
705- ndebug("looting containers");
706- foreach i in items begin
707- ndebug("item is " + obj_name(i) + ", pid " + obj_pid(i) + ", is_container is " + is_container(i)
708- + " is_empty is " + is_empty(i) + ", can_reach is " + can_reach(looter, i) + ", looter is " + obj_name(looter));
709- good_tile = can_reach(looter, i);
710- if is_container(i)
711- and not is_empty(i)
712- and good_tile
713- then begin
714- ndebug("trying to loot " + obj_name(i));
715- call loot_container(looter, i, good_tile);
716- end
717- end
718- end
719-
720687procedure loot_nearby_corpses(variable oC) begin
721688 oLooter = oC;
722689 L_list = list_begin(LIST_CRITTERS);
0 commit comments