There are a few examples of client-side only entities in the SDK. Check c_gib.cpp for C_Gib or c_baseanimating for C_ClientRagdoll.
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Marcus Matèrn Sent: Tuesday, September 20, 2005 9:14 AM To: hlcoders@list.valvesoftware.com Subject: [hlcoders] Is it possible to have client-side Entity only? Is it possible to have an entity only on the client side without the server knowing about it? Or do I have to do something like: IMPLEMENT_CLIENTCLASS_DT(C_Crosshair, DT_Crosshair, CCrosshair) and have a responding class (CCrosshair) at server side? I've tried setting it up using this following code but it will not draw. Do I have to implement my own DrawModel( int flags ) ? The crosshair should be a entity with x,y,z. Not a 2D HUD object. Thanks in advance! class C_Crosshair : public C_BaseAnimating { DECLARE_CLASS( C_Crosshair, C_BaseAnimating ); ... } void C_Crosshair::Init( void ) { // Precache(); InitializeAsClientEntity( ENTITY_MODEL, ENDER_GROUP_OPAQUE_ENTITY ); } void C_Crosshair::SpawnClientEntity( void ) { SetMoveType( MOVETYPE_NONE ); SetSolid( SOLID_BBOX ); } void C_Crosshair::Precache( void ) { PrecacheModel( ENTITY_MODEL ); } static void CreateCrosshairCallback( void ) { C_Crosshair *pCrosshair = new C_Crosshair; pCrosshair->Init(); ... pCrosshair->SetLocalOrigin( pPlayer->GetAbsOrigin() ); } _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders