it.freezetag_frozen_timeout = 0;
nades_Clear(it);
));
+ game_stopped = true;
round_handler_Init(5, autocvar_g_freezetag_warmup, autocvar_g_freezetag_round_timelimit);
return 1;
}
it.freezetag_frozen_timeout = 0;
nades_Clear(it);
));
+
+ game_stopped = true;
round_handler_Init(5, autocvar_g_freezetag_warmup, autocvar_g_freezetag_round_timelimit);
return 1;
}
void havocbot_goalrating_freeplayers(entity this, float ratingscale, vector org, float sradius)
{
+ float t;
FOREACH_CLIENT(IS_PLAYER(it) && it != this && SAME_TEAM(it, this), LAMBDA(
if (STAT(FROZEN, it) == 1)
{
continue;
navigation_routerating(this, it, ratingscale, 2000);
}
- else
+ else if(vdist(it.origin - org, >, 400)) // avoid gathering all teammates in one place
{
// If teamate is not frozen still seek them out as fight better
// in a group.
- navigation_routerating(this, it, ratingscale/3, 2000);
+ t = 0.2 * 150 / (this.health + this.armorvalue);
+ navigation_routerating(this, it, t * ratingscale, 2000);
}
));
}
havocbot_goalrating_items(this, 10000, this.origin, 10000);
havocbot_goalrating_enemyplayers(this, 20000, this.origin, 10000);
havocbot_goalrating_freeplayers(this, 9000, this.origin, 10000);
- //havocbot_goalrating_waypoints(1, this.origin, 1000);
+ havocbot_goalrating_waypoints(this, 1, this.origin, 3000);
navigation_goalrating_end(this);
}
}
havocbot_goalrating_items(this, 8000, this.origin, 10000);
havocbot_goalrating_enemyplayers(this, 10000, this.origin, 10000);
havocbot_goalrating_freeplayers(this, 20000, this.origin, 10000);
- //havocbot_goalrating_waypoints(1, this.origin, 1000);
+ havocbot_goalrating_waypoints(this, 1, this.origin, 3000);
navigation_goalrating_end(this);
}
}
MUTATOR_HOOKFUNCTION(ft, reset_map_players)
{
FOREACH_CLIENT(IS_PLAYER(it), LAMBDA(
- it.killcount = 0;
+ CS(it).killcount = 0;
it.freezetag_frozen_timeout = -1;
PutClientInServer(it);
it.freezetag_frozen_timeout = 0;
MUTATOR_HOOKFUNCTION(ft, PlayerPreThink, CBC_ORDER_FIRST)
{
- if(gameover)
+ if(game_stopped)
return true;
if(round_handler_IsActive())
if(STAT(FROZEN, frag_target))
return; // target was already frozen, so this is just pushing them off the cliff
- Send_Notification(NOTIF_ONE, frag_attacker, MSG_CHOICE, CHOICE_FRAG_FREEZE, frag_target.netname, kill_count_to_attacker, (IS_BOT_CLIENT(frag_target) ? -1 : frag_target.ping));
- Send_Notification(NOTIF_ONE, frag_target, MSG_CHOICE, CHOICE_FRAGGED_FREEZE, frag_attacker.netname, kill_count_to_target, frag_attacker.health, frag_attacker.armorvalue, (IS_BOT_CLIENT(frag_attacker) ? -1 : frag_attacker.ping));
+ Send_Notification(NOTIF_ONE, frag_attacker, MSG_CHOICE, CHOICE_FRAG_FREEZE, frag_target.netname, kill_count_to_attacker, (IS_BOT_CLIENT(frag_target) ? -1 : CS(frag_target).ping));
+ Send_Notification(NOTIF_ONE, frag_target, MSG_CHOICE, CHOICE_FRAGGED_FREEZE, frag_attacker.netname, kill_count_to_target, frag_attacker.health, frag_attacker.armorvalue, (IS_BOT_CLIENT(frag_attacker) ? -1 : CS(frag_attacker).ping));
return true;
}