summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/linkgraph/linkgraphschedule.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/linkgraph/linkgraphschedule.cpp b/src/linkgraph/linkgraphschedule.cpp
index 2638b77ea..87ab4818a 100644
--- a/src/linkgraph/linkgraphschedule.cpp
+++ b/src/linkgraph/linkgraphschedule.cpp
@@ -15,6 +15,7 @@
#include "flowmapper.h"
#include "../framerate_type.h"
#include "../command_func.h"
+#include "../network/network.h"
#include "../safeguards.h"
@@ -206,8 +207,13 @@ void OnTick_LinkGraph()
if (offset == 0) {
LinkGraphSchedule::instance.SpawnNext();
} else if (offset == _settings_game.linkgraph.recalc_interval / 2) {
- PerformanceMeasurer framerate(PFE_GL_LINKGRAPH);
- LinkGraphSchedule::instance.JoinNext();
+ if (!_networking || _network_server) {
+ PerformanceMeasurer::SetInactive(PFE_GL_LINKGRAPH);
+ LinkGraphSchedule::instance.JoinNext();
+ } else {
+ PerformanceMeasurer framerate(PFE_GL_LINKGRAPH);
+ LinkGraphSchedule::instance.JoinNext();
+ }
}
}