[TF2] fix dragon's fury fireballs having incorrect projectile path #1746
+13
−16
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
the Dragon's Fury's fireballs seem to be the only projectiles with a spawn offset that don't get their path corrected to be pointed at the player's crosshair
this is because the df never uses the GetProjectileFireSetup method which handles projectile path correction:
source-sdk-2013/src/game/shared/tf/tf_weaponbase.cpp
Line 5645 in 7191ecc
this results in the fireballs being visibly offset to the bottom right of the player's crosshair
for this fix, i don't use the GetProjectileFireSetup method because it wouldnt be ideal for the df's projectiles which have 2 unique properties compared to other projectiles:
video:
dragonfix.mp4
note: in this video, im using a keybind to toggle the fix on and off
also here's what the debug shapes mean:
- red = crosshair path starting from eyepos, up to 500 units
- green = correct expected projectile path starting from the projectile spawn offset, green box at 500 units is where the projectile should despawn
- blue = actual projectile path, blue box is the projectile's current position, blue line is the path it has traveled