initial hedgehogs num fixed
authordisplacer
Sun, 21 Jan 2007 20:14:49 +0000
changeset 353 5ec611d702a0
parent 352 4665bfe25470
child 354 60e4af0a4375
initial hedgehogs num fixed
QTfrontend/team.cpp
--- a/QTfrontend/team.cpp	Sun Jan 21 19:53:25 2007 +0000
+++ b/QTfrontend/team.cpp	Sun Jan 21 20:14:49 2007 +0000
@@ -31,6 +31,7 @@
 
 HWTeam::HWTeam(const QString & teamname, unsigned int netID) :
   difficulty(0),
+  numHedgehogs(4),
   m_netID(netID)
 {
 	TeamName = teamname;
@@ -45,7 +46,8 @@
 	}
 }
 
-HWTeam::HWTeam(const QStringList& strLst)
+HWTeam::HWTeam(const QStringList& strLst) :
+  numHedgehogs(4)
 {
   // net teams are configured from QStringList
   if(strLst.size()<10) throw HWTeamConstructException();
@@ -56,6 +58,7 @@
 
 HWTeam::HWTeam(quint8 num) :
   difficulty(0),
+  numHedgehogs(4),
   m_netID(0)
 {
 	num %= PREDEFTEAMS_COUNT;
@@ -80,6 +83,7 @@
 
 bool HWTeam::LoadFromFile()
 {
+	numHedgehogs=4;
 	QFile cfgfile(cfgdir->absolutePath() + "/" + TeamName + ".cfg");
 	if (!cfgfile.open(QIODevice::ReadOnly)) return false;
 	QTextStream stream(&cfgfile);