Add line endings to formats.
Lua reads from sockets line by line, so this simplifies a whole lot of lua code
This commit is contained in:
parent
f17b3a17fe
commit
0ab3da69fc
2 changed files with 2 additions and 2 deletions
|
@ -16,7 +16,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <iostream>
|
||||
|
||||
#define TTRTS_HANDSHAKE_FORMAT "player %u name %s"
|
||||
#define TTRTS_HANDSHAKE_FORMAT "player %u name %s\n"
|
||||
|
||||
//======================================================================================================================
|
||||
// Structs for net management
|
||||
|
|
|
@ -52,7 +52,7 @@ std::string GetStringFromGame( const CTTRTSGame& game )
|
|||
state += '\n';
|
||||
state += GAME_HEADER_DELIMITER;
|
||||
state += units;
|
||||
state += "END";
|
||||
state += "END\n";
|
||||
|
||||
return state;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue