Command: Remove unused CMD_STR_SEP flag
This commit is contained in:
@@ -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_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_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_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)
|
DECLARE_ENUM_AS_BIT_SET(CommandFlags)
|
||||||
|
|
||||||
|
@@ -327,7 +327,6 @@ const char *NetworkGameSocketHandler::ReceiveCommand(Packet *p, CommandPacket *c
|
|||||||
cp->tile = p->Recv_uint32();
|
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;
|
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);
|
p->Recv_string(cp->text, settings);
|
||||||
|
|
||||||
byte callback = p->Recv_uint8();
|
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
|
/* 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. */
|
* can be made with GSText, make sure the control codes are removed. */
|
||||||
text_validated = text;
|
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();
|
text = text_validated.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user