Increase nesting limit to 128, this should make sure it will always be enough while also making sure no infinite recursions occur. Also improved error print formatting.
New command '_setClassVarClient' only sets the class var on the client, similar to how '_setClassVarServer' only sets it on the server. Command 'set' still has its old behavior, setting it on the server and client. The netmsg SVC_SetClassVar now only runs the _setClassVarClient handler, and if the netmsg was successfully sent, the code runs the _setClassVarServer handler directly instead of relying on the client to NET_StringMsg it in. This is a lot more reliable, secure and performant than the previous approach and drops the requirement of setting sv_cheats to function.
Netmessage SVC_SetClassVar allows the server to change class settings securely on the client. This was implemented due to popular demand, and previous approaches using a combination of ClientCommands (Cbuf and NET_StringCmd) were deemed insecure and unreliable.
First change callback of cvar 'mp_gamemode' must be removed as its client only, calling this on the server causes a crash as we never initialize client specific systems, therefore, the globals used in the change callback are null.
The archive + playerprofile flags check was done on the uninitialized member variable 'm_nFlags', but it should've been performed on the function's input parameter 'flags' as m_nFlags is only initialized past this check in BaseClass::Create (its part of ConCommandBase). This caused statically initialized ConVar's flagged 'FCVAR_ARCHIVE | FCVAR_ARCHIVE_PLAYERPROFILE' to go undetected, and dynamically initialized ones (e.g. through mod settings) to have random memory and intermittently fail this check. The latter is how this bug was found and ultimately fixed in this patch.
Patch in commit 057a2c801a40c2f280193da9963b009adb9f75f6 was done incorrectly, causing intermittent string truncation as subtracting pFirstSeparator from pCurPos will leave with a window in the buffer of exactly that split string, but the previous patch subtracted another char from it whilst adding one in AllocString just for it to be nulled.
The previous implementation contained a bug causing it to add other flags intermittently. Utilize CUtlStringList instead as it was designed for this purpose.
A string "test3,test4" using the delimiter ',' would be split into "test3," and "test4", but should be "test3" and "test4". The delimiter should not be included. This patch fixes the issue.
Allows for parsing zipline positions from BSP entity partitions and placing them whilst also having it clamp the positions correctly to the polygon the zipliner will end up or start from.
As of commit 2a2b05c42ada643eb3a535b497d0da7e16ebef41, the primitive volume index is sent to the click handler. Use this instead of relying on a point being inside a shape which is unreliable.
Click handler should be notified about the primitive volume that the ray collided with, which will make selecting objects in the world a lot more reliable and easier.
Use the same constant for class ShapeVolumeTool and struct ShapeVolume, since we do plan on increasing this in the future. Having multiple constants can cause hard to find problems when tweaking this.
Render recast geometry at its original location, render detour geometry 4 units from its original z-axis to avoid clipping. The previous values were too extreme and caused the cursor to visibly clip in recast geometry.
Allow caller to filter out what to collide with. For the editor cursor, we want to test on everything (including triggers). For the traverse link algorithm, we only want to test on clip brushes or world geometry as traversing through a trigger volume is valid.
* Only run rcGetChunksOverlappingSegment when we do intersection queries on world geometry (major optimization).
* Always find the closest intersection if caller provided tmin, and skip out if caller didn't while our ray intersected with something (major optimization for larger levels with a high number of primitive volumes).
* Reduce max overlapping chunk indices to 512, this was increased to 4096 during the initial coordinate system conversion but this was not necessary and ultimately bloated the stack.
Similar to the intersection test for cylindric volumes. The old convex hull intersection test in the raycast algorithm is inaccurate and also doesn't calculate the hit time, which prevents the editor from placing the cursor at the intersection. Raycast algorithm is pending a refactor and its convex hull isect test will be replaced with this.
Cylindric and AABB volumes can now also be used to mark out area's on the NavMesh. The raycast tests now also take the new shapes into account. User can now also add shapes through the ShapeVolumeTool (previously ConvexVolumeTool). The geomset format has changed slightly:
- identifier 'o' now maps to off-mesh links (previously 'c').
- identifier 'p' now maps to convex polygon volumes (previously 'v').
- identifier 'c' maps to cylinder volumes.
- identifier 'b' maps to box volumes.