Allow spaces at start of chat messages

This commit is contained in:
def 2014-01-08 18:21:07 +01:00
parent 35ea08915a
commit c60c3e14e9
2 changed files with 10 additions and 2 deletions

View file

@ -294,6 +294,14 @@ class NetString(NetVariable):
def emit_pack(self):
return ["pPacker->AddString(%s, -1);" % self.name]
class NetStringHalfStrict(NetVariable):
def emit_declaration(self):
return ["const char *%s;"%self.name]
def emit_unpack(self):
return ["pMsg->%s = pUnpacker->GetString(CUnpacker::SANITIZE_CC);" % self.name]
def emit_pack(self):
return ["pPacker->AddString(%s, -1);" % self.name]
class NetStringStrict(NetVariable):
def emit_declaration(self):
return ["const char *%s;"%self.name]

View file

@ -231,7 +231,7 @@ Messages = [
NetMessage("Sv_Chat", [
NetIntRange("m_Team", 'TEAM_SPECTATORS', 'TEAM_BLUE'),
NetIntRange("m_ClientID", -1, 'MAX_CLIENTS-1'),
NetStringStrict("m_pMessage"),
NetStringHalfStrict("m_pMessage"),
]),
NetMessage("Sv_KillMsg", [
@ -294,7 +294,7 @@ Messages = [
### Client messages
NetMessage("Cl_Say", [
NetBool("m_Team"),
NetStringStrict("m_pMessage"),
NetStringHalfStrict("m_pMessage"),
]),
NetMessage("Cl_SetTeam", [