mirror of
https://github.com/IntQuant/noita_entangled_worlds.git
synced 2025-10-19 07:03:16 +00:00
make notplayer not fight air when player turns invisible
This commit is contained in:
parent
b93627eb6f
commit
1a7d0bd9af
1 changed files with 4 additions and 1 deletions
|
@ -1220,7 +1220,10 @@ local function find_target()
|
|||
local root_id = ctx.my_player.entity
|
||||
local pos_x, pos_y = EntityGetTransform(root_id)
|
||||
for _, id in pairs(EntityGetInRadiusWithTag(pos_x, pos_y, 256, "mortal")) do
|
||||
if EntityGetComponent(id, "GenomeDataComponent") ~= nil and EntityGetComponent(root_id, "GenomeDataComponent") ~= nil and EntityGetHerdRelation(root_id, id) < -10 then
|
||||
if EntityGetFilename(id) ~= 'data/entities/misc/invisibility_last_known_player_position.xml'
|
||||
and EntityGetComponent(id, "GenomeDataComponent") ~= nil
|
||||
and EntityGetComponent(root_id, "GenomeDataComponent") ~= nil
|
||||
and EntityGetHerdRelation(root_id, id) < -10 then
|
||||
local t_x, t_y = EntityGetTransform(id)
|
||||
local did_hit, _, _ = RaytracePlatforms(x, y, t_x, t_y)
|
||||
local dx = x - t_x
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue