Skip to content

[Vanilla Enhancement] Restore turret recoil effect #1625

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

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

CrimRecya
Copy link
Contributor

  • Now you can use TurretRecoil to control units’ turret/barrel recoil effect when firing.
    • TurretTravel and BarrelTravel control the maximum recoil distance.
    • TurretRecoil.Suppress can prevent the weapon from producing this effect when firing.

In rulesmd.ini:

[SOMEVEHICLE]             ; VehicleType
TurretRecoil=no           ; boolean
TurretTravel=2            ; integer, pixels
TurretCompressFrames=1    ; integer, game frames
TurretHoldFrames=1        ; integer, game frames
TurretRecoverFrames=1     ; integer, game frames
BarrelTravel=2            ; integer, pixels
BarrelCompressFrames=1    ; integer, game frames
BarrelHoldFrames=1        ; integer, game frames
BarrelRecoverFrames=1     ; integer, game frames

[SOMEWEAPON]              ; WeaponType
TurretRecoil.Suppress=no  ; boolean

barrel


And:

  • Fix an issue that FireAngle was not taken into account when drawing barrel in TurretShadow.

Copy link

github-actions bot commented Apr 13, 2025

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.

@Coronia Coronia added Needs testing ⚙️T2 T2 maintainer review is sufficient ❓New feature labels Apr 13, 2025
@Metadorius Metadorius added ❓Restored feature Logic present in older gen. games but not in YR ⚙️T1 T1 maintainer review is sufficient and removed ❓New feature ⚙️T2 T2 maintainer review is sufficient labels Apr 26, 2025
@Metadorius
Copy link
Member

I applied the new "Restored feature" type of contribution to this, so @Phobos-developers/t1-maintainers can review it, assuming the code replicates the original one from Tiberian Sun (@CrimRecya is that right?).

@CrimRecya
Copy link
Contributor Author

I applied the new "Restored feature" type of contribution to this, so @Phobos-developers/t1-maintainers can review it, assuming the code replicates the original one from Tiberian Sun (@CrimRecya is that right?).

Not copying, just drawing it according to my own understanding.
Vanilla has already dealt with the firing and updating parts, but there are issues with reading and drawing.
I fixed the reading issue, and drew its effect according to my understanding, but I actually don't know if the length unit used is the vanilla length unit.

@Metadorius
Copy link
Member

Hmm, maybe @ZivDero could review it and compare with TS which has those logics.

@ZivDero
Copy link
Contributor

ZivDero commented Apr 27, 2025

Hmm, maybe @ZivDero could review it and compare with TS which has those logics.

UnitClass_DrawAsVXL_RewriteTurretDrawing, which contains the bulk of the logic, doesn't appear "restored" to me, rather like just a bunch of new logic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs testing ❓Restored feature Logic present in older gen. games but not in YR ⚙️T1 T1 maintainer review is sufficient
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants