diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-03-16 18:29:37 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-03-16 18:29:37 +0000 |
commit | ea35e8ede4c3a522375d4539c872e8a6d6c9830a (patch) | |
tree | b0569f5ffe9b92b407bde67f501a0a79a2cf78e5 /application/main.cpp | |
parent | Allow activities to be changed when doing them (diff) | |
download | ilt-ea35e8ede4c3a522375d4539c872e8a6d6c9830a.tar.bz2 ilt-ea35e8ede4c3a522375d4539c872e8a6d6c9830a.tar.xz ilt-ea35e8ede4c3a522375d4539c872e8a6d6c9830a.zip |
Implement goto so node
Encompasses determining a route and a distance to travel
Diffstat (limited to 'application/main.cpp')
-rw-r--r-- | application/main.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/application/main.cpp b/application/main.cpp index df8828a..2fc9f99 100644 --- a/application/main.cpp +++ b/application/main.cpp @@ -1,11 +1,16 @@ #include <SDL2/SDL.h> +#include <array> #include <chrono> #include <collection.hpp> #include <game/activities/go.h> #include <game/activities/idle.h> #include <game/activity.h> #include <game/gamestate.h> +#include <game/network/link.h> #include <game/network/rail.h> +#include <game/objective.h> +#include <game/objectives/goto.h> +#include <game/orders.h> #include <game/terrain.h> #include <game/vehicles/railVehicle.h> #include <game/vehicles/railVehicleClass.h> @@ -109,6 +114,9 @@ public: for (int N = 0; N < 6; N++) { train->create<RailVehicle>(b47); } + train->orders.removeAll(); + train->orders.create<GoTo>(&train->orders, l3->ends[1], l3->length, rl->findNodeAt({-1100, 15, -450})); + train->currentActivity = train->orders.current()->createActivity(); } Shader shader; |