mirror of
https://github.com/IntQuant/noita_entangled_worlds.git
synced 2025-10-19 07:03:16 +00:00
fix levitation trail hurting team mates
This commit is contained in:
parent
48c97aaa9f
commit
f2348969a8
1 changed files with 16 additions and 0 deletions
16
quant.ew/data/scripts/perks/levitation_trail.lua
Normal file
16
quant.ew/data/scripts/perks/levitation_trail.lua
Normal file
|
@ -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 )
|
Loading…
Add table
Add a link
Reference in a new issue