...
 
Commits (3)
......@@ -579,7 +579,7 @@ MUTATOR_HOOKFUNCTION(as, TurretSpawn)
entity turret = M_ARGV(0, entity);
if(!turret.team || turret.team == FLOAT_MAX)
turret.team = 5; // this gets reversed when match starts?
turret.team = assault_attacker_team; // this gets reversed when match starts (assault_roundstart_use)
}
MUTATOR_HOOKFUNCTION(as, VehicleInit)
......@@ -626,7 +626,7 @@ MUTATOR_HOOKFUNCTION(as, ReadLevelCvars)
MUTATOR_HOOKFUNCTION(as, OnEntityPreSpawn)
{
entity ent = M_ARGV(0, entity);
entity ent = M_ARGV(0, entity);
switch(ent.classname)
{
......
......@@ -1288,6 +1288,11 @@ void turret_findtarget(entity this)
this.idle_aim = this.tur_head.angles + angleofs(this.tur_head, targ);
}
void turret_reset(entity this)
{
turret_respawn(this);
}
bool turret_initialize(entity this, Turret tur)
{
if(!autocvar_g_turrets)
......@@ -1381,8 +1386,8 @@ bool turret_initialize(entity this, Turret tur)
this.event_heal = turret_heal;
this.use = turret_use;
this.bot_attack = true;
this.nextthink = time + 1;
this.nextthink += turret_count * sys_frametime;
this.nextthink = time + 1 + turret_count * sys_frametime;
this.reset = turret_reset;
this.tur_head = new(turret_head);
_setmodel(this.tur_head, tur.head_model);
......
......@@ -658,7 +658,7 @@ void Draw_Shockwave(entity this)
if(a < ALPHA_MIN_VISIBLE) { delete(this); }
// WEAPONTODO: save this only once when creating the entity
vector sw_color = entcs_GetColor(this.sv_entnum - 1); // GetTeamRGB(entcs_GetTeam(this.sv_entnum));
vector sw_color = entcs_GetColor(this.sv_entnum - 1); // Team_ColorRGB(entcs_GetTeam(this.sv_entnum));
// WEAPONTODO: trace to find what we actually hit
vector endpos = (this.sw_shotorg + (this.sw_shotdir * this.sw_distance));
......
......@@ -1903,7 +1903,7 @@ void navigation_unstuck(entity this)
{
// evaluate the next goal on the queue
float d = vlen2(this.origin - bot_waypoint_queue_goal.origin);
LOG_DEBUG(this.netname, " evaluating ", bot_waypoint_queue_goal.classname, " with distance ", ftos(d));
LOG_DEBUG(this.netname, " evaluating ", bot_waypoint_queue_goal.classname, " with squared distance ", ftos(d));
set_tracewalk_dest(bot_waypoint_queue_goal, this.origin, false);
if (tracewalk(this, this.origin, STAT(PL_MIN, this), STAT(PL_MAX, this),
tracewalk_dest, tracewalk_dest_height, bot_navigation_movemode))
......
......@@ -464,8 +464,8 @@ entity TeamBalance_CheckAllowedTeams(entity for_whom)
team_ent.m_num_bots = 0;
}
setthink(balance, TeamBalance_Destroy);
int teams_mask = 0;
int teams_mask = 0;
string teament_name = string_null;
bool mutator_returnvalue = MUTATOR_CALLHOOK(TeamBalance_CheckAllowedTeams,
teams_mask, teament_name, for_whom);
......