void flyer_stand (edict_t *self) { if (self->mass > 50) flyer_run (self); else self->monsterinfo.currentmove = &flyer_move_stand; }
void flyer_attack (edict_t *self) { float chance; /* if (random() <= 0.5) self->monsterinfo.currentmove = &flyer_move_attack1; else */ // 0% chance of circle in easy // 50% chance in normal // 75% chance in hard // 86.67% chance in nightmare if (self->mass > 50) { flyer_run (self); return; } if (!skill->value) chance = 0; else chance = 1.0 - (0.5/(float)(skill->value)); if (random() > chance) { self->monsterinfo.attack_state = AS_STRAIGHT; self->monsterinfo.currentmove = &flyer_move_attack2; } else // circle strafe { if (random () <= 0.5) // switch directions self->monsterinfo.lefty = 1 - self->monsterinfo.lefty; self->monsterinfo.attack_state = AS_SLIDING; self->monsterinfo.currentmove = &flyer_move_attack3; } }
void flyer_attack(edict_t *self) { //mxd if (self->class_id == ENTITY_MONSTER_FLYER_KAMIKAZE) { flyer_run(self); return; } //mxd. Added circle-strafe attack const float chance = (skill->value ? 1.0f - (0.5f / skill->value) : 0.0f); if (random() > chance) { self->monsterinfo.attack_state = AS_STRAIGHT; self->monsterinfo.currentmove = &flyer_move_attack2; } else // Circle-strafe { if (random() <= 0.5) // Switch directions self->monsterinfo.lefty = 1 - self->monsterinfo.lefty; self->monsterinfo.attack_state = AS_SLIDING; self->monsterinfo.currentmove = &flyer_move_attack3; } }
void flyer_stand(edict_t *self) { if (self->class_id == ENTITY_MONSTER_FLYER_KAMIKAZE) //mxd flyer_run(self); else self->monsterinfo.currentmove = &flyer_move_stand; }
void flyer_melee(edict_t *self) { // mxd if (self->class_id == ENTITY_MONSTER_FLYER_KAMIKAZE) flyer_run(self); else self->monsterinfo.currentmove = &flyer_move_start_melee; }
void flyer_melee (edict_t *self) { // flyer.nextmove = ACTION_attack1; // self->monsterinfo.currentmove = &flyer_move_stop; if (self->mass > 50) flyer_run (self); else self->monsterinfo.currentmove = &flyer_move_start_melee; }
void flyer_melee(edict_t *self) { if (!self) { return; } if (self->mass > 50) { flyer_run(self); } else { self->monsterinfo.currentmove = &flyer_move_start_melee; } }
void flyer_attack(edict_t *self) { float chance; if (!self) { return; } if (self->mass > 50) { flyer_run(self); return; } if (!skill->value) { chance = 0; } else { chance = 1.0 - (0.5 / (float)(skill->value)); } if (random() > chance) { self->monsterinfo.attack_state = AS_STRAIGHT; self->monsterinfo.currentmove = &flyer_move_attack2; } else /* circle strafe */ { if (random() <= 0.5) /* switch directions */ { self->monsterinfo.lefty = 1 - self->monsterinfo.lefty; } self->monsterinfo.attack_state = AS_SLIDING; self->monsterinfo.currentmove = &flyer_move_attack3; } }