Command: Remove unused CMD_STR_SEP flag

pull/461/head
Jonathan G Rennison 2 years ago
parent 5c134e6dd0
commit 6a03e7ba97

@ -594,7 +594,6 @@ enum CommandFlags {
CMD_SERVER_NS = 0x1000, ///< the command can only be initiated by the server (this is not executed in spectator mode)
CMD_LOG_AUX = 0x2000, ///< the command should be logged in the auxiliary log instead of the main log
CMD_P1_TILE = 0x4000, ///< use p1 for money text and error tile
CMD_STR_SEP = 0x8000, ///< the command's string may contain separator control characters
};
DECLARE_ENUM_AS_BIT_SET(CommandFlags)

@ -327,7 +327,6 @@ const char *NetworkGameSocketHandler::ReceiveCommand(Packet *p, CommandPacket *c
cp->tile = p->Recv_uint32();
StringValidationSettings settings = (!_network_server && GetCommandFlags(cp->cmd) & CMD_STR_CTRL) != 0 ? SVS_ALLOW_CONTROL_CODE | SVS_REPLACE_WITH_QUESTION_MARK : SVS_REPLACE_WITH_QUESTION_MARK;
if (GetCommandFlags(cp->cmd) & CMD_STR_SEP) settings |= SVS_ALLOW_SEPARATOR_CODE;
p->Recv_string(cp->text, settings);
byte callback = p->Recv_uint8();

@ -329,7 +329,7 @@ ScriptObject::ActiveInstance::~ActiveInstance()
/* The string must be valid, i.e. not contain special codes. Since some
* can be made with GSText, make sure the control codes are removed. */
text_validated = text;
::StrMakeValidInPlace(text_validated, (GetCommandFlags(cmd) & CMD_STR_SEP) ? SVS_ALLOW_SEPARATOR_CODE : SVS_NONE);
::StrMakeValidInPlace(text_validated, SVS_NONE);
text = text_validated.c_str();
}

Loading…
Cancel
Save