Kawe Mazidjatari
044528b9b1
Game: properly load shared global vars for game dll's
...
Properly load it from CServerGameDLL::DLLInit (and new in this commit, the client's shared globals from CHLClient::Init), this way we can also avoid the double dereference which improves performance. Also performed an architectural change where anything outside Game DLL code uses the shared interface pointer instead of the objects directly.
2024-07-31 22:18:33 +02:00
Kawe Mazidjatari
084f94aefd
Game: properly implement entity list base classes
...
Properly implemented and now mostly useable in the SDK.
2024-07-31 20:49:19 +02:00
Kawe Mazidjatari
892f415425
Server: reverse server entity list class
...
Fully reversed.
2024-07-31 17:44:30 +02:00
Kawe Mazidjatari
06ca0479b8
Client: get actual client entity list object
2024-07-31 15:28:29 +02:00
Kawe Mazidjatari
6782cdc73b
VstdLib: fix compile error in debug builds
...
Typo in variable names.
2024-07-31 15:16:11 +02:00
Kawe Mazidjatari
e41366f065
Client: reverse client entity list class
...
Fully reversed.
2024-07-31 15:06:54 +02:00
Kawe Mazidjatari
759a41bb69
Game: add CWeaponX class
...
Server side weapon entity.
2024-07-30 16:24:57 +02:00
Kawe Mazidjatari
f2070b6743
Server: fix incorrectly placed entity handle field
...
Datamap and assembly confirmed this field should be at 0x6bf4. The other nearby fields align properly now as well.
2024-07-30 15:09:44 +02:00
Kawe Mazidjatari
ac66fb513b
Game: correctly type datamap fields
2024-07-30 15:04:41 +02:00
Kawe Mazidjatari
dae694139f
Engine: add missing datamap field type enumerant
...
New in reSource.
2024-07-30 14:14:36 +02:00
Kawe Mazidjatari
65253b4f44
UserCmd: clamp ucmd's on the client as well
...
Prevent server -> client attacks, may one ever be found again after the server-side UserCmd exploit fix.
2024-07-30 12:24:09 +02:00
Kawe Mazidjatari
3c68b491e7
UserCmd: use the preferred clamp function
...
Tends to get optimized better.
2024-07-30 12:08:34 +02:00
Kawe Mazidjatari
0ab2b3f800
VstdLib: CGaussianRandomStream constification
2024-07-30 11:59:53 +02:00
Kawe Mazidjatari
31eac6bcc4
VstdLib: change mutex type for CGaussianRandomStream
...
Needs to be CThreadMutex.
2024-07-30 11:50:06 +02:00
Kawe Mazidjatari
0a49d03589
VstdLib: light optimizations for CUniformRandomStream
...
Use Min instead of an inline check, this generates better assembly code. Also made all the used defines a float to avoid having to cast each time since we aren't working with double precision floating points here.
2024-07-30 11:45:07 +02:00
Kawe Mazidjatari
f4d8acc918
VstdLib: properly implement CUniformRandomStream
...
The interface layout and implementation in the SDK was different than that of the engine. This has been changed to maintain ABI compatibility and to ensure the same values are generated.
2024-07-30 11:34:40 +02:00
Kawe Mazidjatari
28bed2517e
Tier0: properly align CThreadMutex
...
This class needs to be aligned to an 8 byte boundary, just use the raw type, we include the windows headers anyways.
2024-07-30 11:28:11 +02:00
Kawe Mazidjatari
0ddd042d42
Game: force all data classes with virtual function tables to an 8 byte boundary
...
This is required as otherwise arrays will be out of alignment, e.g. CPlayer::m_playerKnockBacks was off with 4 bytes on the next array element as it was aligned to a 4 byte boundary while it contains a virtual function table pointer.
2024-07-30 10:18:04 +02:00
Kawe Mazidjatari
865e186703
Server: log NavMesh query init failures on hotswap
2024-07-30 02:13:43 +02:00
Kawe Mazidjatari
705813599c
Game: move interface version identifiers to interface file
...
Small cleanup and deduplication.
2024-07-30 01:52:03 +02:00
Kawe Mazidjatari
5428e1914f
Game: fix circular include
...
The types needed for the typedef were already forward declared, no need to include additional headers here.
2024-07-30 01:50:56 +02:00
Kawe Mazidjatari
06b5d9a2a2
Client: add documentation to IClientEntityList interface
2024-07-30 01:29:32 +02:00
Kawe Mazidjatari
742195eb92
Client: proper return type for GetClientUnknownFromHandle
...
Should return IClientUnknown pointer.
2024-07-30 01:26:34 +02:00
Kawe Mazidjatari
c83283a51d
Client: constify IClientEntityList interface
...
All parameters can be const.
2024-07-30 01:24:37 +02:00
Kawe Mazidjatari
6c56965cd1
Client: reverse last unknown method in IClientEntityList
...
Same as IClientEntityList::GetClientEntity, but instead, calls IClientUnknown::GetBaseEntity().
2024-07-30 01:23:46 +02:00
Kawe Mazidjatari
979e9410b6
Client: fix IClientEntityList interface
...
Some methods had missing parameters, and this interface expects CBaseHandle being passed in as a reference, which explains why GetClientEntityFromHandle() didn't work properly in the past.
2024-07-30 01:17:14 +02:00
Kawe Mazidjatari
a9c6a5e733
Game: properly setup interface classes
...
Member m_RefEHandle is always at offset 8 for Server and Client BaseEntity class. The onyl way to achieve this is to put this into the IHandleEntity interface, as otherwise it will be placed after the interface pointers in C_BaseEntity for client. This also eliminates the need of padding at the beginning of both the server and client's version of the BaseEntity class. The IClientEntity interface has also been properly reversed and applied to the SDK now, the unknown vftable entries have now been identified correctly and moved to IClientUnknown .
2024-07-30 01:12:35 +02:00
Kawe Mazidjatari
f6bb588ef4
Client: remove duplicate class definiton
...
It was moved to shared game code.
2024-07-30 01:09:23 +02:00
Kawe Mazidjatari
3a2d0bb31a
Mathlib: fix formatting errors
...
Fix some small formatting errors, no logic was changed.
2024-07-29 21:19:57 +02:00
Kawe Mazidjatari
6fc6a6706f
Mathlib: fix corrupted character in comment
2024-07-29 21:10:38 +02:00
Kawe Mazidjatari
7eb6017c16
Core: update copyright notice headers
...
Fix corrupted copyright symbol.
2024-07-29 21:09:55 +02:00
Kawe Mazidjatari
e8cefb64c3
Client: add client-side base entity classes
...
Some shared data that was misplaced in server headers have been moved to shared.
2024-07-29 21:01:26 +02:00
Kawe Mazidjatari
ceeaddb2e1
InputSystem: change mutex types
...
Use SDK's CThreadMutex, which is the actual underlying mutex type used for this class.
2024-07-29 19:26:36 +02:00
Kawe Mazidjatari
8c3daa4fe6
Client: add ALC per-optic scalar helper functions and cvars
2024-07-29 19:23:33 +02:00
Kawe Mazidjatari
1be76bd0c4
InputSystem: add reverse engineered CInput class
...
Reverse engineered classes that will be required to implement per-optic ALC scalars in-game.
2024-07-29 19:22:00 +02:00
Kawe Mazidjatari
f694269072
Server: properly implement NavMesh hotswap
...
The hotswap feature is now fully functional and no longer crashes the game. The NavMesh query states had to be reset.
2024-07-29 12:32:49 +02:00
Kawe Mazidjatari
fb1d1ba2e2
Server: add several getters and setters for AI classes
2024-07-29 12:17:09 +02:00
Kawe Mazidjatari
8af73a20ef
Server: add getter for AI hull navmesh type
2024-07-29 12:16:37 +02:00
Kawe Mazidjatari
30185cbc59
Server: add AI manager class and pointer to SDK
...
Allows going over each AI from within the SDK.
2024-07-29 11:32:25 +02:00
Kawe Mazidjatari
f5cd8e99e0
Tier0: implement CThreadMutex
2024-07-29 11:23:00 +02:00
Kawe Mazidjatari
824536f7b4
Server: add CAI_ScheduleBits and apply to class members
2024-07-29 10:28:51 +02:00
Kawe Mazidjatari
816589d872
Server: set correct enum types for AI class members
2024-07-29 10:23:08 +02:00
Kawe Mazidjatari
f9e115c610
Server: update navigation types
2024-07-29 10:22:09 +02:00
Kawe Mazidjatari
6203bbddbe
Recast: add missing straight path types
...
Should've been part of commit 47aee3125d9371a82a090638f3f5a962fe9971ac
2024-07-28 22:45:10 +02:00
Kawe Mazidjatari
5c4a66f5b5
Server: add AI task debug code
...
Reimplement CAI_BaseNPC::TaskFail.
2024-07-28 22:36:05 +02:00
Kawe Mazidjatari
47aee3125d
Server: add reverse engineered BaseNPC (AI) classes
...
Will be used for debug code and proper navmesh hotswaps.
2024-07-28 16:42:04 +02:00
Kawe Mazidjatari
628a4471ea
Recast: fix incorrect assignment of half extents (XZY -> XYZ)
2024-07-28 08:58:10 +02:00
Amos
9dcb1dd86c
Recast: move navmesh loading logic into single function
...
Make sure tools are always initialized properly whenever a navmesh is loaded.
2024-07-26 01:22:56 +02:00
Amos
af2159a523
Recast: fix incorrect member order in dtOffMeshConnection
...
hintIdx should be before userId, see r5apex_ds + F1267D.
2024-07-26 00:28:13 +02:00
Amos
d669d18a86
Recast: add missing mset version directive
...
Not for MSET < 7.
2024-07-26 00:25:10 +02:00