Toxomister respects teams, uses team colors

This commit is contained in:
Antonio Martinez 2025-08-21 16:57:25 -04:00
parent 43b93daaad
commit a50aa7e814

View file

@ -358,6 +358,9 @@ struct Cloud : Mobj
if (K_PuntCollide(this, toucher)) if (K_PuntCollide(this, toucher))
return true; return true;
if (toucher->player && target() && !P_MobjWasRemoved(target()) && target()->player && G_SameTeam(toucher->player, target()->player))
return false;
if (toucher->player) if (toucher->player)
{ {
if (this == toucher->player->toxomisterCloud) // already attached if (this == toucher->player->toxomisterCloud) // already attached
@ -412,6 +415,12 @@ void Pole::spawn_clouds_in_orbit()
cloud->scale_between(1, cloud->scale(), cloud->scale() / 5); cloud->scale_between(1, cloud->scale(), cloud->scale() / 5);
cloud->fuse = 15*TICRATE; cloud->fuse = 15*TICRATE;
if (target()->player && target()->player->team)
{
cloud->colorized = true;
cloud->color = target()->color;
}
a += a_incr; a += a_incr;
} }
} }