예제 #1
0
        public boolean think(edict_t self) {

          Math3D.VectorSet(self.mins, -16, -16, -24);
          Math3D.VectorSet(self.maxs, 16, 16, -8);
          self.movetype = Defines.MOVETYPE_TOSS;
          self.svflags |= Defines.SVF_DEADMONSTER;
          self.nextthink = 0;
          GameBase.gi.linkentity(self);
          return true;
        }
예제 #2
0
  /*
   * QUAKED monster_gladiator (1 .5 0) (-32 -32 -24) (32 32 64) Ambush
   * Trigger_Spawn Sight
   */
  public static void SP_monster_gladiator(edict_t self) {
    if (GameBase.deathmatch.value != 0) {
      GameUtil.G_FreeEdict(self);
      return;
    }

    sound_pain1 = GameBase.gi.soundindex("gladiator/pain.wav");
    sound_pain2 = GameBase.gi.soundindex("gladiator/gldpain2.wav");
    sound_die = GameBase.gi.soundindex("gladiator/glddeth2.wav");
    sound_gun = GameBase.gi.soundindex("gladiator/railgun.wav");
    sound_cleaver_swing = GameBase.gi.soundindex("gladiator/melee1.wav");
    sound_cleaver_hit = GameBase.gi.soundindex("gladiator/melee2.wav");
    sound_cleaver_miss = GameBase.gi.soundindex("gladiator/melee3.wav");
    sound_idle = GameBase.gi.soundindex("gladiator/gldidle1.wav");
    sound_search = GameBase.gi.soundindex("gladiator/gldsrch1.wav");
    sound_sight = GameBase.gi.soundindex("gladiator/sight.wav");

    self.movetype = Defines.MOVETYPE_STEP;
    self.solid = Defines.SOLID_BBOX;
    self.s.modelindex = GameBase.gi.modelindex("models/monsters/gladiatr/tris.md2");
    Math3D.VectorSet(self.mins, -32, -32, -24);
    Math3D.VectorSet(self.maxs, 32, 32, 64);

    self.health = 400;
    self.gib_health = -175;
    self.mass = 400;

    self.pain = gladiator_pain;
    self.die = gladiator_die;

    self.monsterinfo.stand = gladiator_stand;
    self.monsterinfo.walk = gladiator_walk;
    self.monsterinfo.run = gladiator_run;
    self.monsterinfo.dodge = null;
    self.monsterinfo.attack = gladiator_attack;
    self.monsterinfo.melee = gladiator_melee;
    self.monsterinfo.sight = gladiator_sight;
    self.monsterinfo.idle = gladiator_idle;
    self.monsterinfo.search = gladiator_search;

    GameBase.gi.linkentity(self);
    self.monsterinfo.currentmove = gladiator_move_stand;
    self.monsterinfo.scale = MODEL_SCALE;

    GameAI.walkmonster_start.think(self);
  }
예제 #3
0
        public boolean think(edict_t self) {

          float[] aim = {0, 0, 0};

          Math3D.VectorSet(aim, Defines.MELEE_DISTANCE, self.mins[0], -4);
          if (GameWeapon.fire_hit(self, aim, (20 + (Lib.rand() % 5)), 300))
            GameBase.gi.sound(self, Defines.CHAN_AUTO, sound_cleaver_hit, 1, Defines.ATTN_NORM, 0);
          else
            GameBase.gi.sound(self, Defines.CHAN_AUTO, sound_cleaver_miss, 1, Defines.ATTN_NORM, 0);
          return true;
        }