fix to missile trainer be 132nd

we had noticed that some weapons, like GBU-38 were destroyed by the
missile trainer. This insert would restrict the unspecific destruction
of weapons to the Tunguskas missile only and leave other weapons, like
GBU38 intact
This commit is contained in:
entropySG 2017-01-07 13:59:56 +01:00
parent fc100716e0
commit ffe3325080
2 changed files with 8 additions and 0 deletions

View File

@ -502,6 +502,10 @@ function MISSILETRAINER:_EventShot( Event )
else else
-- TODO: some weapons don't know the target unit... Need to develop a workaround for this. -- TODO: some weapons don't know the target unit... Need to develop a workaround for this.
SCHEDULER:New( TrainerWeapon, TrainerWeapon.destroy, {}, 2 ) SCHEDULER:New( TrainerWeapon, TrainerWeapon.destroy, {}, 2 )
if ( TrainerWeapon:getTypeName() == "9M311" ) then
SCHEDULER:New( TrainerWeapon, TrainerWeapon.destroy, {}, 2 )
else
end
end end
end end

View File

@ -21673,6 +21673,10 @@ function MISSILETRAINER:_EventShot( Event )
else else
-- TODO: some weapons don't know the target unit... Need to develop a workaround for this. -- TODO: some weapons don't know the target unit... Need to develop a workaround for this.
SCHEDULER:New( TrainerWeapon, TrainerWeapon.destroy, {}, 2 ) SCHEDULER:New( TrainerWeapon, TrainerWeapon.destroy, {}, 2 )
if ( TrainerWeapon:getTypeName() == "9M311" ) then
SCHEDULER:New( TrainerWeapon, TrainerWeapon.destroy, {}, 2 )
else
end
end end
end end