Don't recalculate the length of each text on the lines displayed when pushing it to the draw list. Also use the already calculated length for intermediate operations.
- Fetch field name strlen at compile time using rapidjson's string refs.
- Use from_chars to do string to number conversions which isn't locale aware, for maximum speed.
Future planned porting of effects assets will be moved into this rpak file. This pak file loads directly after effects.rpak is loaded, and only if it was loaded.
common_roots.rpak is loaded directly after common_early.rpak, and is necessary to store player layouts (these must be loaded before common.rpak is loaded to preserve the correct order of the linked list).
Make sure that every pak is fully loaded before we continue with the level load. Previously we would only wait on paks loaded by CommonPakData_s, but we should also wait on paks loaded by CustomPakData_s. This fixes all rare crash cases caused by this.
Due to the rework on repak and the ability to rebuilt entire map rpaks in original quality, we no longer need to do the hack of unloading paks in FIFO order. Properly unload all SDK paks in the same order engine paks are unloaded, which is FILO.
Custom level paks are now also loaded after mp_lobby.rpak, this allows custom level paks to use assets from mp_lobby too without having to copy them over.
Text typically gets truncated on concommands/convars with long help texts, this code is also very old. Increasing the buffer sizes fixed the problem. Code now also logs the usage texts if this is available (usage texts is newer than this code, so it was never taken into account).
This reverts commit 9b2034d897e68e2c8677df739e14c77a59901652.
Squirrel coroutines cannot stop during native code execution, it can only happen after a native call has been completed which means that commit 9b2034d897e68e2c8677df739e14c77a59901652 is unnecessary. Revert back to using static objects as this is a lot more performant than allocating/freeing the message each time an event occurs.
Reported by @dr3murr
CClientEntityList::GetClientNetworkable() and CClientEntityList::GetClientEntity() lacked a proper clamp on the 'entNum' parameter. CClientEntityList::GetClientEntity() only handled entNum == -1 cases prior to this patch.
The validation code uses internal structures of the Miles Sound System which is different for each version of the sound engine versions we support, which makes switching banks impossible without recompiling the SDK. The bank patches rarely fail, but if we decide to keep this we should seek for an alternative approach i.e. using the DLL interfaces directly.
We must always use the remainder when writing out padding. The bug was that it would still do the full count or PAD_BUF_SIZE at all times even though the remainder is 20 for example. This fixes the last few rare alignment problems.
- Drop the need for the ImGui logger sink, we can just use the buffer we already rendered into for the terminal sink.
- Remove ANSI rows inserted by the logger before file logging using offsets and ranges to significantly improve the performance.
- For ANSI row constants, use std::string so appending can use the precomputed string length instead of running strlen() each time internally.
Network addresses should always be stored as base only (without their port numbers), since all additional data can change on reconnects which will make comparisons impossible.
nRead was incorrectly placed, it should've been in the parse call. This is used to process the string buffer at once since we already know the size of the string buffer.
Add the tracker call here too to allow for debugging changes and catching bugs. Remaned the function from TrackDefaultValue to TrackValueChange as its no longer exclusive to the create method.
There is code that checks if the given string is nullptr, and if so, sets it to an empty string (""). But this new pointer wasn't used on InternalSetColorFromString and atof. InternalSetColorFromString calls sscanf on the given string which if null, is undefined behavior.
The bug was also present in the engine code, this has been patched on assembly level and confirmed correct.
Make sure to always return the most recently loaded pak instead of the first hit with provided name. The pak system supports live asset hot swapping so we need to take this into account here.