1322 Commits

Author SHA1 Message Date
Kawe Mazidjatari
0c583d7522 Temporary fix for rpaks not loading from override dir 2022-08-06 22:17:47 +02:00
Marvin D
587b92659e dedicated compile fix for RTech changes. v2.0.9_rc1 2022-08-06 00:34:26 +02:00
PixieCore
946da4b2cc Fix variable names in RTech::OpenFile 2022-08-06 00:20:49 +02:00
PixieCore
1cd0ae5c87 General code cleanup, Rebuild and hooked RTech::OpenFile
* RTech std namespace removal
* RTech::OpenFile Rebuild.
* FileHandleTracker_t fully reversed, grabbing m_FileHandles from memory now.
* RTech::FindFreeSlotInFiles needs more research.
*
2022-08-06 00:16:11 +02:00
Kawe Mazidjatari
9dfa2da7aa Update playlists
Set 'survival_wallrun_enabled' and 'survival_wallrun_enabled' to 0 in defaults.

I get a lot of mixed opinions on this, there are people who prefer wallrunning and double jumping, but there are also people who don't want these enabled. I received advice to disable them for defaults for the time being (all br modes and firing range/training modes have them disabled, tdm/ctf and dev_default have them enabled).
2022-08-04 23:10:22 +02:00
Kawe Mazidjatari
cd2fe28490 Update config files
* Added new map in vpk build/extract configs.
* Explicitly set 'sv_cheats' to 0 for retail.
2022-08-04 23:06:57 +02:00
Kawe Mazidjatari
b496327380 Cleanup 2022-08-04 22:51:21 +02:00
Kawe Mazidjatari
c568995d56 Refresh server browser on startup
User gets to see all available servers directly without having to refresh first.
2022-08-04 22:49:30 +02:00
Kawe Mazidjatari
33b588b42e Private server improvements
* Don't clear the token string each time we get a response from the master server (it gets assigned each time anyways, so if the master server decides to change it the user will get the new one, this operation only happens once a second).
* Clear the token message when no longer hosting.
2022-08-04 22:44:23 +02:00
Kawe Mazidjatari
df81a1e277 Update rui_drawEnable help text 2022-08-04 17:56:54 +02:00
Kawe Mazidjatari
0cad187587 Fix client.dll compile errors 2022-08-04 17:52:34 +02:00
Kawe Mazidjatari
8f513a519f Properly implement ConCommand callbacks
COMMAND_COMPLETION_MAXITEMS and COMMAND_COMPLETION_ITEM_LENGTH are confirmed to be 128 (original code is 64).
New register func sets the callback bit fields accordingly (no longer hardcoded).
2022-08-04 17:37:30 +02:00
Kawe Mazidjatari
ea5f17b4ca Light cleanup
* Moved ConVar usage text that where part of the help string to the usage string parameter.
* Flagged ConVar 'bhit_abs_origin' as FCVAR_DEVELOPMENTONLY | FCVAR_REPLICATED.
* Flagged ConCommand 'bhit' as FCVAR_DEVELOPMENTONLY | FCVAR_GAMEDLL.
* Check 'bhit_enable' before running the 'bhit' command callback.
* Fixed spelling in a few area's.
2022-08-04 16:34:23 +02:00
Kawe Mazidjatari
418bd2d679 Improve NavMesh poly blue tone color 2022-08-04 15:41:45 +02:00
Kawe Mazidjatari
d89967a5c2 Switch between -windowed and -fullscreen properly in launcher
Checking/Unchecking will now switch between them properly.
-forceborder does not work and the issue resides in the engine itself (it does the same bitshift operation as -windowed for some reason).
2022-08-04 12:56:05 +02:00
Kawe Mazidjatari
dec7cc0fa5 Fix max_players showing incorrect max_player count
Moved m_nMaxMilesAudioQueues in CGlobalVarsBase behind m_nMaxClients.
m_nMaxClients and m_nGameMode align correctly now, including the mapname and mapversion in CGlobalVars
2022-08-04 12:44:00 +02:00
Kawe Mazidjatari
68b3185a41 Use ssize_t for size types in CUtlMemory 2022-08-04 11:51:38 +02:00
Kawe Mazidjatari
6d92fdf15f Use game's global malloc singleton for allocating/reallocating memory in CUtlMemory
This ensures anything we create in the SDK will be usable within the game engine (Realloc, Free, GetSize, etc..), as we share the global singleton.
2022-08-04 11:33:40 +02:00
Kawe Mazidjatari
238e145818 Implement ConVar change callbacks
CUtlVector containing callbacks (you can have several callbacks for each ConVar).

