> IClient *pClient = static_cast<IClient*>(pNetChan->GetMsgHandler()); // No 
> error here either
> Warning(pClient->GetClientName()); // Grargh! Game crashes, no matter if I'm 
> on my own server or not.

Just because static_cast doesn't return an error doesn't mean it
worked. My guess is that GetMsgHandler() is returning an
INetChannelHandler* and you are FORCING it to be IClient* even though
it may not have been created as an IClient. Try using:

IClient *pClient = dynamic_cast<IClient*>(pNetChan->GetMsgHandler());

which will return NULL if it really isn't an IClient type class.

Killermonkey
GE:S

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

Reply via email to