diff --git a/src/vehicle_base.h b/src/vehicle_base.h index 59584da..c06cfe9 100644 --- a/src/vehicle_base.h +++ b/src/vehicle_base.h @@ -23,6 +23,7 @@ #include "transport_type.h" #include "group_type.h" #include "base_consist.h" +#include "network/network.h" #include #include @@ -1072,6 +1073,8 @@ struct SpecializedVehicle : public Vehicle { */ inline void UpdateViewport(bool force_update, bool update_delta) { + if (_network_dedicated) return; + /* Explicitly choose method to call to prevent vtable dereference - * it gives ~3% runtime improvements in games with many vehicles */ if (update_delta) ((T *)this)->T::UpdateDeltaXY(this->direction); diff --git a/src/video/dedicated_v.cpp b/src/video/dedicated_v.cpp index bfe853e..e55f562 100644 --- a/src/video/dedicated_v.cpp +++ b/src/video/dedicated_v.cpp @@ -315,7 +315,6 @@ void VideoDriver_Dedicated::MainLoop() next_tick = cur_ticks + MILLISECONDS_PER_TICK; GameLoop(); - UpdateWindows(); } /* Don't sleep when fast forwarding (for desync debugging) */