4388 Commits

Author SHA1 Message Date
Kawe Mazidjatari
f6e27b8b86 Recast: draw crosses in dark color if a reverse link is broken 2024-10-15 16:12:03 +02:00
Kawe Mazidjatari
272818ade0 Recast: remove cell height offset from poly mesh verts
The reason why the BVTree's appeared under the polygon was because we were rendering and calculating them incorrectly. After fixing this, they now appeared above the polygons. This offset is not necessary as it causes BVTree's to build incorrectly.
2024-10-15 15:43:49 +02:00
Kawe Mazidjatari
b5527cff5b Recast: increase cell height
32 seems to generate the nicest tessellation, way better and more consistent than the previous value.
2024-10-15 15:33:46 +02:00
Kawe Mazidjatari
136fc4ecf5 Recast: properly free data on shutdown
Editor::m_navMesh is always deleted in the base class, removed extraneous deletion from the tilemesh editor.
2024-10-13 21:39:12 +02:00
Kawe Mazidjatari
1491f6eaac Recast: default to watershed
Larger levels require watershed as some complex geometry (buildings with multiple floors) will exceed the maximum number of allowed sweep scans when building regions.
2024-10-13 21:38:04 +02:00
Kawe Mazidjatari
9f430a455e Recast: traverse over every tile in the array
dtNavMesh::getTileCount returns the total number of added tiles, the issue with this is that if the navmesh gets pruned, that means disabling unlinked polygons and removing dead tiles, then some tile instances in the m_tiles array may become empty. Less tiles will be installed and since there are null tiles in between, we won't be traversing each tile.
2024-10-13 21:36:46 +02:00
Kawe Mazidjatari
c9c687fc73 Recast: add bounds check for sweepscan indices
Only happens on extremely large and complex geometry.
2024-10-13 14:39:52 +02:00
Kawe Mazidjatari
248a652a15 Recast: add option for collapsing linked polygon groups
This is necessary for navmeshes with more than UINT16_MAX polygon islands. Building navmeshes for mp_rr_desertlands_64k_x_64k will hit this limit.
2024-10-13 14:36:09 +02:00
Kawe Mazidjatari
dedcf4f94f Recast: add >4GB file support for OBJ mesh loader
Needed for very large levels.
2024-10-12 01:49:49 +02:00
Kawe Mazidjatari
c0832b91d3 SDL: fix buffer overrun in SDL_strncmp
Always check len first before dereferencing the pointers.
2024-10-12 01:47:52 +02:00
Kawe Mazidjatari
d9432129b2 Recast: allow loading OBJ and PLY geometry from project files
Deduplicated mesh load function and implemented a simple type handler instead. Code can now load OBJ and PLY geometry from the user interface and project files.
2024-10-11 01:17:52 +02:00
Kawe Mazidjatari
b4b0e22d61 Recast: fix crash in prune tool when initiating NavMesh flood algorithm
dtNavMeshQuery::findNearestPoly can return an error flag, and the function cal also succeed while returning a NULL polyref. Both need to be checked before the algorithm is called. Also moved the memory allocation for flags inside this new check to avoid allocating for nothing.
2024-10-11 01:15:45 +02:00
Kawe Mazidjatari
dabedb2c8b ImGui: remove extraneous print 2024-10-08 23:24:13 +02:00
Kawe Mazidjatari
0db61d2244 Resource: remove old imgui layout config file during update 2024-10-08 23:09:28 +02:00
Kawe Mazidjatari
455b7220f9 ImGui: load and save imgui layout configuration from user cfg directory
Keep it separate from the system configurations.
2024-10-08 23:07:24 +02:00
Kawe Mazidjatari
3974ba70bb Tier0: separate launcher and imgui configs to user directory
Keep it separate from the system configurations.
2024-10-08 23:04:45 +02:00
Kawe Mazidjatari
3d2b15cde2
Merge pull request #130 from O-Robotic/p4sync
Fix GetFactorySystem not being exported
2024-10-08 17:33:18 +02:00
O-Robotic
db72a5c42e Fix GetFactorySystem not being exported 2024-10-08 13:18:45 +01:00
Kawe Mazidjatari
64a3832e24 Common: remove unnecessary patches
These patches are no longer needed; the server and client already have the fatal error flag removed (process continues instead of hard erroring since script errors aren't fatal to the engine). The server also has its own routine within the function so client code never gets called.
2024-10-07 20:32:07 +02:00
Kawe Mazidjatari
3d19fa95ff PluginSystem: move mod status file to mod base directory
A more suitable location. Unclutters the platform base directory and also makes it easier to find for modders.
2024-10-07 14:54:47 +02:00
Kawe Mazidjatari
e0e5232434 Public: mark BSP lumps required by the server
The server needs these lumps in order to work. Any other lump not marked as SV should not be packaged into server VPK's as this will increase the install size (the server never parses them, as it doesn't need to render light maps for example).
2024-10-07 14:52:32 +02:00
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