Skip to content
Browse files

Removed unused deprecated ID constants (#2057)

Flag and conkit were not used anyway. Melee was still used by
C4Scenario, but the ID points to the invalid ID MELE, so that check was
pointless anyway.

Should we ever add a check for the goal back in, then it should be the
actual melee goal ID.
  • Loading branch information...
gitMarky committed Apr 6, 2019
1 parent 3497a9a commit be68a20b39754d1b09abcc208a80766a88169c19
Showing with 1 addition and 13 deletions.
  1. +0 −3 planet/Experimental.ocf/Shark.ocs/Scenario.txt
  2. +1 −3 src/landscape/C4Scenario.cpp
  3. +0 −4 src/object/C4Id.cpp
  4. +0 −3 src/object/C4Id.h
@@ -2,9 +2,6 @@


@@ -514,8 +514,6 @@ bool C4SGame::IsMelee()
// Check for game modes known to be melees
// Also allow it in parkours by default because that works fine
if (Mode == "Melee" || Mode == "Parkour") return true;
// Game mode not present or unknown? Check for old MELE goal which was still used by some scenarios.
if (Goals.GetIDCount(C4ID::Melee, 1)) return true;
// Nothing looks like melee here
// Game mode not present or unknown?
return false;
@@ -30,10 +30,6 @@ const C4ID C4ID::Clonk(std::string("Clonk"));
const C4ID C4ID::Bubble(std::string("Fx_Bubble"));
const C4ID C4ID::EditorBase(std::string("EditorBase"));

// TODO: Remove these eventually, since they are deprecated.
const C4ID C4ID::Flag(std::string("FLAG"));
const C4ID C4ID::Conkit(std::string("CNKT"));
const C4ID C4ID::Melee(std::string("MELE"));

C4ID::C4ID(const std::string &s) { assign(s); }

@@ -37,10 +37,7 @@ class C4ID
explicit C4ID(const char (&s)[N]) { assign(s); } // @suppress("Class members should be properly initialized"): The call to assign() initializes 'v'
static const C4ID None; // Invalid ID
DEPRECATED static const C4ID Flag;
DEPRECATED static const C4ID Conkit; // Construction kit
static const C4ID Clonk;
DEPRECATED static const C4ID Melee;
static const C4ID Bubble;
static const C4ID EditorBase;

0 comments on commit be68a20

Please sign in to comment.
You can’t perform that action at this time.