source-sdk-2013 icon indicating copy to clipboard operation
source-sdk-2013 copied to clipboard

[TF2] Make baseball/ornament appearance and behavior consistent when reflected

Open Tkain opened this issue 1 month ago • 0 comments

Description

In TF2, when most projectiles (barring sticky bombs) are reflected by an enemy, they change to the team of the enemy reflector, changing their appearance to that of the enemy team as a result. However, the Sandman's baseballs and the Wrap Assassin's ornaments have a few visual (and audial) discrepancies between their displayed and actual teams when reflected:

  • Baseballs and ornaments have auras of both teams' colors when reflected.
  • Unlike other projectile trails, baseballs' and ornaments' trails do not change colors when reflected by an enemy.
  • Ornaments' shatter particles use their original thrower's team color rather than their current team color.
  • Ornaments' shatter sounds play more loudly to their original thrower rather than the person who last reflected them.
  • Unlike other projectiles, reflected baseball and ornament kills are attributed to the person who threw the ball rather than the person who reflected the ball.

These can be observed below:

Current baseball/ornament behavior

Reflected baseball/ornament particles and sounds (note: host_timescale set to 0.5 for clarity):

https://github.com/user-attachments/assets/b225238f-38f0-46ad-b7e2-2748d339beb9

Reflected baseball/ornament kill attribution:

Baseball reflect kill without PR

This PR attempts to resolve these inconsistencies, ensuring that these characteristics correspond to (the team of) the enemy reflector after these projectiles are reflected. These changes can be observed below:

Baseball/ornament behavior with this PR

Reflected baseball/ornament particles and sounds (also with host_timescale set to 0.5):

https://github.com/user-attachments/assets/99240b00-1722-4a7c-8f41-674c320adf9f

Reflected baseball/ornament kill attribution:

Baseball reflect kill with PR

Although they work best together, these changes are largely independent of one another, so feel free to cherry-pick them as you'd like.

Tkain avatar Nov 14 '25 22:11 Tkain