From abd61a4d73ff4754c59f929df2bb0522eb328c10 Mon Sep 17 00:00:00 2001 From: ChocoTaco1 Date: Tue, 19 Jul 2022 07:56:19 -0400 Subject: [PATCH] Flag explosion fix Don't completely stop the flag when it hits an explosion --- Classic/scripts/autoexec/TacoOverrides.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) mode change 100755 => 100644 Classic/scripts/autoexec/TacoOverrides.cs diff --git a/Classic/scripts/autoexec/TacoOverrides.cs b/Classic/scripts/autoexec/TacoOverrides.cs old mode 100755 new mode 100644 index 694b1a7..cae81fd --- a/Classic/scripts/autoexec/TacoOverrides.cs +++ b/Classic/scripts/autoexec/TacoOverrides.cs @@ -339,3 +339,14 @@ function ShapeBase::throwWeapon(%this) // Prevent package from being activated if it is already if (!isActivePackage(TacoOverrides)) activatePackage(TacoOverrides); + +//Flag explosion fix +function Item::applyImpulse(%this, %position, %impulseVec) +{ + %data = %this.getDatablock(); + %x = getWord(%impulseVec, 0) / %data.mass; + %y = getWord(%impulseVec, 1) / %data.mass; + %z = getWord(%impulseVec, 2) / %data.mass; + %vel = %x SPC %y SPC %z; + %this.setVelocity(vectorAdd(%this.getVelocity(), %vel)); +} \ No newline at end of file