Skip to content

Commit

Permalink
remove _isLoadingTriggers entirely, fix Loader to use correct EntityID
Browse files Browse the repository at this point in the history
  • Loading branch information
Viv-0 committed Jul 11, 2024
1 parent 884db79 commit 9fddb5f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion Celeste.Mod.mm/Mod/Everest/Everest.Loader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ internal static void ProcessAssembly(EverestModuleMetadata meta, Assembly asm, T

ctor = type.GetConstructor(new Type[] { typeof(EntityData), typeof(Vector2), typeof(EntityID) });
if (ctor != null) {
loader = (level, levelData, offset, entityData) => (Entity) ctor.Invoke(new object[] { entityData, offset, new EntityID(levelData.Name, entityData.ID + (patch_Level._isLoadingTriggers ? 10000000 : 0)) });
loader = (level, levelData, offset, entityData) => (Entity) ctor.Invoke(new object[] { entityData, offset, (entityData as patch_EntityData).EntityID });
goto RegisterEntityLoader;
}

Expand Down
2 changes: 0 additions & 2 deletions Celeste.Mod.mm/Patches/Level.cs
Original file line number Diff line number Diff line change
Expand Up @@ -613,8 +613,6 @@ private bool CheckForErrors() {

private bool _IsInDoNotLoadIncreased(LevelData level, EntityData entity) => Session.DoNotLoad.Contains(new EntityID(level.Name, entity.ID + 20000000));

[ThreadStatic]
internal static bool _isLoadingTriggers;
}

public static class LevelExt {
Expand Down

0 comments on commit 9fddb5f

Please sign in to comment.