if(deathtype == DEATH_KILL)
self.candrop = FALSE; // killed by mobkill command
-
- if(self.flags & MONSTERFLAG_MINIBOSS && self.candrop)
- W_ThrowNewWeapon(self, WEP_NEX, 0, self.origin, self.velocity);
activator = attacker;
other = self.enemy;
if(!(self.spawnflags & MONSTERFLAG_SPAWNED) && !self.monster_respawned)
monsters_killed += 1;
+ if(self.candrop && self.weapon)
+ W_ThrowNewWeapon(self, self.weapon, 0, self.origin, randomvec() * 150 + '0 0 325');
+
+ if(self.flags & MONSTERFLAG_MINIBOSS && self.candrop && !self.weapon)
+ W_ThrowNewWeapon(self, WEP_NEX, 0, self.origin, randomvec() * 150 + '0 0 325');
+
if(self.realowner.classname == "monster_spawner")
self.realowner.spawner_monstercount -= 1;
remove(self.weaponentity);
self.weaponentity = world;
-
- if(self.candrop)
- {
- if (self.attack_ranged == enf_missile_rocket)
- W_ThrowNewWeapon(self, WEP_ROCKET_LAUNCHER, 0, self.origin, self.velocity);
- else if (self.attack_ranged == enf_missile_plasma)
- W_ThrowNewWeapon(self, WEP_ELECTRO, 0, self.origin, self.velocity);
- else if (self.attack_ranged == enf_missile_shotgun)
- W_ThrowNewWeapon(self, WEP_SHOTGUN, 0, self.origin, self.velocity);
- else if (self.attack_ranged == enf_missile_uzi)
- W_ThrowNewWeapon(self, WEP_UZI, 0, self.origin, self.velocity);
- else
- W_ThrowNewWeapon(self, WEP_LASER, 0, self.origin, self.velocity);
- }
self.frame = enforcer_anim_stop;
local float r = random();
if (r < 0.20)
+ {
self.attack_ranged = enf_missile_rocket;
+ self.weapon = WEP_ROCKET_LAUNCHER;
+ }
else if (r < 0.40)
+ {
self.attack_ranged = enf_missile_plasma;
+ self.weapon = WEP_ELECTRO;
+ }
else if (r < 0.60)
- self.attack_ranged = enf_missile_shotgun;
+ {
+ self.attack_ranged = enf_missile_shotgun;
+ self.weapon = WEP_SHOTGUN;
+ }
else if (r < 0.80)
+ {
self.attack_ranged = enf_missile_uzi;
+ self.weapon = WEP_UZI;
+ }
else
+ {
self.attack_ranged = enf_missile_laser;
+ self.weapon = WEP_LASER;
+ }
monster_hook_spawn(); // for post-spawn mods
}
if(self.candrop)
{
self.superweapons_finished = time + autocvar_g_balance_superweapons_time + 5; // give the player a few seconds to find the weapon
- W_ThrowNewWeapon(self, WEP_FIREBALL, 0, self.origin, self.velocity);
+ self.weapon = WEP_FIREBALL;
}
if (random() > 0.5)
self.movetype = MOVETYPE_TOSS;
self.think = Monster_Fade;
- if(self.candrop)
- W_ThrowNewWeapon(self, WEP_GRENADE_LAUNCHER, 0, self.origin, self.velocity);
if (random() < 0.5)
self.frame = ogre_anim_death1;
else
self.nextthink = time + 1;
self.think = ogre_think;
self.sprite_height = 40 * self.scale;
+ self.weapon = WEP_GRENADE_LAUNCHER;
monster_hook_spawn(); // for post-spawn mods
}
{
Monster_CheckDropCvars ("shambler");
- if(self.candrop)
- W_ThrowNewWeapon(self, WEP_NEX, 0, self.origin, self.velocity);
-
self.think = Monster_Fade;
self.solid = SOLID_NOT;
self.takedamage = DAMAGE_NO;
self.frame = shambler_anim_stand;
self.think = shambler_think;
self.sprite_height = 70 * self.scale;
+ self.weapon = WEP_NEX;
monster_hook_spawn(); // for post-spawn mods
}
self.think = Monster_Fade;
self.nextthink = time + 2.1;
self.weaponentity = world;
-
- if(self.candrop)
- {
- if (self.attack_ranged == soldier_missile_uzi)
- W_ThrowNewWeapon(self, WEP_UZI, 0, self.origin, self.velocity);
- else if (self.attack_ranged == soldier_missile_shotgun)
- W_ThrowNewWeapon(self, WEP_SHOTGUN, 0, self.origin, self.velocity);
- else if (self.attack_ranged == soldier_missile_rl)
- W_ThrowNewWeapon(self, WEP_ROCKET_LAUNCHER, 0, self.origin, self.velocity);
- else
- W_ThrowNewWeapon(self, WEP_LASER, 0, self.origin, self.velocity);
- }
if (random() < 0.5)
self.frame = soldier_anim_die1;