1440 Commits

Author SHA1 Message Date
Kawe Mazidjatari
50fee7414d Missing material error logging
This commit implements missing material error logging.
When a material does not exist, it will get replaced with an error material, we log which material is missing, and with which error material it gets replaced with.
This commit also comes with some updates regarding the CMaterialGlue class, and some new types used by this class from the RePak project.
2022-10-13 02:22:50 +02:00
Kawe Mazidjatari
f16d538aee CPackedStore: light optimizations
* Don't call copy constructor on entry blocks when building the directory file.
* Don't call copy constructor for string when we don't want to sanitize the directory file name.
2022-10-12 23:39:26 +02:00
Amos
05ef7be4f4 Update IConVar.cpp 2022-10-12 16:20:45 +02:00
Amos
780b968bc7 CPackedStore::GetDirectoryFile optimizations
Break when we have a locale, or found the context.
Removed extraneous logic/vars.
2022-10-11 16:31:00 +02:00
Amos
142c0d1de5 CPackedStore: fix directory file name sanitizer
The sanitizer can retrieve the directory file name from the block file name if this is passed instead. This was broken in the previous system. Sanitization can be opted out if the 3rd parameter of the 'fs_vpk_unpack' command is omitted.
2022-10-11 15:37:34 +02:00
Kawe Mazidjatari
addf815873 BHit_f light cleanup 2022-10-11 01:32:43 +02:00
Kawe Mazidjatari
2675fca219 Use Q_stricmp macro 2022-10-11 01:24:08 +02:00
Kawe Mazidjatari
dac63ee5ef Add FCVAR_REPLICATED console flag icon 2022-10-11 01:22:21 +02:00
Kawe Mazidjatari
74f8c15481 Add assert for recursive shutdown 2022-10-11 01:21:26 +02:00
Kawe Mazidjatari
530b645a4d Additional AI Network render optimizations
* Make box's mins and maxs static const.
* Use SSE to pack 4 indices into 1 128bit register, and shuffle to prevent duplication. Only 2 indices are used at the moment.
2022-10-11 01:20:59 +02:00
Kawe Mazidjatari
bc3b580525 Add logic for preventing recursive SDK initialization
This allows for loading the game with the client.dll without loading the main worker/sdk dll. gamesdk.dll is imported by the game executable, so we cannot circumvent its loading without some hacks, so instead, we just check if -noworkerdll is passed and not perform any init if its present.
2022-10-09 12:41:22 +02:00
Kawe Mazidjatari
1e23ddbf35 Fix client dll crash during squirrel script init
The 'developer' cvar was nullptr because it was never assigned to the developer cvar address (it was defined away).
2022-10-09 12:38:16 +02:00
Kawe Mazidjatari
99a33e95f1 Additional VPK lib cleanup and performance improvements 2022-10-09 12:08:54 +02:00
Kawe Mazidjatari
8880f4e7f0 Rename "Enable Development" to "Enable Developer" in SDK launcher
Renamed to "Developer" as this is the name of the cvar, and the global define within the script API. This should express the intention more clearly.
2022-10-07 22:33:37 +02:00
Kawe Mazidjatari
c1ca5d0878 Fix spelling mistakes in Recast & Detour library 2022-10-07 22:32:08 +02:00
Kawe Mazidjatari
10f728081c CConsole::FindFromPartial light cleanup
Improve readability by moving logic out of conditional scopes.
2022-10-07 22:31:16 +02:00
Kawe Mazidjatari
703caebe6b Unload SDK pak files before Engine pak files
This is required, as we use assets within the engine pak files. Unloading the engine pak files first will result in a seg fault during shutdown.
2022-10-07 22:22:32 +02:00
Kawe Mazidjatari
72a60f6f39 Fix project "dedicated" compile errors 2022-10-05 02:11:13 +02:00
Kawe Mazidjatari
a68fda98c1 Fix crash when loading arena maps caused by recent BSP crash fix
CMaterial and CMaterialGlue derive from the same abstract classes. The function that builds the culling map uses IMaterialInternal, which is used by CMaterial, CMaterialInternal and CMaterialSubRect. Added a check for CMaterialGlue as these are valid too.
2022-10-05 01:59:22 +02:00
Kawe Mazidjatari
70153d209c Additional NavMesh debug draw optimizations
* Init vCamera once during call (MainViewOrigin() won't change during the execution of this function).
* Construct Vector3D for camera distance only once, using SIMD.
2022-10-05 00:55:29 +02:00
Kawe Mazidjatari
31903be52e Use Hungarian notation throughout rest of the file
For consistency, we use Hungarian notation.
2022-10-04 23:00:33 +02:00
Marvin D
f9b51433ad Update basetypes.h 2022-10-04 00:52:59 +02:00
Marvin D
4ae766f19e survival backpack playlist vars 2022-10-03 13:20:50 +02:00
Kawe Mazidjatari
46d3819f63 Update sdklauncher.cpp 2022-10-03 01:23:00 +02:00
Kawe Mazidjatari
65f17cfa8e Remove extraneous semicolons from string concat in sdklauncher 2022-10-03 01:16:56 +02:00
Kawe Mazidjatari
036d2e8e80 CAI_Utility::DrawAIScriptNetwork: light cleanup 2022-10-03 01:15:29 +02:00
Kawe Mazidjatari
7af660d613 Fixed rare bug where models where missing during level load
Some CMaterial instances are allocated on the heap, and we only check for bounds in .data/.pdata. Checking bounds is cheap, checking valid ptr's is not. However we are lucky most of the data is within the segments, so running this isn't too costly.
This fixes the problem where the large leaf model in worlds edge was missing.
2022-10-03 01:15:02 +02:00
Kawe Mazidjatari
2d7b06f0a0 More VPK compressing/decompressing optimizations
* Use reference to array index.
* Only obtain array size once during loop.
* Use static buffer of 1024*1024 for decompressing.
* Removed extraneous goto.
* Fixed bug where shared data would be mapped wrong due to the last optimization.
* This increased packing performance by 40/60 seconds when rebuilding all vpk's.
2022-10-02 19:24:00 +02:00
Kawe Mazidjatari
0451a75f85 Use static buffer for file chunking and compressing during VPK packing
Avoid using new every time. Chunk can be at most 1024 * 1024.
2022-10-02 12:17:03 +02:00
Kawe Mazidjatari
33e1795cf1 NavMesh util assert cleanup
Use actual array size for array access asserts.
2022-10-02 02:19:07 +02:00
Kawe Mazidjatari
f18f2f3e9e Store CCommand argument pointer
Only obtain it once.
2022-10-02 02:18:11 +02:00
Kawe Mazidjatari
43fdbc94da CPackedStore::PackAll optimizations
* Hash chunk before compression to determine if it already exists or not (don't run compression if it does).
* Use the result of vector::insert for data sharing (insert already checks if it exists or not, and returns the iterator).
* This optimization saves around 20 seconds total when rebuilding all VPK's.
2022-10-02 02:16:51 +02:00
Marvin D
310059a75b remove dev_loadout_changeable_at_any_time, see latest scripts commit 2022-10-01 18:35:21 +02:00
Kawe Mazidjatari
f215ca0720 Improve bullet-hit trajectory debug
The ConVar 'bhit_abs_origin' will now draw a sphere at the predicted abs origin of the entity upon hit. This is useful for debugging lag compensation on the server (white star).
2022-10-01 00:27:51 +02:00
Kawe Mazidjatari
dbc47f81aa CAI_Utility: only check ConVar's once a frame
Obtain values of ConVar once a frame instead of checking within loop. There is no point changing the values while we are rendering. Thi sshould increase performance when drawing larger NavMeshes.
2022-10-01 00:25:21 +02:00
Kawe Mazidjatari
69491acb49 Additional NavMesh draw optimizations using SIMD
* Construct min/max for AI Script Network boxes using SIMD (significantly reduced instruction count!).
* Move NavMesh debug draw to dedicated class for future changes.
2022-09-30 01:16:26 +02:00
Kawe Mazidjatari
e111587dd7 Utilize SIMD for 'DrawNavMeshPortals'
* Use SIMD to construct vertices into single XMM register.
* Use SIMD to construct origin and destination vectors from vertices.
* Deref 'navmesh_debug_camera_range' only once outside the render loop.
* Light code cleanup.
2022-09-29 22:26:27 +02:00
Kawe Mazidjatari
f06c9a01e2 Utilize SIMD for 'DrawNavMeshPolys'
* Use SIMD to construct a Vector3D in a single instruction, instead of setting the vector fields individually.
* Store ConVar value as const bool outside loop.
* Slightly improved variable naming.
2022-09-29 20:14:39 +02:00
Kawe Mazidjatari
a6a44feb4d More NavMesh visualization SIMD optimizations
Use SIMD to construct Vector3D's for the BVTree's min/max.
2022-09-29 15:59:48 +02:00
Kawe Mazidjatari
2df13ecdfc NavMesh optimizations
Use SSE for subtraction of origin scalars
2022-09-29 10:59:27 +02:00
Kawe Mazidjatari
cc26113c9e Implement debug draw AIN node links to nearest node
Feature can be toggled using the "ai_script_nodes_draw_nearest" cvar.
2022-09-28 00:14:33 +02:00
Kawe Mazidjatari
9fb248c8b4 Add diagnostic tool
This tool helps identifying common problems during installation.
2022-09-25 22:52:15 +02:00
Kawe Mazidjatari
b34446029b Set developer and cheats cvar when "Enable Cheats" is ticked
This is required for the in-game dev-menu to work.
2022-09-25 22:20:32 +02:00
Kawe Mazidjatari
926b410bce Increase net channel process time budget to 50ms
New value is 200ms, this should fix the very few false positives.
2022-09-25 22:16:52 +02:00
Kawe Mazidjatari
1953493945
Merge pull request #84 from kralrindo/master
add voyage
2022-09-25 21:47:08 +02:00
Kawe Mazidjatari
c4299cb758 Remove unnecessary launch params 2022-09-25 20:20:25 +02:00
Kawe Mazidjatari
ba00d99e03 Add NavMesh build batch file 2022-09-25 16:13:06 +02:00
Kawe Mazidjatari
af5c513ecd Remove useless parameters
'-lv' forces "low violence" which overrides the GAME path with _lv.
2022-09-25 15:33:28 +02:00
Kawe Mazidjatari
bef7f352d6 Implement '-novid' param check
the parameter check for '-novid' has been removed from S2 onwards, but later added back in. Our S3 build doesn't have it as well. This commit adds it back in and allows user to launch the game without the startup video's by adding '-novid' to the launch arguments. ('-dev' also works, but this enables developer and sv_cheats..).
2022-09-25 13:36:55 +02:00
Kawe Mazidjatari
94db7b2faa Version gate (006) 2022-09-25 12:15:49 +02:00