project_files/HedgewarsMobile/Classes/EngineProtocolNetwork.m
changeset 6337 84e7d1a5e3df
parent 6321 5a0416e5a6de
child 6353 d8f62c805619
--- a/project_files/HedgewarsMobile/Classes/EngineProtocolNetwork.m	Sat Nov 12 21:53:39 2011 +0100
+++ b/project_files/HedgewarsMobile/Classes/EngineProtocolNetwork.m	Sat Nov 12 21:59:10 2011 +0100
@@ -58,9 +58,9 @@
 #pragma mark -
 #pragma mark Spawner functions
 +(void) spawnThread:(NSString *)onSaveFile withOptions:(NSDictionary *)dictionary {
-    EngineProtocolNetwork *proto = [[EngineProtocolNetwork alloc] init];
-    proto.stream = (onSaveFile) ? [[NSOutputStream alloc] initToFileAtPath:onSaveFile append:YES] : nil;
-    [proto.stream open];
+    id proto = [[self alloc] init];
+    [proto setStream: (onSaveFile) ? [[NSOutputStream alloc] initToFileAtPath:onSaveFile append:YES] : nil];
+    [[proto stream] open];
 
     // +detachNewThreadSelector retain/release self automatically
     [NSThread detachNewThreadSelector:@selector(engineProtocol:)