diff --git a/src/Components/Modules/Elevators.cpp b/src/Components/Modules/Elevators.cpp index 224aba21..f9f42354 100644 --- a/src/Components/Modules/Elevators.cpp +++ b/src/Components/Modules/Elevators.cpp @@ -36,12 +36,6 @@ namespace Components // like later versions of the game do if (!trace->startsolid || elevatorSetting >= Elevators::ENABLED) { - pml->groundTrace = *trace; - - const auto fraction = trace->fraction; - ps->origin[0] += fraction * (point[0] - ps->origin[0]); - ps->origin[1] += fraction * (point[1] - ps->origin[1]); - ps->origin[2] += fraction * (point[2] - ps->origin[2]); break; } } @@ -58,6 +52,13 @@ namespace Components } } + pml->groundTrace = *trace; + + const auto fraction = trace->fraction; + ps->origin[0] += fraction * (point[0] - ps->origin[0]); + ps->origin[1] += fraction * (point[1] - ps->origin[1]); + ps->origin[2] += fraction * (point[2] - ps->origin[2]); + return 1; }