diff --git a/src/vehicle_base.h b/src/vehicle_base.h index db8a1bdf7d..1d4a6fa24f 100644 --- a/src/vehicle_base.h +++ b/src/vehicle_base.h @@ -24,6 +24,7 @@ #include "group_type.h" #include "timetable.h" #include "base_consist.h" +#include "network/network.h" #include #include @@ -1138,6 +1139,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 bfe853e9a0..e55f5621ea 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) */