spheretrigger.c 472 B

1234567891011121314151617
  1. //! Trigger with spherical shape
  2. class SphereTrigger : Trigger
  3. {
  4. override void EOnInit(IEntity other, int extra)
  5. {
  6. SetCollisionSphere(3);
  7. }
  8. #ifdef DEVELOPER
  9. override protected Shape DrawDebugShape(vector pos, vector min, vector max, float radius, int color)
  10. {
  11. Shape dbgShape = Debug.DrawSphere(pos, radius, color, ShapeFlags.TRANSP|ShapeFlags.NOZWRITE|ShapeFlags.NOOUTLINE|ShapeFlags.DOUBLESIDE);
  12. dbgTargets.Insert( dbgShape );
  13. return dbgShape;
  14. }
  15. #endif
  16. };