Skip to content

Commit

Permalink
Exclude escape room GUID from object resets
Browse files Browse the repository at this point in the history
  • Loading branch information
riperiperi committed Jun 1, 2024
1 parent 6d7bfe2 commit 513fd83
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions TSOClient/FSO.Server/Servers/Lot/Domain/LotContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,13 @@ public class LotContainer
0x5157DDF2
};

private static HashSet<uint> NeverResetGUIDs = new HashSet<uint>()
{
0x3278BD34,
0x5157DDF2,
0x352A8ACE
};

public LotContainer(IDAFactory da, LotContext context, ILotHost host, IKernel kernel, LotServerConfiguration config, IRealestateDomain realestate)
{
VM.UseWorld = false;
Expand Down Expand Up @@ -807,13 +814,13 @@ public void ResetVM()
}
if (ent.GetFlag(VMEntityFlags.Occupied))
{
if (PetCrateGUIDs.Contains(ent.Object.OBJ.GUID))
if (NeverResetGUIDs.Contains(ent.Object.OBJ.GUID))
{
//typically pet crates or other things which should never have state deleted.
ent.SetFlag(VMEntityFlags.Occupied, false);
if (ent.Position == LotTilePos.OUT_OF_WORLD)
{
//put it close to the mailbox
//try put it close to the mailbox
var mailbox = Lot.Entities.FirstOrDefault(x => (x.Object.OBJ.GUID == 0xEF121974 || x.Object.OBJ.GUID == 0x1D95C9B0));
if (mailbox != null) SimAntics.Primitives.VMFindLocationFor.FindLocationFor(ent, mailbox, Lot.Context, VMPlaceRequestFlags.UserPlacement);
}
Expand Down

0 comments on commit 513fd83

Please sign in to comment.