Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- ================
- rvVehicle::AddDamageEffect
- ================
- */
- void rvVehicle::AddDamageEffect ( const trace_t &collision, const idVec3 &velocity, const char *damageDefName, idEntity* inflictor ) {
- // If there are still shields remaining then play a shield effect at the impact point
- if ( HasDrivers() && shieldHealth.GetCurrentValue ( gameLocal.time ) > 0 ) {
- jointHandle_t joint = animator.GetJointHandle( spawnArgs.GetString( "fx_shield_joint", "" ) );
- idVec3 dir;
- dir = collision.c.point - GetPhysics()->GetCenterMass ();
- dir.NormalizeFast ( );
- if ( INVALID_JOINT == joint ) {
- PlayEffect ( "fx_shield", collision.c.point, dir.ToMat3(), false, vec3_origin, true );
- } else {
- PlayEffect ( "fx_shield", joint, false, vec3_origin, true );
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement