--
[ Picked text/plain from multipart/alternative ]
Right, so I recently adventured into the custom raytracing stuff to get
working traces between ray's and ellipsoids and spheres. It works awesome
server side, however I ran into a roadblock client side. For some reason
TestCollision never gets called client side.
The entity is derived from CBaseEntity, so I made sure to add
EFL_FORCE_CHECK_TRANSMIT to make sure it got sent to the client even if it
had no model. The rest of the fields that are in CCollisionProperty are
being networked properly (like the flags FSOLID_CUSTOMRAYTEST and
FSOLID_CUSTOMBOXTEST). Server side I use this code in the spawn function:
AddEFlags(EFL_FORCE_CHECK_TRANSMIT);
SetSolid( SOLID_VPHYSICS );
AddSolidFlags( FSOLID_CUSTOMRAYTEST | FSOLID_CUSTOMBOXTEST );
Vector mins = Vector( -m_flRadius, -m_flRadius, -m_flRadius );
Vector maxs = Vector( m_flRadius, m_flRadius, m_flRadius );
CollisionProp()->SetSurroundingBoundsType( USE_SPECIFIED_BOUNDS, &mins,
&maxs );
SetCollisionBounds( mins, maxs );
SetMoveType( MOVETYPE_NONE );
AddEffects( EF_NOSHADOW );
m_flRadius is a NetworkVar. Client side, I don't call anything in
OnDataChanged and the values are getting properly set and everything, but as
I said TestCollision doesn't get called. I need it to get called for the
weapon prediction to properly show hits.
I was wondering if there was somesort of client side flag I needed to set to
make the engine call TestCollision. I also tried functions like
UpdatePartition client side to make sure that it registered the bounds
properly and such, didn't help at all. I also tried running the same code as
the Spawn in OnDataChanged with no effect either.
If someone could tip me off to the solution, I would be very grateful.
Dan
--
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders