Skip to content

Commit

Permalink
Merge pull request #46 from UndeadZeratul/main
Browse files Browse the repository at this point in the history
Fix Redline's Railgun offset not being tied to the weapon bob
  • Loading branch information
UndeadZeratul authored Aug 16, 2024
2 parents 7c0b529 + fd5125f commit 28a9bb3
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion zscript/accensus/weapons/Redline/redline.zs
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,21 @@ class HDRedline : HDCellWeapon
bool overheated = invoker.WeaponStatus[RDProp_Flags] & RDF_Overheated;

int dmg = int(random(110, 140) * (overheated ? 1.5 : 1.0));
A_RailAttack(dmg, 0, false, "", "", RGF_NOPIERCING | RGF_NORANDOMPUFFZ | RGF_SILENT, 0, "RedlineRayImpact"..(overheated ? "Overheated" : ""), 0, 0, HDCONST_ONEMETRE * 300, 0, 10.0, 0, "RedlineRaySegment"..(overheated ? "Overheated" : ""), player.crouchfactor < 1.0 ? 1.1 : 2);
let wepbob = HDPlayerPawn(invoker.owner).wepbob;

A_RailAttack(
dmg,
wepbob.x * 0.2,
false,
"", "",
RGF_NOPIERCING|RGF_NORANDOMPUFFZ|RGF_SILENT,
puffType: "RedlineRayImpact"..(overheated ? "Overheated" : ""),
range: HDCONST_ONEMETRE * 300,
sparsity: 10.0,
driftSpeed: 0,
spawnClass: "RedlineRaySegment"..(overheated ? "Overheated" : ""),
spawnOfs_Z: player.crouchfactor < 1.0 ? 1.1 : 2
);

invoker.WeaponStatus[RDProp_Heat] += int((dmg / 4) * frandom(0.925, 1.05));
invoker.WeaponStatus[RDProp_Battery] -= overheated ? 2 : 1;
Expand Down

0 comments on commit 28a9bb3

Please sign in to comment.