Removed custom pathchecker entity since its not needed anymore

This commit is contained in:
Wofsauge committed 2022-02-03 22:39:24 +01:00
1 parent 1d4aa87300
commit 9c99b2eecf
4 files changed
+3 -54

No files matched your search

-5
View File
@@ -1,5 +0,0 @@
<entities anm2root="gfx/" version="5">
<entity anm2path="eid_blank.anm2" baseHP="0" boss="0" champion="0" friction="1" id="17" name="EID_PATHCHECKER" shadowSize="0" stageHP="0" gridCollision="none" variant="3169" shutdoors="false">
<gibs amount="0" blood="0" bone="0" eye="0" gut="0" large="0" />
</entity>
</entities>
+3 -10
View File
@@ -893,16 +893,9 @@ local function attemptPathfind(entity)
-- Don't reattempt pathfinding more than 3 times a second, unless this is a new entity -- Don't reattempt pathfinding more than 3 times a second, unless this is a new entity
if pathsChecked[entity.InitSeed] == false and EID.GameUpdateCount - lastPathfindFrame < 10 then return false end if pathsChecked[entity.InitSeed] == false and EID.GameUpdateCount - lastPathfindFrame < 10 then return false end
-- Spawn a custom NPC entity to attempt a pathfind to the target pickup, then remove it afterwards -- Spawn a Shopkeeper entity to attempt a pathfind to the target pickup, then remove it afterwards
pathCheckerEntity = game:Spawn(17, 3169, EID.player.Position, nullVector, EID.player, 0, 4354) pathCheckerEntity = game:Spawn(17, 0, EID.player.Position, nullVector, EID.player, 0, 4354)
pathCheckerEntity:ClearEntityFlags(EntityFlag.FLAG_APPEAR)
-- Not sure how much of this flagging is needed now that the entity is immediately removed afterwards
pathCheckerEntity:AddEntityFlags(EntityFlag.FLAG_PERSISTENT | EntityFlag.FLAG_NO_STATUS_EFFECTS | EntityFlag.FLAG_NO_SPRITE_UPDATE | EntityFlag.FLAG_HIDE_HP_BAR | EntityFlag.FLAG_NO_DEATH_TRIGGER | EntityFlag.FLAG_FRIENDLY)
if REPENTANCE then pathCheckerEntity:AddEntityFlags(EntityFlag.FLAG_NO_QUERY) end -- can it even be queried in this brief time?
pathCheckerEntity.EntityCollisionClass = EntityCollisionClass.ENTCOLL_NONE
pathCheckerEntity.Visible = false -- it's invisible anyway?
pathCheckerEntity.Position = EID.player.Position -- not needed, it spawned at our position?
local success = pathCheckerEntity:ToNPC().Pathfinder:HasPathToPos(entity.Position, false) local success = pathCheckerEntity:ToNPC().Pathfinder:HasPathToPos(entity.Position, false)
pathsChecked[entity.InitSeed] = success pathsChecked[entity.InitSeed] = success
pathCheckerEntity:Remove() pathCheckerEntity:Remove()
-39
View File
@@ -1,39 +0,0 @@
<AnimatedActor>
<Info CreatedBy="Unknown" CreatedOn="27.05.2021 23:21:00" Version="24" Fps="30"/>
<Content>
<Spritesheets>
<Spritesheet Path="eid_blank.png" Id="0"/>
</Spritesheets>
<Layers>
<Layer Name="Main" Id="0" SpritesheetId="0"/>
</Layers>
<Nulls/>
<Events/>
</Content>
<Animations DefaultAnimation="Blank">
<Animation Name="Blank" FrameNum="1" Loop="true">
<RootAnimation>
<Frame XPosition="0" YPosition="0" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
</RootAnimation>
<LayerAnimations>
<LayerAnimation LayerId="0" Visible="true">
<Frame XPosition="0" YPosition="0" XPivot="0" YPivot="0" XCrop="20" YCrop="142" Width="18" Height="18" XScale="50" YScale="50" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
</LayerAnimation>
</LayerAnimations>
<NullAnimations/>
<Triggers/>
</Animation>
<Animation Name="" FrameNum="1" Loop="true">
<RootAnimation>
<Frame XPosition="0" YPosition="0" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
</RootAnimation>
<LayerAnimations>
<LayerAnimation LayerId="0" Visible="true">
<Frame XPosition="0" YPosition="0" XPivot="0" YPivot="0" XCrop="20" YCrop="142" Width="18" Height="18" XScale="50" YScale="50" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
</LayerAnimation>
</LayerAnimations>
<NullAnimations/>
<Triggers/>
</Animation>
</Animations>
</AnimatedActor>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB