From 064a6ec63216cff01c8575dfc2171dff5830a45f Mon Sep 17 00:00:00 2001 From: Marisa Kirisame Date: Sat, 2 Feb 2019 19:57:37 +0100 Subject: [PATCH] Fix long-standing visual bug with pulsegun beam (thanks, RELATIVETOFLOOR flag). --- Readme.md | 6 ------ zscript/pulsegun.zsc | 2 ++ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Readme.md b/Readme.md index bb72607..8c3cf3c 100644 --- a/Readme.md +++ b/Readme.md @@ -80,9 +80,3 @@ This mod requires GZDoom 3.7.0 or later. - Biorifle sludge doesn't handle 3d floors (especially sloped ones) properly. This is due to the unavailability of 3D floor data on ZScript and will be fixed once 3D floors are exported to scripting (still waiting on that PR) - -## Known bugs that are not this mod's fault - - - Pulse gun beams behave oddly when the player is standing on a moving floor. - This is an interpolation quirk in GZDoom and I can probably find some hacky - way to fix it eventually diff --git a/zscript/pulsegun.zsc b/zscript/pulsegun.zsc index 16db2db..1af81a2 100644 --- a/zscript/pulsegun.zsc +++ b/zscript/pulsegun.zsc @@ -473,6 +473,7 @@ Class PulseBolt : Actor } void UpdateBeam( PulseBolt parent, Vector3 x ) { + bRELATIVETOFLOOR = parent.bRELATIVETOFLOOR; frame = parent.frame; SetOrigin(parent.Vec3Offset(x.x*beamsize,x.y*beamsize,x.z*beamsize),true); A_SetAngle(parent.angle); @@ -513,6 +514,7 @@ Class StarterBolt : PulseBolt return; } Vector3 x, y, z, origin; + bRELATIVETOFLOOR = (target.pos.z <= target.floorz); // hack, but kinda works if ( target.player ) { [x, y, z] = dt_Matrix4.GetAxes(target.pitch,target.angle,target.roll);