set g_monsters_drop_time 10
set g_monsters_owners 1
set g_monsters_teams 1
+set g_monsters_score_kill 0
+set g_monsters_score_spawned 0
set g_monsters_spawnshieldtime 2
set g_monsters_typefrag 1
set g_monsters_target_range 2000
set g_monsters_attack_range 120
set g_monsters_respawn 1
set g_monsters_respawn_delay 20
-set g_monsters_score_kill 1
set g_monsters_max 20
set g_monsters_max_perplayer 0
set g_monsters_armor_blockpercent 0.5
self.monster_respawned = TRUE;
self.think = self.monster_spawnfunc;
self.nextthink = time + self.respawntime;
+ self.ltime = 0;
self.deadflag = DEAD_RESPAWNING;
if(self.spawnflags & MONSTER_RESPAWN_DEATHPOINT)
{
self.SendFlags |= MSF_STATUS;
}
else
+ {
+ if(IS_CLIENT(self.realowner))
+ if not(self.monster_respawned)
+ self.realowner.monstercount -= 1;
+
SUB_SetFade(self, time + 3, 1);
+ }
}
float Monster_CanJump (vector vel)
}
}
-void monster_die()
+void monster_die(entity attacker)
{
self.think = monster_dead_think;
self.nextthink = self.ticrate;
if(!(self.spawnflags & MONSTERFLAG_SPAWNED) && !self.monster_respawned)
monsters_killed += 1;
+
+ if(IS_PLAYER(attacker))
+ if( autocvar_g_monsters_score_spawned ||
+ ( !(self.spawnflags & MONSTERFLAG_SPAWNED) && !self.monster_respawned) )
+ PlayerScore_Add(attacker, SP_SCORE, +autocvar_g_monsters_score_kill);
+
if(self.candrop && self.weapon)
W_ThrowNewWeapon(self, self.weapon, 0, self.origin, randomvec() * 150 + '0 0 325');
- if(IS_CLIENT(self.realowner))
- if not(self.monster_respawned)
- self.realowner.monstercount -= 1;
-
self.event_damage = monsters_corpse_damage;
self.solid = SOLID_CORPSE;
self.takedamage = DAMAGE_AIM;
vector v;
float take, save;
- v = healtharmor_applydamage(self.armorvalue, self.m_armor_blockpercent, damage);
+ v = healtharmor_applydamage(self.armorvalue, self.m_armor_blockpercent, damage, deathtype);
take = v_x;
save = v_y;
SUB_UseTargets();
self.target2 = self.oldtarget2; // reset to original target on death, incase we respawn
- monster_die();
-
+ monster_die(attacker);
+
frag_attacker = attacker;
frag_target = self;
MUTATOR_CALLHOOK(MonsterDies);
MULTITEAM_INFO(1, INFO_KEYHUNT_PICKUP_, 4, 1, 0, "s1", "", "", _("^BG%s^BG picked up the ^TC^TT Key"), "") \
MSG_INFO_NOTIF(1, INFO_LMS_FORFEIT, 1, 0, "s1", "", "", _("^BG%s^F3 forfeited"), "") \
MSG_INFO_NOTIF(1, INFO_LMS_NOLIVES, 1, 0, "s1", "", "", _("^BG%s^F3 has no more lives left"), "") \
- MSG_INFO_NOTIF(1, INFO_MONSTERS_DISABLED, 0, 0, "", "", "", _("^BGMonsters are currently disabled"), "") \
+ MSG_INFO_NOTIF(1, INFO_MONSTERS_DISABLED, 0, 0, "", "", "", _("^BGMonsters are currently disabled"), "") \
MSG_INFO_NOTIF(1, INFO_POWERUP_INVISIBILITY, 1, 0, "s1", "s1", "strength", _("^BG%s^K1 picked up Invisibility"), "") \
MSG_INFO_NOTIF(1, INFO_POWERUP_SHIELD, 1, 0, "s1", "s1", "shield", _("^BG%s^K1 picked up Shield"), "") \
MSG_INFO_NOTIF(1, INFO_POWERUP_SPEED, 1, 0, "s1", "s1", "shield", _("^BG%s^K1 picked up Speed"), "") \
float autocvar_g_monsters_target_range;
float autocvar_g_monsters_target_infront;
float autocvar_g_monsters_attack_range;
+float autocvar_g_monsters_score_kill;
+float autocvar_g_monsters_score_spawned;
float autocvar_g_monsters_typefrag;
float autocvar_g_monsters_owners;
float autocvar_g_monsters_miniboss_chance;