Made visual recoil toggleable (and with configurable strength, too).

Cleaned up some code (mostly related to server CVars).
Proper angle interpolation.
Snap player to floor when walking down steps like UE does (looks kinda twitchy due to lack of view height smoothing).
This commit is contained in:
Marisa the Magician 2018-09-24 15:00:02 +02:00
commit 957f976b29
14 changed files with 80 additions and 75 deletions

View file

@ -254,6 +254,7 @@ Class WarShell : Actor
+SKYEXPLODE;
+FORCERADIUSDMG;
+EXPLODEONWATER;
+INTERPOLATEANGLES;
}
override void PostBeginPlay()
{
@ -402,9 +403,9 @@ Class GuidedWarShell : WarShell
orient = orient.qmul(angles);
double npitch, nangle, nroll;
[npitch, nangle, nroll] = orient.to_euler();
A_SetAngle(nangle,SPF_INTERPOLATE);
A_SetPitch(npitch,SPF_INTERPOLATE);
A_SetRoll(nroll,SPF_INTERPOLATE);
angle = nangle;
pitch = npitch;
roll = nroll;
vel = (vel+(cos(angle)*cos(pitch),sin(angle)*cos(pitch),-sin(pitch))*0.8).unit()*11;
}
lagangle2 = lagangle2*0.95+lagangle*0.05;