set g_monsters_drop_size medium "Size of the item monsters drop. Possible health/amor values are: small, medium, large. Possible ammo values are: shells, bullets, cells, rockets"
set g_monsters_owners 1 "Monsters will not attack their owners in team matches if set to 1"
set g_monsters_teams 1
-set g_monster_spawnshieldtime 2 "Monsters will not take damage for this amount of seconds"
+set g_monsters_spawnshieldtime 2 "Monsters will not take damage for this amount of seconds"
set g_monsters_typefrag 1
set g_monsters_healthbars 1 "Show health bars above monsters"
set g_monsters_target_range 2000
.vector glowmod;
void monster_changeteam()
-{
+{
self.glowmod = Team_ColorRGB(self.team - 1);
self.teamradar_color = Team_ColorRGB(self.team - 1);
self.move_velocity = self.velocity;
self.move_origin = self.origin;
}
-
+
if(sf & MSF_ANIM)
{
self.frame1time = ReadCoord();
float autocvar_g_monsters_drop_time;
string autocvar_g_monsters_drop_type;
string autocvar_g_monsters_drop_size;
-float autocvar_g_monster_spawnshieldtime;
+float autocvar_g_monsters_spawnshieldtime;
float autocvar_g_monsters_teams;
float autocvar_g_monsters_healthbars;
float autocvar_g_monsters_respawn_delay;
}
// TD winning condition:
-// game terminates if there are no generators (or 1 dies if td_dontend is FALSE)
+// game terminates if there are no generators (or 1 dies if td_dont_end is FALSE)
float gensurvived;
float WinningCondition_TowerDefense()
{
return WINNING_NO;
// first check if the game has ended
- if(gendestroyed == TRUE) // FALSE means either generator hasen't spawned yet, or mapper didn't add one
+ if(gendestroyed == TRUE)
if(td_gencount < 1 || !td_dont_end)
{
ClearWinners();
if(gensurvived)
{
ClearWinners();
- SetWinners(winning, 4);
+ checkrules_equality = TRUE;
return WINNING_YES;
}
}
.float giblifetime;
-void ons_throwgib_think()
+
+void gib_draw_noburn()
{
- float d;
+ if(time >= self.giblifetime)
+ remove(self);
+}
- self.nextthink = time + 0.05;
+void gib_draw()
+{
+ if(time >= self.move_time)
+ return;
- d = self.giblifetime - time;
+ self.move_time = time + 0.05;
- if(d<0)
+ if(time > self.giblifetime)
{
- self.think = SUB_Remove;
+ remove(self);
+ return;
+ }
+
+ self.alpha -= 0.05;
+
+ if(self.alpha < 0.1)
+ {
+ remove(self);
return;
}
- if(d<1)
- self.alpha = d;
- if(d>2)
if(random()<0.6)
pointparticles(particleeffectnum("onslaught_generator_gib_flame"), self.origin, '0 0 0', 1);
}
setmodel(gib, smodel);
setorigin(gib, v_from);
gib.solid = SOLID_CORPSE;
+ gib.move_movetype = MOVETYPE_BOUNCE;
gib.movetype = MOVETYPE_BOUNCE;
- gib.health = -1;
+ gib.health = 255;
+ gib.move_velocity = v_to;
+ gib.move_origin = v_from;
gib.velocity = v_to;
+ gib.alpha = 1;
+ gib.move_time = time;
+ gib.drawmask = MASK_NORMAL;
gib.giblifetime = time + f_lifetime;
-
- if (b_burn)
- {
- gib.think = ons_throwgib_think;
- gib.nextthink = time + 0.05;
- }
+
+ if(b_burn)
+ gib.draw = gib_draw;
else
- {
- gib.think = SUB_Remove;
- gib.nextthink = time + gib.giblifetime;
- }
+ gib.draw = gib_draw_noburn;
}
void onslaught_generator_ray_think()
// White shockwave
if(self.count==40||self.count==20)
+ {
sound(self, CH_TRIGGER, "onslaught/shockwave.wav", VOL_BASE, ATTN_NORM);
+ pointparticles(particleeffectnum("electro_combo"), self.origin, '0 0 0', 6);
+ }
// Throw some gibs
if(random() < 0.3)
self.scale = 1;
self.movetype = MOVETYPE_WALK;
self.delay = -1; // used in attack delay code
- self.spawnshieldtime = time + autocvar_g_monster_spawnshieldtime;
+ self.spawnshieldtime = time + autocvar_g_monsters_spawnshieldtime;
monsters_spawned += 1;
self.enemy = world;
self.velocity = '0 0 0';
pointparticles(particleeffectnum("explosion_medium"), self.origin, '0 0 0', 1);
sound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
- Monster_CheckDropCvars ("slime"); // drop items after exploding to prevent player picking up item before dying
-
setmodel(self, "");
}
self.health = -100; // gibbed
slime_explode();
+ Monster_CheckDropCvars ("slime"); // drop items after exploding to prevent player picking up item before dying
+
+ self.deadflag = DEAD_DEAD;
self.think = Monster_Fade;
- self.nextthink = time;
+ self.nextthink = time + 0.1;
monster_hook_death();