Clear changedEntities on initialization

When initialized all entities get queried. But the set of entities to
query wasn't cleard. This lead to an OOS.
This commit is contained in:
phosit 2025-02-03 13:19:20 +01:00
parent e07b4df6ba
commit f81cf7e602
No known key found for this signature in database
GPG key ID: C9430B600671C268

View file

@ -148,6 +148,7 @@ AIInterface.prototype.GetFullRepresentation = function(flushEvents)
// all entities are changed in the initial state.
for (const id of Engine.GetEntitiesWithInterface(IID_AIProxy))
state.entities[id] = Engine.QueryInterface(id, IID_AIProxy).GetFullRepresentation();
this.changedEntities = {};
Engine.ProfileStop();
state.changedTemplateInfo = this.changedTemplateInfo;