From f2348969a86eff1d0eb0d2d436bae42d2d1ceea9 Mon Sep 17 00:00:00 2001 From: bgkillas Date: Sun, 20 Oct 2024 07:24:27 -0400 Subject: [PATCH] fix levitation trail hurting team mates --- quant.ew/data/scripts/perks/levitation_trail.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 quant.ew/data/scripts/perks/levitation_trail.lua diff --git a/quant.ew/data/scripts/perks/levitation_trail.lua b/quant.ew/data/scripts/perks/levitation_trail.lua new file mode 100644 index 00000000..6faeacb6 --- /dev/null +++ b/quant.ew/data/scripts/perks/levitation_trail.lua @@ -0,0 +1,16 @@ +dofile_once("data/scripts/lib/utilities.lua") +dofile_once("mods/quant.ew/files/resource/shoot_projectile_fix.lua") + +local entity_id = GetUpdatedEntityID() +local pos_x, pos_y = EntityGetTransform( entity_id ) + +local comp = EntityGetFirstComponent(entity_id, "CharacterPlatformingComponent") + +if comp == nil or ComponentGetValue2( comp, "mJetpackEmitting") < 1 then + return +end + +local vel_x, vel_y = GameGetVelocityCompVelocity(entity_id) +vel_x = -vel_x * 75 +vel_y = -vel_y * 50 +shoot_projectile( entity_id, "data/entities/projectiles/levitation_trail.xml", pos_x, pos_y, vel_x, vel_y ) \ No newline at end of file