89 Commits

Author SHA1 Message Date
Kawe Mazidjatari
65cbdb5465 Use ConVar::ChangeStringValue() instead for purging hostnames
Now possible without crashing with the new memalloc singleton.
2022-07-22 17:18:54 +02:00
Kawe Mazidjatari
c405c23934 Implement memory allocation singleton wrappers
* Pointer to g_pMemAllocSingleton
* New wrapper for returning the singleton, and creating one if not yet initialized (game shares the same pointer, and is aware of its creation).
2022-07-22 16:34:10 +02:00
Kawe Mazidjatari
8198866f6f Add tile range for NavMesh debug draw
New cvar 'navmesh_debug_tile_range' (tile shift index to this cvar gets drawn).
2022-07-22 12:44:33 +02:00
rexx
2e3b4205c0 remove streamoverlay hook 2022-07-21 17:05:19 +01:00
Kawe Mazidjatari
b3ed5d4052 Fix client.dll compile errors
Stripped more server only stuff from client.dll.
2022-07-21 15:13:48 +02:00
Kawe Mazidjatari
9758f988ec Add NavMesh poly debug overlay
Can be toggled and shifted through tiles using 'navmesh_draw_polys'.
2022-07-21 14:48:50 +02:00
Kawe Mazidjatari
c850d52d1b Add NavMesh poly bounds debug overlay 2022-07-21 02:21:59 +02:00
Kawe Mazidjatari
e21ae20f4a Add NavMesh tile portal debug overlay
navmesh_draw_portal > -1 enables the overlay, with this cvar you can also shift through tiles.
navmesh_debug_type [0 - 4] selects the NavMesh (small, med_short, medium, large, extra_large).
2022-07-21 01:24:07 +02:00
rexx
cb4e422724 reimplement stream overlay drawing 2022-07-20 22:50:55 +01:00
Kawe Mazidjatari
2998953600 Add NavMesh BVTree debug overlay
navmesh_draw_bvtree > -1 enables the overlay, with this cvar you can also shift through tiles.
navmesh_debug_type [0 - 4] selects the NavMesh (small, med_short, medium, large, extra_large).
2022-07-20 21:23:56 +02:00
Kawe Mazidjatari
0ec03a62b1 Working AI reachability tables
* Set reachability table count to 1.
* Don't divide reachability write size by 4.
* Trim off all unused bytes after building reachability table.
* Default cvar 'navmesh_always_reachable' to 0.

AI behavior seems to have improved a bit, they attempt to pathfind better, and if they find a certain route they attempt another route where originally they would become stuck in such situation.

