Hello all.

So I'm trying to create a custom player by deriving it from CSDKPlayer, like so:

class CMyPlayer : public CSDKPlayer
{
   // player things
};

I've got both the server and client players skeleton class build, I've
linked the class to the player entity with LINK_ENTITY_TO_CLASS, and
setup a simple send/recv table that just networks one boolean
temporarily.

Lastly, I edited the _client.cpp file to instantiate a an instance of
my CMyPlayer class instead of CSDKPlayer when creating new players.

However, now when I run the mod I break at an assertion:

File: game\server\util.cpp
Line: 144
Assertion Failed: FindFactory(pClassName) == NULL

I looked into it a bit and it looks the server keeps a dictionary of
entity factories for producing entities of certain types. My guess is
that it can't find a factory to build my custom player class. I tried
looking for an example of building a CEntityFactory for it, but
couldn't find anything. Is this something I need to build myself and
call InstallFactory(), or should one of the macros be creating that?

Lastly, am I doing something horribly wrong? i.e. should not be
subclassing CSDKPlayer? Thanks.

--Bob

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to