Пример #1
0
 public void hitByExplosion(
     CollisionParticipant source, LocalObject obj, DecalManager decal, CollisionEvent ce) {
   if (shield.getVisibility()) {
     // If the shield is visible, we are invincible...
     return;
   }
   Event event = new Event(Event.EXPLOSION_HIT, -99, obj.getObjectID(), obj.getClientID());
   source.getEventQueue().add(event);
 }
Пример #2
0
 public void hitByExplosion(
     CollisionParticipant source, LocalObject obj, DecalManager decal, CollisionEvent ce) {
   if (!isInactive()) {
     Event event = new Event(Event.CRATE_HIT, -99, obj.getObjectID(), -99);
     int[] ids = ce.getPolygonIDs();
     if (ids != null) {
       // The Crates on the bot client don't return those IDs...and
       // they don't have to.
       PolygonManager pm = getPolygonManager();
       SimpleVector normal = pm.getTransformedNormal(ids[0]);
       event.setOrigin(normal);
     }
     source.getEventQueue().add(event);
   }
 }