Merge pull request #341 from Buurazu/master

Revert pathchecker change
This commit is contained in:
wofsauge authored and GitHub committed 2022-01-22 20:17:35 +01:00
commit 27696b90b7
2 files changed
+18 -2

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
<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>
+13 -2
View File
@@ -787,6 +787,17 @@ function EID:setPlayer()
end
end
-- is this needed if pathchecker uses a no reward seed?
if REPENTANCE then
function EID:removeWrongGuppyEyeInfo(effectEntity)
if EID.pathCheckerEntity ~= nil and effectEntity.Parent ~= nil then
if GetPtrHash(effectEntity.Parent) == GetPtrHash(EID.pathCheckerEntity) then
effectEntity:Remove()
end
end
end
EID:AddCallback(ModCallbacks.MC_POST_EFFECT_UPDATE, EID.removeWrongGuppyEyeInfo, EffectVariant.PICKUP_GHOST)
end
---------------------------------------------------------------------------
---------------------------On Update Function------------------------------
@@ -834,8 +845,8 @@ function EID:onGameUpdate()
return
end
if EID.pathCheckerEntity == nil then
-- Spawns an Ultra Greed Door and makes it invisible and intangible to act as a Pathfinding NPC that can't be rerolled and has no AI
EID.pathCheckerEntity = game:Spawn(294, 0, EID.player.Position, nullVector, EID.player, 0, 0)
-- Spawns the EID Helper entity with seed that doesnt spawn rewards
EID.pathCheckerEntity = game:Spawn(17, 3169, EID.player.Position, nullVector, EID.player, 0, 4354)
EID.pathCheckerEntity:ClearEntityFlags(EntityFlag.FLAG_APPEAR)
EID.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 EID.pathCheckerEntity:AddEntityFlags(EntityFlag.FLAG_NO_QUERY) end