OSDN Git Service

Apply rev 4949 to moving walkways
authorryan <>
Thu, 19 Jan 2017 21:40:16 +0000 (21:40 +0000)
committerryan <>
Thu, 19 Jan 2017 21:40:16 +0000 (21:40 +0000)
src/sbs/movingwalkway.cpp

index 54c3aea..474512c 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "globals.h"
 #include "sbs.h"
+#include "camera.h"
 #include "mesh.h"
 #include "floor.h"
 #include "sound.h"
@@ -248,6 +249,9 @@ void MovingWalkway::CreateSteps(const std::string &texture, const std::string &d
 
 void MovingWalkway::MoveSteps()
 {
+       if (GetPosition().distance(sbs->camera->GetPosition()) > 100)
+               return;
+
        for (size_t i = 0; i < Steps.size(); i++)
        {
                if (Run == 1)