Even in the Ep1 engine it crashed for us when a player was near, so I believe this was a fix that was always needed.
On Sat, Jul 4, 2009 at 7:15 PM, Kyle Gospodnetich <onequarterli...@gmail.com > wrote: > Jonas 'Sortie' Termansen wrote: > > Well, you don't check if pRagdollPhys is a NULL-pointer. > > > > ----- Original Message ----- > > From: "Kyle Gospodnetich" <onequarterli...@gmail.com> > > To: "Discussion of Half-Life Programming" < > hlcoders@list.valvesoftware.com> > > Sent: Sunday, July 05, 2009 3:25 AM > > Subject: [hlcoders] Hopwire Vortex issues - Need a little help > > > > > > > >> Hello everyone. I'm working on a new weapon for a little project of > >> mine, and I decided that the hopwire's vortex effect would be perfect > >> for it's secondary attack. The problem is, when the hopwire goes off, it > >> crashes if a player is too close to it. This problem is only present on > >> the orange box engine, as a clean EP1 engine compile seems to work just > >> fine. According to the dumps, this is the line that's crashing. > >> > >> grenade_hopwire.cpp > >> // Ragdolls need to report the sum of all their parts > >> CRagdollProp *pRagdoll = dynamic_cast< CRagdollProp* >( pEnt ); > >> if ( pRagdoll != NULL ) > >> { > >> // Find the aggregate mass of the whole ragdoll > >> ragdoll_t *pRagdollPhys = pRagdoll->GetRagdoll(); > >> for ( int j = 0; j < pRagdollPhys->listCount; ++j ) > >> { > >> m_flMass += pRagdollPhys->list[j].pObject->GetMass(); > >> } > >> } > >> else > >> { > >> // Otherwise we just take the normal mass > >> >>>>>>m_flMass += pPhysObject->GetMass(); > >> } > >> > >> It's giving a negative mass. What's weird is, even if I hard code the > >> mass ( m_flMass = 10000; ) , it still crashes with a negative mass. > >> > >> _______________________________________________ > >> 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 > > > > > > > This is stock Valve made code, and it works fine in EP1. I will add that > though, thanks for the tip. > > Anyway, I've figured out my problem. It was the vortex attempting to > influence the player's model (I have the model visible in first person). > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, > please visit: > http://list.valvesoftware.com/mailman/listinfo/hlcoders > > -- ~Ryan ( skidz ) _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders