case "item-shield": return _("Shield");
case "item-fuelregen": return _("Fuel regen");
case "item-jetpack": return _("Jet Pack");
- case "freezetag_frozen": return _("Frozen!");
+ case "frozen": return _("Frozen!");
case "tagged-target": return _("Tagged");
case "vehicle": return _("Vehicle");
default: return s;
self.nextthink = time;
}
-void Freeze (entity targ, float freeze_time, float frozen_type)
+void Freeze (entity targ, float freeze_time, float frozen_type, float show_waypoint)
{
float monster = (targ.flags & FL_MONSTER);
float player = (targ.flags & FL_CLIENT);
self = oldself;
RemoveGrapplingHook(targ);
+
+ // add waypoint
+ if(show_waypoint)
+ WaypointSprite_Spawn("frozen", 0, 0, targ, '0 0 64', world, targ.team, targ, waypointsprite_attached, TRUE, RADARICON_WAYPOINT, '0.25 0.90 1');
}
void Unfreeze (entity targ)
targ.frozen = 0;
targ.revive_progress = 0;
targ.health = ((targ.classname == STR_PLAYER) ? autocvar_g_balance_health_start : targ.max_health);
+
+ WaypointSprite_Kill(targ.waypointsprite_attached);
// remove the ice block
entity ice;
switch(self.realowner.spider_type)
{
case SPIDER_TYPE_ICE:
- Freeze(other, 0.3, 2);
+ Freeze(other, 0.3, 2, FALSE);
break;
case SPIDER_TYPE_FIRE:
Fire_AddDamage(other, self.realowner, 5 * monster_skill, autocvar_g_monster_spider_attack_fire_time, DEATH_MONSTER_SPIDER_FIRE);
{
if(self.frozen)
return;
-
- self.health = 1;
- Freeze(self, 0, 1);
-
- // add waypoint
- WaypointSprite_Spawn("freezetag_frozen", 0, 0, self, '0 0 64', world, self.team, self, waypointsprite_attached, TRUE, RADARICON_WAYPOINT, '0.25 0.90 1');
+ Freeze(self, 0, 1, TRUE);
if(attacker == self)
{
}
}
-void freezetag_Unfreeze(entity attacker)
-{
- Unfreeze(self);
-
- // remove waypoint
- if(self.waypointsprite_attached)
- WaypointSprite_Kill(self.waypointsprite_attached);
-}
-
// ================
// Bot player logic
if(total_players > 2) // only check for winners if we had more than two players (one of them left, don't let the other player win just because of that)
freezetag_CheckWinner();
- freezetag_Unfreeze(world);
+ Unfreeze(self);
return 1;
}
MUTATOR_HOOKFUNCTION(freezetag_PlayerSpawn)
{
- freezetag_Unfreeze(world); // start by making sure that all ice blocks are removed
+ Unfreeze(self); // start by making sure that all ice blocks are removed
if(total_players == 1 && time > game_starttime) // only one player active on server, start a new match immediately
if(!next_round && warmup && (time < warmup - autocvar_g_freezetag_warmup || time > warmup)) // not awaiting next round
if(self.revive_progress >= 1)
{
- freezetag_Unfreeze(self);
+ Unfreeze(self);
// EVERY team mate nearby gets a point (even if multiple!)
FOR_EACH_PLAYER(other) if(self != other)