[wpdev-commits] wolfpack basechar.cpp,1.155,1.156
Brought to you by:
rip,
thiagocorrea
From: Sebastian H. <dar...@us...> - 2004-09-30 12:34:20
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15244 Modified Files: basechar.cpp Log Message: bloodcolor Index: basechar.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/basechar.cpp,v retrieving revision 1.155 retrieving revision 1.156 diff -C2 -d -r1.155 -r1.156 *** basechar.cpp 30 Sep 2004 12:31:12 -0000 1.155 --- basechar.cpp 30 Sep 2004 12:34:10 -0000 1.156 *************** *** 2357,2370 **** QStringList bloodColors = QStringList::split(",", basedef_->getStrProperty("bloodcolor")); if (bloodColors.count() == 2) { ! bool ok; ! int from = bloodColors[0].toInt(&ok); ! if (ok) { ! int to = bloodColors[1].toInt(&ok); ! if (ok) { ! if (to < from) { ! std::swap(to, from); ! bloodColor = RandomNum(from, to); ! } ! } } } --- 2357,2365 ---- QStringList bloodColors = QStringList::split(",", basedef_->getStrProperty("bloodcolor")); if (bloodColors.count() == 2) { ! bool ok1, ok2; ! int from = bloodColors[0].toInt(&ok1); ! int to = bloodColors[1].toInt(&ok2); ! if (ok1 && ok2) { ! bloodColor = RandomNum(from, to); } } |