summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatthijs <matthijs@openttd.org>2006-04-12 15:08:27 +0000
committermatthijs <matthijs@openttd.org>2006-04-12 15:08:27 +0000
commit7dca474b5f2df98734d83d816e6417b749733585 (patch)
treed2b0cb2110741956f15b8a3f59fd30a8536a0640
parent86138ce3cc5d60ccdb4de58c624a6b0f27a61fc5 (diff)
downloadopenttd-7dca474b5f2df98734d83d816e6417b749733585.tar.xz
(svn r4389) -Fix: [NPF] Don't mark tiles when debugging in multiplayer, this will cause desyncs.
-rw-r--r--npf.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/npf.c b/npf.c
index d1262efeb..3fa0ccb91 100644
--- a/npf.c
+++ b/npf.c
@@ -14,6 +14,7 @@
#include "tile.h"
#include "depot.h"
#include "tunnel_map.h"
+#include "network.h"
static AyStar _npf_aystar;
@@ -205,13 +206,16 @@ static uint NPFSlopeCost(AyStarNode* current)
* there is only one level of steepness... */
}
-/* Mark tiles by mowing the grass when npf debug level >= 1 */
+/**
+ * Mark tiles by mowing the grass when npf debug level >= 1.
+ * Will not work for multiplayer games, since it can (will) cause desyncs.
+ */
static void NPFMarkTile(TileIndex tile)
{
#ifdef NO_DEBUG_MESSAGES
return;
#else
- if (_debug_npf_level < 1) return;
+ if (_debug_npf_level < 1 || _networking) return;
switch (GetTileType(tile)) {
case MP_RAILWAY:
/* DEBUG: mark visited tiles by mowing the grass under them ;-) */