0
0
mirror of https://github.com/sp-tarkov/server.git synced 2025-02-13 09:50:43 -05:00

Fixed hideout crafts causing server failure

This commit is contained in:
Dev 2024-06-04 19:23:37 +01:00
parent 013634f466
commit bcb40c8333

View File

@ -171,7 +171,14 @@ export class EventOutputHolder
} }
// Client informed of craft, remove from data returned // Client informed of craft, remove from data returned
const storageForSessionId = this.clientActiveSessionStorage[sessionId]; let storageForSessionId = this.clientActiveSessionStorage[sessionId];
if (typeof storageForSessionId === "undefined")
{
this.clientActiveSessionStorage[sessionId] = {};
storageForSessionId = this.clientActiveSessionStorage[sessionId];
}
// Ensure we don't inform client of production again
if (storageForSessionId[productionKey]?.clientInformed) if (storageForSessionId[productionKey]?.clientInformed)
{ {
delete productions[productionKey]; delete productions[productionKey];
@ -179,7 +186,7 @@ export class EventOutputHolder
continue; continue;
} }
// Flag started craft as having been seen by client // Flag started craft as having been seen by client so it won't happen subsequent times
if (production.Progress > 0 && !storageForSessionId[productionKey]?.clientInformed) if (production.Progress > 0 && !storageForSessionId[productionKey]?.clientInformed)
{ {
storageForSessionId[productionKey] = { clientInformed: true }; storageForSessionId[productionKey] = { clientInformed: true };