demofile-net icon indicating copy to clipboard operation
demofile-net copied to clipboard

Expose Server Classes

Open in0finite opened this issue 1 year ago • 2 comments

Basically this:

public ServerClass?[] ServerClasses => _serverClasses;

inside of DemoParser.Entities.cs.

Right now, you would need to manually process CDemoClassInfo message to get Server Classes. So this would be more convenient.

in0finite avatar Dec 24 '23 13:12 in0finite

This should be simple enough to add.

Out of interest, what do you need this for?

saul avatar Jan 05 '24 19:01 saul

I need it, for example, to identify which weapon the player is holding. Sure, I can use it's class name (which is ~ 20 bytes), or I can just use it's class id (2 bytes). Since I am copying data from external process to my Unity application, the size of data matters. Now, when I send class id to my process, I don't know which class it is, unless I have access to all classes and their names.

in0finite avatar Jan 06 '24 06:01 in0finite