If you build the SDK after this commit, you need to rebuild all navmeshes, else the game would segfault in dtNavMesh::isPolyReachable().
2022-07-19 02:38:01 +02:00
Kawe Mazidjatari
bd3fe5b445 Public IVDebugOverlay VFTable interface.
New public interface to add debug overlays on the go (memory is managed by the game module).
3 new commands:
* line.
* sphere.
* capsule.
2022-07-12 17:46:47 +02:00
Kawe Mazidjatari
e8a0c5e752 Add cvar for debug overlay z-buffer.
Only OverlayLine_t has a field to determine whether or not to ignore the z-buffer.
Added ConVar 'r_debug_overlay_zbuffer' to allow setting z-buffer for all overlays.
2022-07-11 21:23:26 +02:00
Kawe Mazidjatari
96abdf619c Rebuild 'ai_script_nodes_draw'
Originally stripped from retail.
2022-07-11 12:00:08 +02:00
Kawe Mazidjatari
cf232be7bf Switch hostname out for default 2022-07-10 17:22:48 +02:00
Kawe Mazidjatari
856b386945 Debug overlay improvements and new render utilities.
Fixed internal RenderBox transforms (origin and angles are packed in xmm registers).
Added new render utilities in the SDK similar to the script ones.
2022-07-10 14:30:28 +02:00
Kawe Mazidjatari
becf8eb6a5 Use size_t for SDK_ARRAYSIZE instead
sizeof() returns a size_t.
2022-07-03 19:18:23 +02:00
Kawe Mazidjatari
e05c9c787d Draw the actual simulation tick on overlay 2022-07-03 11:03:25 +02:00
rexx
bd79e805b5
material debug info overlay (#70)
* material debug info overlay

* add x/y offset convars

* change flags to signature

flags is static?

* Update vgui_debugpanel.cpp

Co-authored-by: PixieCore <41352111+IcePixelx@users.noreply.github.com>
2022-07-01 23:33:48 +02:00
Kawe Mazidjatari
cdcc87b54b Renamed master server related stuff 2022-07-01 10:29:27 +02:00
Kawe Mazidjatari
d417b60e69 Near finished master server improvements
* Added working players/maxplayers fields for master server.
* Fixed popstylevar assert in CBrowser (SetStyleVar and the corresponding PopStyleVar where not within the same scope).
2022-07-01 02:20:47 +02:00
Kawe Mazidjatari
e17d72571d Merge branch 'indev' into pylon_new 2022-06-30 20:19:13 +02:00
PixieCore
a2cb0b62c8 Macro for ArraySizes and CFactory Methods are virtual now for later usage. 2022-06-29 18:25:44 +02:00
PixieCore
c614d75a4f Removed ConVar string deletion.
* This will crash due to the string not being allocated with alloc.
Even if the source engine would allocate it, it would use CStdMemAlloc and it would crash anyway.
But it doesn't so we can just leave that out!
2022-06-29 17:07:06 +02:00
Kawe Mazidjatari
a20d6a163e Work-in-progress pylon master server implementation
Still in development.
Implemented new fields provided by pylon-ms.
2022-06-28 00:47:01 +02:00
Kawe Mazidjatari
965b4f4367 Remove VecNetMessages and VecNetDataFragments
Improved and used CUtlVector class instead.
2022-06-23 19:52:58 +02:00
Kawe Mazidjatari
e70e4d1a8c Add DebugOverlay implementation 2022-06-15 01:24:29 +02:00
Kawe Mazidjatari
a1331d2b8b Fix CUtlMemoryPool size 2022-06-15 01:23:28 +02:00
Kawe Mazidjatari
89cdcdc848 Rename 'pak_decompress' to 'rtech_decompress'
RTech method
2022-06-14 22:29:42 +02:00
Kawe Mazidjatari
162e709190 General cleanup and improvements 2022-06-12 17:41:26 +02:00
Kawe Mazidjatari
c029d7e846 Rename VPK ConCommand's 2022-06-12 12:22:12 +02:00
Kawe Mazidjatari
aaf6e46871 ImGui panel improvements
Slight optimizations and cleanup.
Added fade-in effect.
2022-06-09 02:22:01 +02:00
Amos
e461412fde Optimizations 2022-06-08 14:35:44 +02:00
Kawe Mazidjatari
ec7582e476 Fixed VPK repack with multiple files
VPK's could now be repacked with compression and multiple files. The output is identical to the input as far as currently tested (mp_rr_canyonlands_staging).
2022-06-02 01:57:18 +02:00
Kawe Mazidjatari
6fbe900ba9 Initial implementation of compressed VPK rebuilding
The 'fs_pack_vpk' allows compressing specific files into a VPK (compressed). This implementation has better compression ratio's then currently available VPK tools with compression (at the cost of speed).
The implementation is early, a directory iterator with a files for flags is planned soon to fully rebuild VPK's on-demand. A dedicated standalone program is also planned.

The output dir and archive formats should match 1:1 with the original game
2022-05-30 02:56:15 +02:00
Kawe Mazidjatari
61c7dbf5c1 Fix memory leaks 2022-05-28 23:05:10 +02:00
Kawe Mazidjatari
059a394523 Add commonmacros.h and strtools.h/.cpp from SourceSDK
strtools has been redacted to just what we need
2022-05-28 16:12:37 +02:00
Kawe Mazidjatari
4b72afb74f Light refactor for logging
Moved logging functions to dbg.h (tier0) and export them from the dll.
Added additional functions for checking bad pointers (debug only!).
Reduced output code size.
2022-05-25 14:18:29 +02:00
Amos
d233262b79 Things 2022-05-24 19:26:05 +02:00
Kawe Mazidjatari
dacd307663 See description
* Finished designer code for launcher gui.
* Basic implementation of setting flags for host launch option.
* Check in 'CHostState::LoadConfig' if -launcher is below 1.. if condition is met the cfg's will be executed from 'CHostState::LoadConfig'.
* Added 'StringIsDigit' utility.
2022-05-24 02:23:37 +02:00
Kawe Mazidjatari
4680f8cecc Reduce CPU time on dedicated server
Additional functions and statements found during performance profiling.
Swapped 'Community_Frame()' C3 patch in favor of using shipped ConVar instead.
2022-05-21 12:42:28 +02:00
Kawe Mazidjatari
52883808e1 Reversed CServer structure (almost complete). See desc
* Mostly rebuild CServer structure.
* Partially rebuild CNetworkStringTable structure.
* Partially rebuild CNetworkStringTableContainer structure.
* Removed redundant patterns which are now covered in the data structure.
2022-05-20 20:14:39 +02:00
Kawe Mazidjatari
f2bfbdc568 Update cmd.cpp 2022-05-19 02:21:06 +02:00
PixieCore
5655b8c759 Implementation for rpak swap. Read description.
* RTech::GetPakLoadedInfo returns a reference now instead of a copy. Make sure to check the pointer is valid from now on if dealing with the returned pak entry.
* RTech::GetPakLoadedInfo now has a overloaded function that takes string as argument for searching an pak entry.
* new ConCommand pak_swap which has Pak_Swap_f as callback.
* Pak_Swap_f performs pak unload and then load again.
* pak_requestunload can now be used with pak name
2022-05-19 00:47:16 +02:00
Kawe Mazidjatari
ddfdb4ffd8 See description
Add '-nodiscord' and '-nobakedparticles' to launch params for dedicated.
Add hook for 'MemAlloc_Internal()'.
Rename loggers to be more consistent with naming.
Revert omitting frame pointers.
2022-05-17 23:00:30 +02:00
Kawe Mazidjatari
6dff43bc75 Move and rename ConCommand callbacks appropriately 2022-05-16 21:15:25 +02:00
Kawe Mazidjatari
107a516f9e Implement CBaseClientState structure 2022-05-15 00:29:25 +02:00
Kawe Mazidjatari
9546f7a2ff Update netpacket_t struct 2022-05-14 18:22:46 +02:00
Kawe Mazidjatari
ffa6eb55e8 Improve NetAdr2 regex 2022-05-13 20:59:41 +02:00
Kawe Mazidjatari
70503bd975 Update cmd.cpp 2022-05-13 20:59:30 +02:00