.vector glowmod;
-.float miniboss;
void monster_changeteam()
{
self.glowmod = Team_ColorRGB(self.team - 1);
void monster_construct()
{
entity mon = get_monsterinfo(self.monsterid);
- vector min_s, max_s;
- if(self.miniboss)
- {
- if(mon.spawnflags & MONSTER_SIZE_BROKEN)
- self.scale = 1.95;
- else
- self.scale = 1.5;
-
- min_s = mon.mins * 1.5;
- max_s = mon.maxs * 1.5;
-
- }
- else
- {
- if(mon.spawnflags & MONSTER_SIZE_BROKEN)
- self.scale = 1.3;
- else
- self.scale = 1;
-
- min_s = mon.mins;
- max_s = mon.maxs;
- }
+ if(mon.spawnflags & MONSTER_SIZE_BROKEN)
+ self.scale = 1.3;
self.netname = M_NAME(self.monsterid);
setorigin(self, self.origin);
setmodel(self, mon.model);
- setsize(self, min_s, max_s);
+ setsize(self, mon.mins, mon.maxs);
self.move_movetype = MOVETYPE_BOUNCE;
self.health = 255;
self.skin = ReadByte();
self.team = ReadByte();
-
- self.miniboss = ReadByte();
monster_construct();
monster_changeteam();
self.health += autocvar_g_monsters_miniboss_healthboost;
if not(self.weapon)
self.weapon = WEP_NEX;
-
- entity mon = get_monsterinfo(self.monsterid);
-
- if(mon.spawnflags & MONSTER_SIZE_BROKEN)
- self.scale = 1.95;
- else
- self.scale = 1.5;
-
- setsize(self, mon.mins * 1.5, mon.maxs * 1.5);
- setorigin(self, self.origin + '0 0 25'); // offset so we don't fall through the floor
}
}
WriteByte(MSG_ENTITY, self.skin);
WriteByte(MSG_ENTITY, self.team);
- WriteByte(MSG_ENTITY, (self.spawnflags & MONSTERFLAG_MINIBOSS));
}
if(sf & MSF_ANG)
if not(self.spawnflags & MONSTERFLAG_SPAWNED) // naturally spawned monster
if not(self.monster_respawned)
monsters_total += 1;
-
+
setsize(self, mon.mins, mon.maxs);
self.flags = FL_MONSTER;
self.takedamage = DAMAGE_AIM;
self.reset = monsters_reset;
self.netname = mon.netname;
self.monster_name = M_NAME(mon_id);
- self.scale = 1;
self.candrop = TRUE;
self.view_ofs = '0 0 1' * (self.maxs_z * 0.5);
self.oldtarget2 = self.target2;
self.deadflag = DEAD_NO;
+ self.scale = 1;
self.noalign = nodrop;
self.spawn_time = time;
self.gravity = 1;
self.flags |= FL_FLY;
self.movetype = MOVETYPE_FLY;
}
-
+
if(mon.spawnflags & MONSTER_SIZE_BROKEN)
self.scale = 1.3;