Attempt at slowing down the memory leak caused by bots spawning/dying
Co-authored-by: Cj <161484149+CJ-SPT@users.noreply.github.com>
Reviewed-on: SPT/Modules#177
Co-authored-by: Cj <cj@noreply.dev.sp-tarkov.com>
Co-committed-by: Cj <cj@noreply.dev.sp-tarkov.com>
This fixes the current issue of having an airdrop in the game causing a CTD after an extract.
There's still two caveats to this that I'm looking into:
- On the very next raid, the sky will still have the chaff from the flares in the sky, however these will have pink textures and take a few seconds to dissipate.
- On the very next raid, calling in an airplane with a red flare will cause the notification manager to spam messages about the airspace being currently in use even at the start of the raid.
Reviewed-on: SPT/Modules#175
Co-authored-by: Archangel <jesse@archangel.wtf>
Co-committed-by: Archangel <jesse@archangel.wtf>
This fixes the logic of FixSavageInventoryScreenPatch.
NOTE: The code below is untested and will most likely not work. It's what I theoretically believe is the right way to turn the `JObject` into a string for the server, however BSG has a `JsonWriter` in the client now that might have to be utilized? I will leave it like this until we have more info.
```c#
RequestHandler.PutJson("/raid/profile/scavsave",
GetProfileAtEndOfRaidPatch.ProfileDescriptor.ToUnparsedData([]).JObject.ToString());
```
Co-authored-by: Lacyway <20912169+Lacyway@users.noreply.github.com>
Reviewed-on: SPT/Modules#173
Co-authored-by: Lacyway <lacyway@noreply.dev.sp-tarkov.com>
Co-committed-by: Lacyway <lacyway@noreply.dev.sp-tarkov.com>
This patch aims to prevent the player from incorrectly receiving the incompatible ammo notification if an AI fails to shoot because of incompatible ammo. Tested with no errors, should probably be added and let users report whether it still occurs as it is hard to reliably reproduce.
Co-authored-by: Lacyway <20912169+Lacyway@users.noreply.github.com>
Reviewed-on: SPT/Modules#171
Co-authored-by: Lacyway <lacyway@noreply.dev.sp-tarkov.com>
Co-committed-by: Lacyway <lacyway@noreply.dev.sp-tarkov.com>
Patch used to stop the allocation of a new `Stopwatch` every frame for all active AI which should save some resources. The data from the stopwatch is unused so I am unsure why BSG left it there.
Co-authored-by: Lacyway <20912169+Lacyway@users.noreply.github.com>
Reviewed-on: SPT/Modules#170
Co-authored-by: Lacyway <lacyway@noreply.dev.sp-tarkov.com>
Co-committed-by: Lacyway <lacyway@noreply.dev.sp-tarkov.com>