Skip to content

ID collision of world objects #337

@oelsart

Description

@oelsart

Describe the bug
Through a specific procedure, different world objects with the same ID are recorded in the save data. This causes an error when the game is loaded. There is probably no actual harm though.

To Reproduce
Steps to reproduce the behavior:

  1. Dev quick start.
  2. Send out a vehicle caravan.
  3. Quit the game and start a new session.
  4. Create several world objects.
  5. Save/Load.

Screenshots
https://github.com/user-attachments/assets/84987201-d06c-4ebb-9a0b-491decfd94f5

Additional context
https://github.com/SmashPhil/Vehicle-Framework/blob/develop/Source/Vehicles/World/WorldObjects/VehicleWorldObjectsHolder.cs#L25
As mentioned in the comments, this issue will be automatically resolved once the statics are removed. But for now, I assume using Clear instead of RemoveAll in the constructor should be fine?

Well, this is quite the nitpicking. I suppose I could be a debugger.

Metadata

Metadata

Assignees

Labels

BugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions