hl2sdk
hl2sdk copied to clipboard
CS2 support tracker
This issue is a progress/issue tracker for the ongoing development of cs2 hl2sdk branch done by the community and am members.
Completion status:
- [ ] ConVar and ConCommand related stuff:
- [x] ICvar interface;
- [ ] ConVar lifecycle (Creation/Operation/Deletion) (Currently requires API only work);
- [x] ConCommand lifecycle (Creation/Operation/Deletion);
- [ ] Utility classes:
- [ ] Obsoletion of tier1.lib and transition to tier0 structure:
- [ ] commandbuffer.cpp moved to tier0;
- [x] memstack.cpp moved to tier0;
- [x] netadr.cpp moved to tier0;
- [x] stringpool.cpp moved to tier0;
- [x] strtools.cpp moved to tier0;
- [x] uniqueid.cpp moved to tier0;
- [x] checksum_* moved to tier0;
- [x] diff.cpp moved to tier0;
- [x] cbyteswap.cpp moved to tier0;
- [ ] VProf related classes (mostly moved to tier0):
- [ ] CVProfNode;
- [ ] CVProfile;
- [x] VProfScopeHelper;
- [x] KeyValues;
- [x] KeyValues3;
- [x] CBufferString;
- [x] CUtlString;
- [x] CUtlLeanVector;
- [ ] CUtlVectorBase;
- [ ] CUtlOrderedMap;
- [ ] Vec3D;
- [x] CUtlTSHash;
- [x] CUtlMemoryPoolBase (?);
- [ ] CUtlMemoryFixedGrowable_Base (?);
- [x] CCircularBuffer/CFixedSizeCircularBuffer;
- [x] CUtlScratchMemoryPool/CUtlScratchMemoryPoolFixedGrowable;
- [ ] bf_read/bf_write seems to have additional properties, might need a revisit;
- [ ] Obsoletion of tier1.lib and transition to tier0 structure:
- [ ] Game interfaces that require attention/reversal:
- [x] INetworkGameServer;
- [x] INetChannel;
- [ ] ISource2Server;
- [ ] ISource2GameEntities;
- [ ] ISource2ServerConfig;
- [ ] CSchemaSystemTypeScope (Now using CUtlOrderedMap for CSchemaPtrMap);
- [x] Schema/Datamap access:
- [x] CEntityClass;
- [x] Datamap;
- [x] CSchemaClassInfo;
- [x] Game Events:
- [x] IGameEvent;
- [x] IGameEventSystem;
- [x] IGameEventManager2;
- [ ] Entity access:
- [x] Client userid/pawn/controller/ehandle conversation;
- [ ] Entity lifecycle API (Generally these could be replaced by calling game functions instead, so these mostly optional if there's a way to do it without using the game code):
- [ ] Creating an entity (by classname, other means?);
- [ ] Dispatching spawn and its keyvalues;
- [ ] Killing/Freeing an entity;
- [ ] UTIL_* functions to provide conversation from (?):
- [ ]
CEntityIndex
->CBaseEntity
; - [ ]
CPlayerSlot
->CBaseEntity
;
- [ ]
- [x] CGameEntitySystem;
- [x] CConcreteEntityList;
- [x] CEntityIdentity;
- [x] CEntityHandle;
- [x] CEntityKeyValues;
- [x] EntityInstanceByClassIter_t;
- [ ] Resource/Manifest management:
- [ ] Basic resource precaching workflow;
- [ ] CEntityPrecacheContext (Needs to be moved to a separate location);
- [ ] IEntityPrecacheConfiguration;
- [ ] IEntityResourceManifest;
- [x] Ray Tracing mechanisms (Generally its already doable with what we have):
- [ ] CGamePhysicsQueryInterface;
- [ ] IVPhysics2World;
- [x] CGameTrace;
- [x] CTraceFilter;
- [x] Ray_t;
- [x] Update MASK/CONTENTS flags;
If you want to contribute to the project, please make sure to pr the changes to cs2 branch as well as discuss them beforehand in the AlliedModders discord in appropriate channels.
This is a collaborative work and a lot of the research and development was done by: vanz, Wend4r, slidybat, poggu_, psychonic9, zer0.k, mooshua, boeing666, komashchenko, 0xe58, number201724 and others from the AM Discord. So huge thanks to them!
This is awesome, and incredible to see so much already figured out! Thank you for writing this up, and thanks to everyone who has already dove in and expanded community knowledge of the engine.
Hi, thanks for your efforts.
I am currently still trying to figure the KeyValues system (seems like it's different in ways I didn't manage to figure yet), but I can say for sure, that IKeyValuesSystem has a destructor as first class member (it's exposed in tier0.dll):
class IKeyValuesSystem
{
public:
virtual ~IKeyValuesSystem() = 0;
//...
};
(Currently it's in the SDK without.)
Edit:
Apparently the problem is that there's two different KeyValues systems: KeyValues and KeyValues3.
For example IGameEvent::GetDataKeys (which the offset is shifted wrongly a bit, so is for HasKey) uses KeyValues3, not KeyValues.
It should be possible to reverse engineer KeyValues 3 from tier0.dll's ?DebugPrintKV3@@YAXPEBVKeyValues3@@@Z
(void __fastcall DebugPrintKV3(const struct KeyValues3 *)
).