Phobos icon indicating copy to clipboard operation
Phobos copied to clipboard

[Vanilla Enhancement] Restore turret recoil effect

Open CrimRecya opened this issue 8 months ago • 5 comments

  • 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.

CrimRecya avatar Apr 13 '25 12:04 CrimRecya

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.

github-actions[bot] avatar Apr 13 '25 12:04 github-actions[bot]

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?).

Metadorius avatar Apr 26 '25 18:04 Metadorius

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.

CrimRecya avatar Apr 27 '25 03:04 CrimRecya

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

Metadorius avatar Apr 27 '25 09:04 Metadorius

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.

ZivDero avatar Apr 27 '25 10:04 ZivDero

Can this be merged?

CrimRecya avatar Aug 16 '25 14:08 CrimRecya