Allow Laser drawing position update#2218
Open
DeathFishAtEase wants to merge 5 commits into
Open
Conversation
|
To Chinese users:
|
|
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. |
TaranDahl
requested changes
May 18, 2026
| if (ObjectClass::Array.FindItemIndex(info.Shooter) != -1 && !info.Shooter->IsDead()) | ||
| { | ||
| CoordStruct flh; | ||
| info.Shooter->GetFLH(&flh, info.WeaponIndex, CoordStruct { 0, 0, 0 }); |
| } | ||
|
|
||
| // Per‑frame coordinate update | ||
| DEFINE_HOOK(0x550173, LaserDrawClass_UpdateCoords_Update, 6) |
Contributor
There was a problem hiding this comment.
LaserDrawClass_Update_UpdateCoords
TaranDahl
reviewed
May 18, 2026
| In `rulesmd.ini`: | ||
| ```ini | ||
| [SOMEWEAPON] ; WeaponType with IsLaser=yes or DiskLaser=yes | ||
| LaserPositionUpdate=none ; Position Follow Enumeration (none|firer|target|all) |
Contributor
There was a problem hiding this comment.
Maybe a global value would be useful?
Collaborator
Author
There was a problem hiding this comment.
Not sure, I've gone to the corresponding topic on Forum and started a poll to see.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
None: No update.Firer: The start point follows the firer's FLH; if the firer dies, the update stops.DiskLaser's FLH actually determines the center of the ring, this would cause the beam's start point after charging to become the FLH, so this scenario may not be suitable for usingFirer.Target: The end point follows the target; if the target object dies, the update stops.All: Equivalent to specifying bothFirerandTarget.move.mp4
Used together with Projectile interception logic
Note
For a sub-weapon created by
ShrapnelWeapon, its start point is the position where the parent weapon detonates, not the firer's FLH.Fireris set, it will be treated asNone.Allis set, it will be treated asTarget.In
rulesmd.ini:Warning
If the weapon sets this logic to a non-
Nonevalue while also using other logics that change the drawing position, such asFlakScatter, then after initially drawing the laser according to those other logics, the drawing position will be forced to change due to the update rules.