--- a/hedgewars/uChat.pas Sun Jul 25 17:32:07 2010 +0200
+++ b/hedgewars/uChat.pas Sat Jul 31 07:05:06 2010 +0200
@@ -29,7 +29,7 @@
procedure DrawChat;
procedure KeyPressChat(Key: Longword);
-var UserNick: shortstring;
+var UserNick: shortstring = '';
ChatReady: boolean;
showAll: boolean;
@@ -316,7 +316,6 @@
begin
lastStr:= 0;
visibleCount:= 0;
- UserNick:= '';
showAll:= false;
ChatReady:= false;
missedCount:= 0;
@@ -324,7 +323,7 @@
procedure freeModule;
begin
-
+ UserNick:= '';
end;
end.
--- a/hedgewars/uIO.pas Sun Jul 25 17:32:07 2010 +0200
+++ b/hedgewars/uIO.pas Sat Jul 31 07:05:06 2010 +0200
@@ -366,7 +366,6 @@
procedure freeModule;
begin
ipcPort:= 0;
-
end;
end.
--- a/hedgewars/uMisc.pas Sun Jul 25 17:32:07 2010 +0200
+++ b/hedgewars/uMisc.pas Sat Jul 31 07:05:06 2010 +0200
@@ -87,7 +87,7 @@
cShowFPS : boolean = false;
cAltDamage : boolean = true;
cReducedQuality : LongInt = rqNone;
-
+ //userNick is in uChat
recordFileName : shortstring = '';
cCaseFactor : Longword;
@@ -795,6 +795,25 @@
flush(f);
close(f);
{$ENDIF}
+
+ // re-init flags so they'll always contain safe values
+ cScreenWidth := 1024;
+ cScreenHeight := 768;
+ cBits := 32;
+ cBitsStr := '32';
+ //ipcPort is in uIO
+ cFullScreen := false;
+ isSoundEnabled := true;
+ isMusicEnabled := false;
+ cLocaleFName := 'en.txt';
+ cInitVolume := 50;
+ cTimerInterval := 8;
+ //pathPrefix is in uConsts
+ cShowFPS := false;
+ cAltDamage := true;
+ cReducedQuality := rqNone;
+ //userNick is in uChat
+ recordFileName := '';
end;
end.