Guest User

Untitled

a guest
Aug 19th, 2016
43
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. ================
  3. rvVehicle::AddDamageEffect
  4. ================
  5. */
  6. void rvVehicle::AddDamageEffect ( const trace_t &collision, const idVec3 &velocity, const char *damageDefName, idEntity* inflictor ) {
  7. // If there are still shields remaining then play a shield effect at the impact point
  8. if ( HasDrivers() && shieldHealth.GetCurrentValue ( gameLocal.time ) > 0 ) {
  9. jointHandle_t joint = animator.GetJointHandle( spawnArgs.GetString( "fx_shield_joint", "" ) );
  10. idVec3 dir;
  11. dir = collision.c.point - GetPhysics()->GetCenterMass ();
  12. dir.NormalizeFast ( );
  13. if ( INVALID_JOINT == joint ) {
  14. PlayEffect ( "fx_shield", collision.c.point, dir.ToMat3(), false, vec3_origin, true );
  15. } else {
  16. PlayEffect ( "fx_shield", joint, false, vec3_origin, true );
  17. }
  18. }
  19. }
RAW Paste Data