4367 Commits

Author SHA1 Message Date
Kawe Mazidjatari
8356ac0351 Resource: update VPK build script
Add "mp_rr_desertlands_holiday", remove "mp_rr_desertlands_64k_x_64k_tt". "mp_rr_desertlands_holiday" is the same as "mp_rr_desertlands_64k_x_64k_tt", but the BSP originates from a later version of the game, and the map has been fully ported over to R5Reloaded rendering "mp_rr_desertlands_64k_x_64k_tt" redundant.
2024-10-07 14:50:22 +02:00
Kawe Mazidjatari
046c37f160 Engine: improve level pak unload logic
Only handle level related paks and data when we are processing the level pak (the 4th pak in the list).
2024-10-07 11:17:16 +02:00
Kawe Mazidjatari
e925f4cb6e Engine: fix level pak unloading crash
Changing the load/unload system to FILO caused a crash when loading 3 level paks, either through request load or level settings, and then unloading them in reverse order. This is a regression caused when the pak loading and unloading system was reworked. Changing the system back to FIFO fixes the issue.
2024-10-07 11:07:06 +02:00
Kawe Mazidjatari
ab0672126d Common: EULA accept check should always return true for dedicated servers
IsEULAUpToDate will always fail on dedicated servers as there is no user interface to display and accept the EULA (dedi's can also be ran without a terminal). The dedicated server users agree with the EULA upon launching the dedicated server.
2024-10-06 22:33:09 +02:00
Kawe Mazidjatari
7a62cf8c8b Tier2: only show message boxes if -nomessagebox isn't passed in
Typically for dedicated servers you don't want any message boxes as they hang the process. The '-nomessagebox' helps solve this problem. Also removed extraneous check on MessageBoxA in EngineLoggerSink, we should always terminate regardless if MessageBoxA fails or not. The error will always be logged anyways.
2024-10-06 22:29:22 +02:00
Kawe Mazidjatari
02ba900a18 Tier0: don't check on MessageBoxA return type during errors
Always terminate the process, MessageBoxA hangs the process anyways. If for some reason MessageBoxA fails then it will still terminate rather than continue and crash.
2024-10-06 22:13:58 +02:00
Kawe Mazidjatari
e551bb9e6f Tier2: check for user consent before submitting crash report
If the crash occurs during the initialization of systems, and Tier1 wasn't initialized yet, the system will display a prompt asking the user whether or not to send the reports. If the crash occurs after Tier1 was initialized, the system will check if the user has crash reporting enabled, and if the user has accepted the EULA before submitting it automatically.
2024-10-06 12:30:56 +02:00
Kawe Mazidjatari
130161128c Launcher: add notes about changes to unhandled exception filter
The engine executable has been patched to no longer install this, therefore this function will never be called as we install a vectored exception filter anyways. This solves the issue where the crash message application gets called more than once when a crash occurs before the SDK detours are initialized.
2024-10-06 12:28:43 +02:00
Kawe Mazidjatari
6de498e7ba Common: make IsEULAUpToDate globally accessible
Will be used for crash reporting as well.
2024-10-06 11:50:31 +02:00
Kawe Mazidjatari
7440e2d5da Tier1: add function for checking if SDK ConVar's are registered 2024-10-06 11:49:15 +02:00
Kawe Mazidjatari
59a904320e LiveAPI: update readme
Nesting depth was increased in commit b91fd983f9440f274330c6d2c3fdf42f7288700a
2024-10-06 11:48:38 +02:00
Kawe Mazidjatari
56b884c7ff Engine: remove duplicate forward declaration 2024-10-06 11:47:30 +02:00
Kawe Mazidjatari
ec3c670b2b Tier0: increment sigcache db version number
Force full rebuild on server and client.
2024-10-04 16:38:31 +02:00
Kawe Mazidjatari
79afdf08fe Recast: fix editor crash in prune tool
Always reset flags buffer as polygon references will no longer align with flags buffer on rebuild.
2024-10-04 16:04:55 +02:00
Kawe Mazidjatari
b91fd983f9 Server: light LiveAPI improvements
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.
2024-10-04 13:00:09 +02:00
Kawe Mazidjatari
ed62ebec9f Server: map IServerGameClients interface out
Not everything has been reversed yet.
2024-10-04 12:53:05 +02:00
Kawe Mazidjatari
277a2bf48b Recast: remove comments that is no longer applicable
PCH was already split.
2024-10-04 12:51:53 +02:00
Kawe Mazidjatari
cf7031866f Server: make inline method const 2024-10-04 12:50:31 +02:00
Kawe Mazidjatari
04afde3a80 Common: rename netmsg function 2024-10-04 12:50:03 +02:00
Kawe Mazidjatari
60f3191bae
Merge pull request #129 from Mauler125/class_var_change_networking
Class var change networking
2024-10-01 12:40:04 +02:00
Kawe Mazidjatari
d312597c91 Engine: rework class var command and netmsg design
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.
2024-09-28 12:43:11 +02:00
Kawe Mazidjatari
432cb923cc Engine: fix compile error
Netmsg is defined as SVC_SetClassVar, not as SVC_SetClassSettingsVar. Rename was missed before submitting b11d7e3c9b1555673d6cb490e60eca19153195e9.
2024-09-28 12:28:28 +02:00
Kawe Mazidjatari
0d5a5df1a4 CMake: move spdlog and detours under 'Debugging' filter 2024-09-25 20:16:33 +02:00
Kawe Mazidjatari
ba5801cce6 Server: implement script utility to set class variables on connected players
Allows setting class var changes on all connected players (SetClassVarSynced(key, val)), or on individual players (player.SetClassVar(key, val)).
2024-09-25 20:12:14 +02:00
Kawe Mazidjatari
b11d7e3c9b Engine: add new netmsg 'SVC_SetClassVar'
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.
2024-09-25 20:08:28 +02:00
Kawe Mazidjatari
3b1622af95 Common: fix crash on dedicated server
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.
2024-09-25 20:01:10 +02:00
Kawe Mazidjatari
9a68b15412 VScript: run initial registration code class callbacks first
Must be ran within the hook as otherwise engine code class functions won't be registered.
2024-09-25 15:39:01 +02:00
Kawe Mazidjatari
8abbed283e Engine: add implementation for registering new netmessages 2024-09-25 15:04:45 +02:00
Kawe Mazidjatari
3b3127c2cf VScript: add code class script globals and registraction callbacks
Will be used to register custom script class functions.
2024-09-25 14:36:20 +02:00
Kawe Mazidjatari
97fb6c91d3 VScript: add code class descriptor class
Used for script class functions, e.g. player.GetOrigin().
2024-09-25 14:34:56 +02:00
Kawe Mazidjatari
8c2400bab5 VScript: add 'sq_getentity' to SDK 2024-09-25 14:21:43 +02:00
Kawe Mazidjatari
27c085482f Tier0: double sigscan mask buffer
Some common (future) function signatures exceed this, which don't have other means of accessing it.
2024-09-25 14:21:17 +02:00
Kawe Mazidjatari
56f8a69114 Tier1: fix flag testing bug in ConVar::Create
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.
2024-09-23 16:23:34 +02:00
Kawe Mazidjatari
3fc1bcd2b7 Tier1: properly fix V_SplitString2
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.
2024-09-23 16:19:53 +02:00
Kawe Mazidjatari
8c9d873fbe Tier1: use CUtlStringList for ConVar flag string parser
The previous implementation contained a bug causing it to add other flags intermittently. Utilize CUtlStringList instead as it was designed for this purpose.
2024-09-23 15:46:25 +02:00
Kawe Mazidjatari
057a2c801a Tier1: exclude delimiter from split string
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.
2024-09-23 15:44:44 +02:00
Kawe Mazidjatari
7e1e4e902a Recast: remove extraneous comments
Should not be flipped.
2024-09-23 12:34:00 +02:00
Kawe Mazidjatari
d21565d00f Recast: use rdSwap for rdVectorBase::swap
Headers were reorganized a while back, clean this code up.
2024-09-23 12:31:31 +02:00
Kawe Mazidjatari
da37f898cf Recast: deduplicate XX_VERTS_PER_POLYGON constant
Must be synced between Recast & Detour.
2024-09-23 12:25:25 +02:00
Kawe Mazidjatari
0298591068 Recast: rename shape volume methods
Reflect new changes, which supports more than only convex shapes.
2024-09-23 12:19:49 +02:00
Kawe Mazidjatari
fa1db8f995 Recast: clamp the off-mesh connection positions as well
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.
2024-09-23 12:11:44 +02:00
Kawe Mazidjatari
5cb0e93766 Recast: better slider limits and layout for primitive shape editor 2024-09-23 12:09:54 +02:00
Kawe Mazidjatari
1bd47494bf Recast: pre-select primitive volume on creation
Pre-select it so it can be modified directly afterwards.
2024-09-22 15:33:49 +02:00
Kawe Mazidjatari
29e57e1605 Recast: allow modifying brush types of existing primitive volumes 2024-09-22 15:26:50 +02:00
Kawe Mazidjatari
feaca14e8a Recast: left panel UX improvements
Make it slightly larger (20 units) and make the sliders wider as well.
2024-09-22 14:28:34 +02:00
Kawe Mazidjatari
5f3abdb656 Recast: select primitive volume by volume hit index
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.
2024-09-22 14:13:39 +02:00
Kawe Mazidjatari
2a2b05c42a Recast: sent intersected primitive volume index to click handler
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.
2024-09-22 14:11:44 +02:00
Kawe Mazidjatari
9e46c8be75 Recast: implement primitive shape volume editor
Allows for selecting already created volumes and modifying or deleting them.
2024-09-22 12:27:45 +02:00
Kawe Mazidjatari
da66a7b9c1 Recast: implement shape volume highlighting in renderer
Highlight shape volume by index, will be used by the shape volume tool for editing.
2024-09-22 01:23:37 +02:00
Kawe Mazidjatari
e9e1a96310 Recast: make sure shape editor and shape instance max vert count is always the same
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.
2024-09-22 00:40:12 +02:00