From ec516b56759926937d130dcd338e1a8089b1dad5 Mon Sep 17 00:00:00 2001 From: zico Date: Sat, 14 Dec 2013 02:53:45 +0100 Subject: [PATCH] Disable powerup capping for cooperative game mode as it potentially deletes weapons carried over from another level --- common/main/multi.h | 2 +- similar/main/multi.cpp | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/common/main/multi.h b/common/main/multi.h index 100ab458e..ef92d61d8 100644 --- a/common/main/multi.h +++ b/common/main/multi.h @@ -62,7 +62,7 @@ extern int multi_protocol; // set and determinate used protocol #define MULTI_PROTO_UDP 1 // UDP protocol // What version of the multiplayer protocol is this? Increment each time something drastic changes in Multiplayer without the version number changes. Can be reset to 0 each time the version of the game changes -#define MULTI_PROTO_VERSION 9 +#define MULTI_PROTO_VERSION 10 // PROTOCOL VARIABLES AND DEFINES - END // limits for Packets (i.e. positional updates) per sec diff --git a/similar/main/multi.cpp b/similar/main/multi.cpp index db45a4301..5c065e6bb 100644 --- a/similar/main/multi.cpp +++ b/similar/main/multi.cpp @@ -2696,7 +2696,7 @@ void multi_powcap_cap_objects() char type; int index; - if (!(Game_mode & GM_NETWORK)) + if (!(Game_mode & GM_NETWORK) || (Game_mode & GM_MULTI_COOP)) return; if (!game_mode_hoard()) @@ -2809,7 +2809,7 @@ static void multi_powcap_adjust_cap_for_player(int pnum) int index; - if (!(Game_mode & GM_NETWORK)) + if (!(Game_mode & GM_NETWORK) || (Game_mode & GM_MULTI_COOP)) return; for (index=0;indexMaxPowerupsAllowed[i]) MaxPowerupsAllowed[i]=buf[i+1];