project_files/HedgewarsMobile/Classes/GameSetup.m
changeset 3904 22e4d74240e5
parent 3902 3aac7ca07b0e
child 3910 dd47efbdec46
--- a/project_files/HedgewarsMobile/Classes/GameSetup.m	Sat Sep 25 18:38:05 2010 +0200
+++ b/project_files/HedgewarsMobile/Classes/GameSetup.m	Sun Sep 26 03:41:08 2010 +0200
@@ -25,6 +25,7 @@
 #import "PascalImports.h"
 #import "CommodityFunctions.h"
 #import "NSStringExtra.h"
+#import "OverlayViewController.h"
 
 #define BUFFER_SIZE 255     // like in original frontend
 
@@ -375,7 +376,6 @@
                     DLog(@"ERROR - wrong protocol number: [%s] - expecting %d", &buffer[1], eProto);
                     clientQuit = YES;
                 }
-
                 break;
             case 'i':
                 switch (buffer[1]) {
@@ -393,6 +393,10 @@
             case 'q':
                 // game ended, can remove the savefile
                 [[NSFileManager defaultManager] removeItemAtPath:self.savePath error:nil];
+                // so update the relative viewcontroler
+                [[NSNotificationCenter defaultCenter] postNotificationName:@"removedSave" object:nil];
+                // and disable the overlay
+                setGameRunning(NO);
                 break;
             default:
                 // is it performant to reopen the stream every time?