Fix dynamic slope height changes not always being considered as "moved"

This commit is contained in:
spherallic 2024-06-27 17:16:03 +02:00
parent 05c97dbd56
commit 8e7cce8b61

View file

@ -181,8 +181,8 @@ void T_DynamicSlopeLine (dynlineplanethink_t* th)
{
pslope_t* slope = th->slope;
line_t* srcline = th->sourceline;
fixed_t zdelta;
fixed_t zdelta, oldoz = slope->o.z;
switch(th->type) {
case DP_FRONTFLOOR:
@ -209,7 +209,7 @@ void T_DynamicSlopeLine (dynlineplanethink_t* th)
return;
}
if (slope->zdelta != FixedDiv(zdelta, th->extent)) {
if (slope->zdelta != FixedDiv(zdelta, th->extent) || oldoz != slope->o.z) {
slope->zdelta = FixedDiv(zdelta, th->extent);
slope->zangle = R_PointToAngle2(0, 0, th->extent, -zdelta);
slope->moved = true;