From ffe3325080a5d6822f8106ebe558514f38c9c267 Mon Sep 17 00:00:00 2001 From: entropySG Date: Sat, 7 Jan 2017 13:59:56 +0100 Subject: [PATCH] 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 --- Moose Development/Moose/Functional/MissileTrainer.lua | 4 ++++ Moose Mission Setup/Moose.lua | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/Moose Development/Moose/Functional/MissileTrainer.lua b/Moose Development/Moose/Functional/MissileTrainer.lua index aead25452..0d4d3f32f 100644 --- a/Moose Development/Moose/Functional/MissileTrainer.lua +++ b/Moose Development/Moose/Functional/MissileTrainer.lua @@ -502,6 +502,10 @@ function MISSILETRAINER:_EventShot( Event ) else -- TODO: some weapons don't know the target unit... Need to develop a workaround for this. SCHEDULER:New( TrainerWeapon, TrainerWeapon.destroy, {}, 2 ) + if ( TrainerWeapon:getTypeName() == "9M311" ) then + SCHEDULER:New( TrainerWeapon, TrainerWeapon.destroy, {}, 2 ) + else + end end end diff --git a/Moose Mission Setup/Moose.lua b/Moose Mission Setup/Moose.lua index 0624636f1..98d6002bc 100644 --- a/Moose Mission Setup/Moose.lua +++ b/Moose Mission Setup/Moose.lua @@ -21673,6 +21673,10 @@ function MISSILETRAINER:_EventShot( Event ) else -- TODO: some weapons don't know the target unit... Need to develop a workaround for this. SCHEDULER:New( TrainerWeapon, TrainerWeapon.destroy, {}, 2 ) + if ( TrainerWeapon:getTypeName() == "9M311" ) then + SCHEDULER:New( TrainerWeapon, TrainerWeapon.destroy, {}, 2 ) + else + end end end