also, in 'ConVar::InternalSetValue' Valve and Respawn run V_atod (atof) on function param 'pszValue', but they also check if input param 'pszValue' is a nullptr (which in this case, 'pszNewValue' gets set to an empty string), but yet they deref 'pszValue' (nullptr or not) in 'SetColorFromString' and V_atod, is this correct behavior?

For now I swapped these out with 'pszNewValue' for the very rare event the string happens to be nullptr.
2022-08-04 11:06:56 +02:00
Kawe Mazidjatari
babbcbe6d5 Add CStdMemAlloc::GetSize() to SDK
Returns the size of the buffer allocated with MemAllocSingleton()->Alloc() etc.
2022-08-04 02:02:09 +02:00
Kawe Mazidjatari
20d1fabd0c Implement CUtlMemory, CUtlBlockMemory and CUtlVector
CUtlMemory has been modified to fit the size of the in-engine structure.
The new types seem to be either int64 or unsigned (size_t?).
2022-08-04 01:28:07 +02:00
Kawe Mazidjatari
0fe554b3d1 Fix crash cases when setting ConVar string using SetValue
Added IsMaterialThreadSetAllowed and QueueMaterialThreadSetValue checks.
2022-08-04 00:21:48 +02:00
Kawe Mazidjatari
9ba5e63ada Add max size bounds for PayLoadLen when setting size of m_RecvBuffer
Should technically never fail, but in case it does it won't crash the application.
2022-08-03 18:41:25 +02:00
Kawe Mazidjatari
3f8476db88 Logging system light refactor
* Use responceid from server to determine in which context to log.
* Moved all script loggers from combined enums to minus instead (SERVER = -3, CLIENT = -2, UI = -1 SERVER_CODE = 0, etc), this makes it much easier to align stuff in combined systems such as the RUI logger or NetMsg().
* Color log networked RCON messages properly on the client.
* Added dedicated logger for all received RCON messages (net_console.log).
* Log commands submitted through in-game console (allows for easier debugging when going through log files).
2022-08-03 18:34:44 +02:00
Kawe Mazidjatari
19d057fc5e Add 'bhit_enable' ConVar and only run bhit callback if set 2022-08-03 18:27:25 +02:00
Kawe Mazidjatari
5bd6432862 Additional RCON system cleanup 2022-08-03 09:32:48 +02:00
Kawe Mazidjatari
9775fc4bba RCON system overhaul
* Implemented robust length-prefix framing logic for non-blocking sockets (previously used character sequences to determine length, but you cannot use character sequences on protocol buffers as its binary data. This logic should fix all problems regarding some commands not getting networked properly to the server and stuff not getting printed on the client).
* Increased buffer size to std::vector::max_size when netconsole is authenticated (MAX_NETCONSOLE_INPUT_LEN still remains enforced on accepted but not authenticated connections to prevent attackers from crashing the server).
* Process max 1024 bytes each recv buffer iteration.
* Additional optimizations and cleanup.
2022-08-02 23:58:43 +02:00
Kawe Mazidjatari
5795d15c83 Netconsole and ConVar improvements
Implemented StringSplit() (split string with a delimiter, and stop splitting after either the last delimiter has been reached, or nMax, so when nMax is 2, then 'SET mat_sky_color 255 255 0 255' gets split into: "SET" "mat_sky_color" "255 255 0 255").

