mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'team-tox' into 'master'
Toxomister respects teams, uses team colors Closes #1631 See merge request kart-krew-dev/ring-racers-internal!2746
This commit is contained in:
commit
ec6f0582eb
1 changed files with 10 additions and 1 deletions
|
|
@ -301,7 +301,7 @@ struct Cloud : Mobj
|
|||
|
||||
bob_in_place(this, 8, 64);
|
||||
voice_loop(sfx_s3kcfl);
|
||||
|
||||
|
||||
if (leveltime % (TICRATE/3) == 0 && follow()->player->rings > -20) // toxomister ring drain
|
||||
{
|
||||
follow()->player->rings--;
|
||||
|
|
@ -358,6 +358,9 @@ struct Cloud : Mobj
|
|||
if (K_PuntCollide(this, toucher))
|
||||
return true;
|
||||
|
||||
if (toucher->player && target() && !P_MobjWasRemoved(target()) && target()->player && G_SameTeam(toucher->player, target()->player))
|
||||
return false;
|
||||
|
||||
if (toucher->player)
|
||||
{
|
||||
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->fuse = 15*TICRATE;
|
||||
|
||||
if (target()->player && target()->player->team)
|
||||
{
|
||||
cloud->colorized = true;
|
||||
cloud->color = target()->color;
|
||||
}
|
||||
|
||||
a += a_incr;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue