1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
diff --git a/Makefile b/Makefile
index 51f7542708d140e060eee76d2b6c2293a7ff766c..077cc520319975edd7463dc64f5b6a1208d1c442 100644
--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,7 @@ DATADIR ?= $(PREFIX)/share
GAMEDATADIR ?= $(DATADIR)
EXE ?=
-CFLAGS ?= -Wall -O2 -ffast-math -funroll-loops
+CFLAGS ?= -Wall -O2 -ffast-math -funroll-loops -fno-common
SDL_CFLAGS = `sdl2-config --cflags`
DEFINES = -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -DNDEBUG -DUSE_SDL -DUSE_NET -DZLIB_SUPPORT -DBZLIB_SUPPORT
INCLUDES = -I.
diff --git a/globals.pre b/globals.pre
index 0d4a7389daa6282b4bac9a1a1dc8b06abd3962ff..781c8eb578a15ca0d19cb47d83bd5e773c95a853 100644
--- a/globals.pre
+++ b/globals.pre
@@ -267,7 +267,7 @@ extern gob_t number_gobs;
/* main.c */
-int endscore_reached;
+extern int endscore_reached;
void steer_players(void);
void position_player(int player_num);
diff --git a/main.c b/main.c
index d03e5f041e5352e33ffd8e52fa2067366729afd1..87b4e95366a9537bc2ebc5c36a31c9223ace9b9e 100644
--- a/main.c
+++ b/main.c
@@ -67,6 +67,8 @@ char cur_pal[768];
int ai[JNB_MAX_PLAYERS];
+int endscore_reached = 0;
+
unsigned int ban_map[17][22] = {
{1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0},
diff --git a/network.c b/network.c
index 07227e72c87365ea23c4e43a9e7731ec53e5274c..b4a1e4e9f86a099733f033a19af119ee5df13883 100644
--- a/network.c
+++ b/network.c
@@ -32,6 +32,10 @@ int is_server = 1;
int is_net = 0;
int server_said_bye = 0;
+#ifdef USE_NET
+NetInfo net_info[JNB_MAX_PLAYERS];
+#endif
+
void processMovePacket(NetPacket *pkt)
{
int playerid = pkt->arg;
diff --git a/network.h b/network.h
index 3058630e718a78582c812d0d1f2b4a31f73f5e3e..f591480e2924980f6fce2531f272bee36d69c5a5 100644
--- a/network.h
+++ b/network.h
@@ -74,7 +74,7 @@ typedef struct
SDLNet_SocketSet socketset;
} NetInfo;
-NetInfo net_info[JNB_MAX_PLAYERS];
+extern NetInfo net_info[JNB_MAX_PLAYERS];
void bufToPacket(const char *buf, NetPacket *pkt);
|