Remove the buggy /finish chat command
authorWuzzy <almikes@aol.com>
Fri, 12 May 2017 16:53:29 +0200
changeset 12415 8b971d8944d6
parent 12414 7cdd8e113dc0
child 12416 edeae7661dca
Remove the buggy /finish chat command
ChangeLog.txt
hedgewars/uChat.pas
hedgewars/uTeams.pas
--- a/ChangeLog.txt	Mon May 08 03:42:51 2017 +0200
+++ b/ChangeLog.txt	Fri May 12 16:53:29 2017 +0200
@@ -40,6 +40,7 @@
  * Fixed enemy saying "Missed” when giving poison without direct damage
  * Fixed hedgehogs not saying “Stupid” and not displaying announcer message for inflicting self-harm
  * Fixed incorrect time box tooltip when in Sudden Death
+ * Remove buggy /finish chat command
  * Various other fixes
 
 Highlander:
--- a/hedgewars/uChat.pas	Mon May 08 03:42:51 2017 +0200
+++ b/hedgewars/uChat.pas	Fri May 12 16:53:29 2017 +0200
@@ -47,7 +47,7 @@
     s: shortstring;
     Color: TSDL_Color;
     end;
-    TChatCmd = (ccQuit, ccPause, ccFinish, ccShowHistory, ccFullScreen);
+    TChatCmd = (ccQuit, ccPause, ccShowHistory, ccFullScreen);
 
 var Strs: array[0 .. MaxStrIndex] of TChatLine;
     MStrs: array[0 .. MaxStrIndex] of shortstring;
@@ -88,7 +88,6 @@
             end = (
             (ChatCmd: '/quit'; ProcedureCallChatCmd: 'halt'),
             (ChatCmd: '/pause'; ProcedureCallChatCmd: 'pause'),
-            (ChatCmd: '/finish'; ProcedureCallChatCmd: 'finish'),
             (ChatCmd: '/history'; ProcedureCallChatCmd: 'history'),
             (ChatCmd: '/fullscreen'; ProcedureCallChatCmd: 'fullscr')
             );
--- a/hedgewars/uTeams.pas	Mon May 08 03:42:51 2017 +0200
+++ b/hedgewars/uTeams.pas	Fri May 12 16:53:29 2017 +0200
@@ -743,25 +743,6 @@
 end;
 
 
-procedure chFinish(var s:shortstring);
-var t: LongInt;
-begin
-// avoid compiler hint
-s:= s;
-
-isPaused:= false;
-
-t:= 0;
-while t < TeamsCount do
-    begin
-    TeamsArray[t]^.hasGone:= true;
-    inc(t)
-    end;
-
-AddChatString(#7 + '* Good-bye!');
-RecountAllTeamsHealth();
-end;
-
 procedure SwitchCurrentHedgehog(newHog: PHedgehog);
 var oldCI, newCI: boolean;
     oldHH: PHedgehog;
@@ -843,7 +824,6 @@
 RegisterVariable('bind', @chBind, true );
 RegisterVariable('teamgone', @chTeamGone, true );
 RegisterVariable('teamback', @chTeamBack, true );
-RegisterVariable('finish', @chFinish, true ); // all teams gone
 RegisterVariable('fort'    , @chFort         , false);
 RegisterVariable('grave'   , @chGrave        , false);
 RegisterVariable('hat'     , @chSetHat       , false);