aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/communication.cc6
-rw-r--r--src/map.cc8
2 files changed, 13 insertions, 1 deletions
diff --git a/src/communication.cc b/src/communication.cc
index 2bd727b..2de5e04 100644
--- a/src/communication.cc
+++ b/src/communication.cc
@@ -1532,9 +1532,13 @@ bool OpenSocket(void){
int AcceptorThreadLoop(void *Unused){
AcceptorThreadID = gettid();
print(1, "Warte auf Clients...\n");
- while(GameRunning()){
+ while(true){
int Socket = accept(TCPSocket, NULL, NULL);
if(Socket == -1){
+ if(!GameRunning()){
+ break;
+ }
+
error("AcceptorThreadLoop: Fehler %d beim Accept.\n", errno);
continue;
}
diff --git a/src/map.cc b/src/map.cc
index a404c32..86b0c83 100644
--- a/src/map.cc
+++ b/src/map.cc
@@ -1569,6 +1569,10 @@ void PatchSector(int SectorX, int SectorY, int SectorZ, bool FullSector,
}
if(IN.Token == BYTES){
+ if(OffsetX != -1 && OffsetY != -1 && !FieldPatched[OffsetX][OffsetY]){
+ OUT.writeLn();
+ }
+
uint8 *SectorOffset = IN.getBytesequence();
OffsetX = (int)SectorOffset[0];
OffsetY = (int)SectorOffset[1];
@@ -1634,6 +1638,10 @@ void PatchSector(int SectorX, int SectorY, int SectorZ, bool FullSector,
IN.error("unknown map flag");
}
}
+
+ if(OffsetX != -1 && OffsetY != -1 && !FieldPatched[OffsetX][OffsetY]){
+ OUT.writeLn();
+ }
}
// NOTE(fusion): Step 4.