if ((self.spawnflags & MONSTERFLAG_MINIBOSS) || (chance < autocvar_g_monsters_miniboss_chance))
{
self.health += autocvar_g_monsters_miniboss_healthboost;
- self.flags |= MONSTERFLAG_MINIBOSS;
if not(self.weapon)
self.weapon = WEP_NEX;
}
monster_makevectors(self.enemy);
- W_SetupShot (self, autocvar_g_antilag_bullets && 18000 >= autocvar_g_antilag_bullets, 0, "weapons/uzi_fire.wav", CH_WEAPON_A, MON_CVAR(brute, attack_uzi_damage));
- fireBallisticBullet(w_shotorg, w_shotdir, 0.02, 18000, 5, MON_CVAR(brute, attack_uzi_damage), MON_CVAR(brute, attack_uzi_force), DEATH_MONSTER_BRUTE_UZI, 0, 1, 115);
+ sound(self, CH_WEAPON_A, "weapons/uzi_fire.wav", VOL_BASE, ATTN_NORM);
+ fireBallisticBullet(CENTER_OR_VIEWOFS(self), v_forward, 0.02, 18000, 5, MON_CVAR(brute, attack_uzi_damage), MON_CVAR(brute, attack_uzi_force), DEATH_MONSTER_BRUTE_UZI, 0, 1, 115);
endFireBallisticBullet();
if(self.brute_cycles <= MON_CVAR(brute, attack_uzi_bullets))
void brute_grenade()
{
entity gren;
-
- W_SetupShot_ProjectileSize (self, '-3 -3 -3', '3 3 3', FALSE, 4, "weapons/grenade_fire.wav", CH_WEAPON_A, MON_CVAR(brute, attack_grenade_damage));
- w_shotdir = v_forward; // no TrueAim for grenades please
+
+ monster_makevectors(self.enemy);
+
+ sound(self, CH_WEAPON_A, "weapons/grenade_fire.wav", VOL_BASE, ATTN_NORM);
gren = spawn ();
gren.owner = gren.realowner = self;
gren.movetype = MOVETYPE_BOUNCE;
PROJECTILE_MAKETRIGGER(gren);
gren.projectiledeathtype = DEATH_MONSTER_BRUTE_GRENADE;
- setorigin(gren, w_shotorg);
+ setorigin(gren, CENTER_OR_VIEWOFS(self));
setsize(gren, '-3 -3 -3', '3 3 3');
gren.cnt = time + 5;
gren.event_damage = brute_grenade_damage;
gren.damagedbycontents = TRUE;
gren.missile_flags = MIF_SPLASH | MIF_ARC;
- W_SetupProjectileVelocityEx(gren, w_shotdir, v_up, MON_CVAR(brute, attack_grenade_speed), MON_CVAR(brute, attack_grenade_speed_up), 0, 0, FALSE);
+ W_SetupProjectileVelocityEx(gren, v_forward, v_up, MON_CVAR(brute, attack_grenade_speed), MON_CVAR(brute, attack_grenade_speed_up), 0, 0, FALSE);
gren.angles = vectoangles (gren.velocity);
gren.flags = FL_PROJECTILE;
{
float chance = random();
monsters_setframe((random() > 0.5) ? knight_anim_death1 : knight_anim_death2);
- if(chance < 0.10 || self.flags & MONSTERFLAG_MINIBOSS)
+ if(chance < 0.10 || self.spawnflags & MONSTERFLAG_MINIBOSS)
if(self.candrop)
{
self.superweapons_finished = time + autocvar_g_balance_superweapons_time + 5; // give the player a few seconds to find the weapon
void mage_throw_itemgrenade()
{
makevectors(self.angles);
-
- W_SetupShot_ProjectileSize (self, '-64 -64 -64', '64 64 64', FALSE, 4, "", CH_WEAPON_A, MON_CVAR(mage, attack_grenade_damage));
- w_shotdir = v_forward; // no TrueAim for grenades please
-
+
entity gren = spawn ();
gren.owner = gren.realowner = self;
gren.classname = "grenade";
gren.touch = mage_grenade_touch;
gren.missile_flags = MIF_SPLASH | MIF_ARC;
- W_SetupProjectileVelocityEx(gren, w_shotdir, v_up, MON_CVAR(mage, attack_grenade_speed), MON_CVAR(mage, attack_grenade_speed_up), 0, 0, FALSE);
+ W_SetupProjectileVelocityEx(gren, v_forward, v_up, MON_CVAR(mage, attack_grenade_speed), MON_CVAR(mage, attack_grenade_speed_up), 0, 0, FALSE);
gren.flags = FL_PROJECTILE;
}
vector fmins = '-4 -4 -4', fmaxs = '4 4 4';
-
- W_SetupShot_ProjectileSize(self, fmins, fmaxs, FALSE, 2, snd, CH_WEAPON_A, 0);
-
- w_shotdir = v_forward; // no TrueAim for grenades please
+
+ monster_makevectors(self.enemy);
+
+ sound(self, CH_SHOTS, snd, VOL_BASE, ATTN_NORM);
entity proj = spawn ();
proj.classname = "plasma";
proj.nextthink = time + 5;
PROJECTILE_MAKETRIGGER(proj);
proj.projectiledeathtype = DEATH_MONSTER_SPIDER_FIRE;
- setorigin(proj, w_shotorg);
+ setorigin(proj, CENTER_OR_VIEWOFS(self));
//proj.glow_size = 50;
//proj.glow_color = 45;
proj.movetype = MOVETYPE_BOUNCE;
- W_SetupProjectileVelocityEx(proj, w_shotdir, v_up, MON_CVAR(spider, attack_web_speed), MON_CVAR(spider, attack_web_speed_up), 0, 0, FALSE);
+ W_SetupProjectileVelocityEx(proj, v_forward, v_up, MON_CVAR(spider, attack_web_speed), MON_CVAR(spider, attack_web_speed_up), 0, 0, FALSE);
proj.touch = spider_web_touch;
setsize(proj, fmins, fmaxs);
proj.takedamage = DAMAGE_NO;
monsters_setframe(spider_anim_attack2);
self.attack_finished_single = time + MON_CVAR(spider, attack_web_delay);
- monster_makevectors(self.enemy);
spider_shootweb(self.spider_type);
return TRUE;
// track max damage
if(accuracy_canbegooddamage(ent))
accuracy_add(ent, ent.weapon, maxdamage, 0);
-
- if not(ent.flags & FL_MONSTER)
- W_HitPlotAnalysis(ent, v_forward, v_right, v_up);
+
+ W_HitPlotAnalysis(ent, v_forward, v_right, v_up);
if(ent.weaponentity.movedir_x > 0)
vecs = ent.weaponentity.movedir;
if(IS_PLAYER(player))
Send_Notification(NOTIF_ONE, player, MSG_CENTER, APP_TEAM_ENT_2(flag, CENTER_CTF_RETURN_));
- Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_RETURN_), player.netname);
+ Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_RETURN_), (player.flags & FL_MONSTER) ? player.monster_name : player.netname);
sound(player, CH_TRIGGER, flag.snd_flag_returned, VOL_BASE, ATTN_NONE);
ctf_EventLog("return", flag.team, player);