Add ammostores in frontend, should help further ammostores implemetation
authorunc0rr
Sat, 22 Sep 2007 10:06:27 +0000
changeset 606 9d800fdfd3bd
parent 605 2651c3fe4567
child 607 26a91a9f5514
Add ammostores in frontend, should help further ammostores implemetation
QTfrontend/team.cpp
hedgewars/CCHandlers.inc
--- a/QTfrontend/team.cpp	Sat Sep 22 09:49:55 2007 +0000
+++ b/QTfrontend/team.cpp	Sat Sep 22 10:06:27 2007 +0000
@@ -213,6 +213,8 @@
 {
 	QStringList sl;
 	sl.push_back(QString("eaddteam %1 %2").arg(teamColor.rgb() & 0xffffff).arg(TeamName));
+	sl.push_back("eammstore 93919294221912103323");
+
 	if (m_netID)
 		sl.push_back("erdriven");
 
--- a/hedgewars/CCHandlers.inc	Sat Sep 22 09:49:55 2007 +0000
+++ b/hedgewars/CCHandlers.inc	Sat Sep 22 10:06:27 2007 +0000
@@ -52,7 +52,6 @@
 begin
 if isDeveloperMode then
    begin
-   ParseCommand('ammstore 93919294221912103323', true);
    SplitBySpace(s, ts);
    val(s, Color);
    TryDo(Color <> 0, 'Error: black team color', true);
@@ -101,7 +100,7 @@
      val(s, Gear^.Health);
      TryDo(Gear^.Health > 0, 'Invalid hedgehog health', true);
      PHedgehog(Gear^.Hedgehog)^.Team:= CurrentTeam;
-     Hedgehogs[HedgehogsNumber].AmmoStore:= TeamsCount - 1;
+     Hedgehogs[HedgehogsNumber].AmmoStore:= TeamsCount - 1; // FIXME HACK to get ammostores work
      Hedgehogs[HedgehogsNumber].Gear:= Gear;
      Hedgehogs[HedgehogsNumber].Name:= id;
      inc(HedgehogsNumber)