Netconsole now sends ConVar's/ConCommands and values separately with use of StringSplit.

ConVar now uses internal ChangeStringValue (this runs the callback).
2022-07-31 17:07:35 +02:00
Kawe Mazidjatari
7730d72416 Use proper flags for 'bhit' 2022-07-30 00:57:32 +02:00
Kawe Mazidjatari
85a91d4307 'BHit_f' Cleanup 2022-07-30 00:55:28 +02:00
Kawe Mazidjatari
068e50ea40 'bhit' command implementation
The command is only implemented on the dedicated server or debug servers, so i cannot tell for sure what exactly 'bhit' does. But its either some form of telemetry or debug.
The command sends the player index that got hit on the prediction engine, the bullet fire origin and the angles relative to the target that got hit.
For now the command draws the bullet trajectory if it hits a player.
This commit also fixes the 'Unknown command: bhit' message.
2022-07-30 00:54:33 +02:00
Kawe Mazidjatari
fcc409cfcb Add icliententitylist.h to ClientSDK project 2022-07-30 00:44:13 +02:00
Kawe Mazidjatari
55c5048951 Fix compile error 2022-07-30 00:43:40 +02:00
Kawe Mazidjatari
83236940fa Update max worldsize coords
MAX_COORD has been increased significantly in this engine.
Not sure yet if the rest stayed the same.
2022-07-29 17:43:24 +02:00
Kawe Mazidjatari
2206c24683 Add worldsize.h 2022-07-29 17:41:50 +02:00
Kawe Mazidjatari
9556b05209 CCommand improvements
Add constructor and work-in-progress tokenizer.
2022-07-29 17:30:05 +02:00
Kawe Mazidjatari
f3555104a2 Improve server browser button alignment 2022-07-28 17:41:13 +02:00
Kawe Mazidjatari
05f2888716 fix error log 2022-07-28 15:51:34 +02:00
Kawe Mazidjatari
9eeaebaf6a Even More XZY->XYZ changes 2022-07-28 15:45:02 +02:00
Kawe Mazidjatari
cbaf10478a More XZY->XYZ changes
* dtIntersectSegSeg2D: Calculate over zy-plane instead.
* dtOverlapPolyPoly2D: Calculate over zy-plane instead.
* dtNavMeshQuery::findRandomPoint: z = h.
* dtNavMeshQuery::raycast: Invert hit normals.
* Update all comments to use xyz vector instead (previously xzy (xz-plane z-height)).
2022-07-28 14:24:29 +02:00
Kawe Mazidjatari
c7d61e8b77 Switch neighborhood deltas 2022-07-28 12:49:42 +02:00
Kawe Mazidjatari
0f8f1a4860 Increase smooth path step size and slop
This increases the size of the path lines (this had to be increased due to the scale of the maps in this engine, recast was originally not scaled for it).
2022-07-28 12:34:20 +02:00
Kawe Mazidjatari
4ada4cef72 NavMeshTesterTool XZY->XYZ 2022-07-28 12:14:35 +02:00
Kawe Mazidjatari
34076142ba More XZY->XYZ changes 2022-07-28 03:21:20 +02:00
Kawe Mazidjatari
ce28ea2691 Even more offMeshConnections debug draw fixes 2022-07-28 02:07:13 +02:00
Kawe Mazidjatari
8af97beb57 Fix offMeshConnections debug draw 2022-07-28 01:48:17 +02:00
Kawe Mazidjatari
6a1b6c580a Increase debug arow size 2022-07-28 00:52:12 +02:00
Kawe Mazidjatari
37637bc56a Properly fix cylinder, circle and arrow debug draw for Recast. 2022-07-28 00:41:47 +02:00
Kawe Mazidjatari
f0eecc80ff Flip vertex order for convex hull properly 2022-07-27 21:13:36 +02:00
Kawe Mazidjatari
87a42efd72 Uncomment and fix crowd anticipate turn debug draw
Moved internal functions to their own translation unit.
2022-07-27 21:05:27 +02:00