-
-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix weapon effects (beams/railguns/bolts etc) interaction with obstacles #825
Fix weapon effects (beams/railguns/bolts etc) interaction with obstacles #825
Conversation
b569434
to
c89df9e
Compare
c89df9e
to
82f6fd4
Compare
1df819f
to
f6834ef
Compare
I managed to get this angle perfectly by accident and tested it with this build, and you can see here that the railgun is still drawing despite the projectile detonating on the edge of this solid building (on its corner, to be precise). I know it can be hard to spot because the animations i used for the railgun and explosion are almost the same, but as you can see the building is repairing from taking damage that the projectile detonating on it has caused. It was for IsDetachedRailgun=yes railgun, though, so don't know if it's supported. |
Just to eliminate the most obvious cause of issues like this, this is
Should be. |
it actually isn't. it's a straight trajectory projectile with an attached railgun. I didn't realize the fix will work only for Inviso=yes projectiles. Maybe that should be mentioned in the doc? Retested it with an Inviso=yes projectile and that one does not even get blocked on this angle. It detonates on the target instead of the building, and the "beam" is also drawn from the firer to the target. From that, i can't say if the fix is working properly or not. That pretty much means i'm out of ideas how to test this fix for solid buildings. Units will move around if they detect a building they can't fire through, and getting angles like this one is a matter of sheer luck. |
Documentation does have this line, can probably clarify if needed though.
This is pretty much how it is since the obstacle logic affects rangefinding. The cases where the projectile is allowed to fire but is blocked by an obstacle are very situational but they do happen. It is usually hitting corners like in the example you had. |
Nah, that's enough. I thought it's not there because i couldn't find it. Apparently i was looking in the incorrect doc file (clicked on the big "View Docs" button instead of the small "View docs" link on the right). |
acb7069
to
44d4376
Compare
aae92fd
to
a32076e
Compare
44d4376
to
9bf68d3
Compare
9bf68d3
to
a2119d6
Compare
Nightly build for this pull request:
This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build. |
067ecb7
to
04e2095
Compare
04e2095
to
aa85a07
Compare
1995e09
to
a4bf2db
Compare
a4bf2db
to
00a41a7
Compare
00a41a7
to
7e22f95
Compare
7e22f95
to
e106629
Compare
WalkthroughThe project has been updated to enhance weapon and particle system interactions with obstacles and elevation changes. New features for fire particle system customization, ambient damage warhead specification, and ignoring the main target have been introduced. Additionally, the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM apart from comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 12
Configuration used: CodeRabbit UI
Files selected for processing (13)
- CREDITS.md (1 hunks)
- Phobos.vcxproj (3 hunks)
- docs/Fixed-or-Improved-Logics.md (3 hunks)
- docs/New-or-Enhanced-Logics.md (1 hunks)
- docs/Whats-New.md (2 hunks)
- src/Ext/ParticleSystemType/Body.cpp (1 hunks)
- src/Ext/ParticleSystemType/Body.h (1 hunks)
- src/Ext/Techno/Hooks.WeaponEffects.cpp (1 hunks)
- src/Ext/Techno/Hooks.cpp (1 hunks)
- src/Ext/WeaponType/Body.cpp (2 hunks)
- src/Ext/WeaponType/Body.h (2 hunks)
- src/Misc/Hooks.BugFixes.cpp (2 hunks)
- src/Phobos.Ext.cpp (2 hunks)
Additional comments: 14
src/Ext/ParticleSystemType/Body.cpp (1)
- 8-14: The
Serialize
method processes only one property, which might indicate that the class is not fully implemented yet.Confirm if the
Serialize
method is complete and if there are other properties that should be serialized.src/Phobos.Ext.cpp (1)
- 14-14: The inclusion of
ParticleSystemType/Body.h
is added, but there's no context provided as to why this change is necessary.Ensure that the inclusion of this header is required and that it's being used elsewhere in the codebase.
CREDITS.md (1)
- 219-221: The contributions by Starkku have been updated to include recent work on weapon effect obstacle interaction, fire particle rotation coordinate adjust toggle, and
AmbientDamage
warhead & main target ignore customization.src/Misc/Hooks.BugFixes.cpp (2)
- 17-17: Added includes for
ParticleSystemClass.h
andWarheadTypeClass.h
are necessary for the new functionality related to particle systems and warheads.- 14-20: > 📝 NOTE
This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [219-221]
Starkku's contributions in the
CREDITS.md
file match the changes made in theHooks.BugFixes.cpp
file, ensuring consistency between the documentation and the actual code changes.Phobos.vcxproj (2)
- 91-91: The addition of
src\Ext\ParticleSystemType\Body.cpp
to theClCompile
section is correct for including the new source file in the build process.- 219-219: The addition of
src\Ext\ParticleSystemType\Body.h
to theClInclude
section is correct for including the new header file in the project.docs/Whats-New.md (3)
- 356-357: The addition of toggling fire particle system adjustments and customization of
AmbientDamage
warhead are mentioned in the summary and are present in the changelog. This aligns with the PR objectives of enhancing weapon effects and their interactions with obstacles.- 408-409: The fixes for
AmbientDamage
when used withIsRailgun=yes
being cut off by elevation changes and the correction for railgun and fire particles being cut off by elevation changes are directly related to the PR objectives. These changes are crucial for the visual accuracy of weapon effects in the game environment.- 353-360: > 📝 NOTE
This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [356-409]
The changelog is comprehensive and well-organized, providing clear documentation of the changes made across different versions of Phobos. This is beneficial for both developers and users to track changes and understand the evolution of the project.
docs/Fixed-or-Improved-Logics.md (4)
- 146-146: The addition of a separate Warhead for
AmbientDamage
provides more flexibility in weapon configuration. This is a positive change that allows for more nuanced damage effects.- 313-319: Disabling the automatic adjustment of target coordinates for fire particle systems when the firer rotates is a useful feature. It allows for consistent behavior of fire effects, which is important for visual accuracy.
- 902-909: Specifying a separate Warhead for
AmbientDamage
and the ability to ignore the weapon's main target are significant improvements. These changes allow for more detailed control over howAmbientDamage
behaves, which can be crucial for balancing gameplay.- 900-910: The customization for disk laser radius is a welcome addition. It allows for greater flexibility in weapon design and can be used to create more varied visual effects.
LEA_STACK(CoordStruct*, pTargetCoords, STACK_OFFSET(0xB0, -0x28)); | ||
|
||
auto coords = FireAtTemp::originalTargetCoords; | ||
pTargetCoords = &coords; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what you were intending to do but nothing is done here. Same for the one above.
Were you trying to say *pTargetCoords = coords
?
auto target = FireAtTemp::pOriginalTarget; | ||
|
||
FireAtTemp::originalTargetCoords = CoordStruct::Empty; | ||
FireAtTemp::pOriginalTarget = nullptr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of these might not be indispensable, those on ebp/esp should have remained intact
Prevents weapon effects like lasers, railgun particles, rad beams, electric bolts and waves from being drawn beyond where the projectile detonates (walls, solid buildings etc).
In addition particles spawned by
BehavesLike=Railgun
particle system as well asAmbientDamage
are no longer cut off by elevation changes along trajectory.Summary by CodeRabbit
New Features
Bug Fixes
AmbientDamage
withIsRailgun=yes
to prevent cutoff by elevation.Documentation
Detonate.Warhead
property toDetonate.WarheadType
in configuration files for clarity.Refactor
Chores
ParticleSystemType
module.