Units that auto-salvaged (apparently from PDS only) still shot in combat (Battle between Jekyll and GR8SHAG, both confirmed)

Bug happened when units that auto-salvaged were not added to $destroyedunits and thus didn't have their weapons, attacks and being targets removed and kept their effects and weapons

insert this in code where autosalvage is a success (lines ~5064, ~6395)

Code:

// Bug fix for zombie shooting, autosalvaged units are not in $destroyedunits and thus kept shooting and stayed as targets as well as kept their effects and weapons
$sqltext ="DELETE FROM tinywarz_live.deployed_order_attack WHERE weapon_id IN (SELECT id FROM deployed_weapons WHERE i_on_unit=".$weapon->target_id." OR target_id=".$weapon->target_id." AND is_perm = 'N' ) ";
$res =& $db->query($sqltext, Array() );
if (DB::isError($res)) { ReportDBError($res); }

Yeah, support and to follow this, when a unit died and auto salvages, the attacks and the target you just killed is still registered when you check the units attacks and targeting, so it's annoying having 20+ targets when they all auto salvage and none are alive