if((IS_GAMETYPE(FREEZETAG) || IS_GAMETYPE(LMS))
&& (itm != ITEM_ArmorSmall || itm != ITEM_HealthSmall))
{
- print_to(e, "Non-regular items can't be spawned on survival-type gamemodes");
+ // Non-regular items can't be spawned on survival-type gamemodes
itm = (random() > 0.5) ? ITEM_ArmorSmall : ITEM_HealthSmall;
}
e.spawnfunc_checked = true;
e.pokenade_type = this.pokenade_type;
+ // Items can't be spawned on CA and Instagib
if(!IS_GAMETYPE(CA) && !autocvar_g_instagib)
{
switch (this.pokenade_type)
default : { nade_tandem_spawnitem(e, org); return; }
}
}
- else print_to(this, "Items can't be spawned on CA and Instagib");
}
void tandem_ball_think(entity this)
if(!e_target)
return -2;
- if(e_target.owner == e_turret)
+ // Don't attack against owner
+ if(e_target.owner == e_turret || e_target == e_turret.realowner)
return -0.5;
if(!checkpvs(e_target.origin, e_turret))
if(this.tur_spawned && this.turret_lifetime != 0)
if(time >= this.turret_lifetime)
{
- tmp_vehcount--;
+ tmp_turcount--;
turret_die(this);
return;
// Check if we have a vailid enemy, and try to find one if we dont.
- // Don't attack against owner
- if(turret_select_target(this) == this.realowner) return;
-
// g_turrets_targetscan_maxdelay forces a target re-scan at least this often
float do_target_scan = 0;
if((this.target_select_time + autocvar_g_turrets_targetscan_maxdelay) < time)
if((this.target_select_time + autocvar_g_turrets_targetscan_maxdelay) < time)
do_target_scan = 1;
- if(turret_select_target(this) == this.realowner)
- return false;
-
// Old target (if any) invalid?
if(this.target_validate_time < time)
if (turret_validate_target(this, this.enemy, this.target_validate_flags) <= 0)