This is a multi-part message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
Thank you Mulchman and rest of people except the drunk one :P

Yes I think all my physic objects are vphysics. BTW, I copied a method from SDK 
meant for gibs to create my hats, maybe should I use a different approach for 
multiplayer? That function is used for single player APC so maybe this isn't 
correct at all.

CPhysicsProp *pHat = assert_cast<CPhysicsProp*>(CreateEntityByName( 
"prop_physics" ));

I wish there was more info about physics in Source, if someone can point me to 
a related document I'd be very grateful. I couldn't see any relevant in Valve's 
wiki.

So well, I added the DAMAGE_NO flag to every physic object in my mod, for the 
moment our server stopped crashing except one time. That's a very rare crash 
which happens when server is loading a new map, just when is supposed to start 
loading. It happens after the same map but rarely. This is the call stack:

  server.dll!CBaseEntity::TakeDamage(const CTakeDamageInfo & inputInfo=)  Line 
1204 + 0xd bytes C++
> server.dll!CBaseEntity::PhysicsDispatchThink(void (void)* 
> thinkFunc=0x00000000)  Line 1068 C++

PhysicsDispatchThink is supposed to run when there are ropes in the map?
// Purpose: Called when it's time for a physically moved objects (plats, doors, 
etc) to run it's game code.


---------------
All of our buildable objects - detpack, dispenser, sg - run the code below
when they explode. The detpack is a "real" physics object (as in it uses
VPhysicsInitNormal()) and I'm assuming your hat you describe is vphysics as
well.

void CFFBuildableObject::Explode( void )
{
        VPROF_BUDGET( "CFFBuildableObject::Explode",
VPROF_BUDGETGROUP_FF_BUILDABLE );

        // MUST DO THIS or CreateExplosion crashes HL2
        m_takedamage = DAMAGE_NO;

        // Remove bounding box (other models follow this pattern...)
        SetSolid( SOLID_NONE );

        // Do the explosion
        DoExplosion();

        // Notify player to tell them they can build
        // again and remove current owner
        m_hOwner = NULL;

        // Remove entity from game
        UTIL_Remove( this );
}

And that's it. There's also a method for 'quietly' removing a buildable
object (like when dismantling) but it's the same code minus the
DoExplosion() call.

Anyway, we've never experienced/received minidumps from people w/ weird
physics related errors so perhaps you need some other steps in addition to
using UTIL_Remove().
--


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

Reply via email to