[prev in list] [next in list] [prev in thread] [next in thread]
List: atlantik-devel
Subject: [atlantik-cvs] CVS: kdegames/atlantik/libatlantic
From: kde () office ! kde ! org
Date: 2003-06-17 19:55:43
[Download RAW message or body]
Update of /home/kde/kdegames/atlantik/libatlantic
In directory office:/tmp/cvs-serv16782/libatlantic
Modified Files:
Tag: KDE_3_1_BRANCH
atlantic_core.cpp atlantic_core.h
Log Message:
backport: reset complete core when going to the select server page
Index: atlantic_core.cpp
===================================================================
RCS file: /home/kde/kdegames/atlantik/libatlantic/atlantic_core.cpp,v
retrieving revision 1.14.4.5
retrieving revision 1.14.4.6
diff -u -d -r1.14.4.5 -r1.14.4.6
--- atlantic_core.cpp 17 Jun 2003 18:21:34 -0000 1.14.4.5
+++ atlantic_core.cpp 17 Jun 2003 19:55:41 -0000 1.14.4.6
@@ -28,7 +28,7 @@
connect(this, SIGNAL(deleteTrade(Trade *)), this, SLOT(slotDeleteTrade(Trade *)));
}
-void AtlanticCore::reset()
+void AtlanticCore::reset(bool deletePlayers)
{
m_auctions.setAutoDelete(true);
m_auctions.clear();
@@ -39,13 +39,26 @@
m_estateGroups.setAutoDelete(true);
m_estateGroups.clear();
m_estateGroups.setAutoDelete(false);
- m_players.setAutoDelete(true);
- m_players.clear();
- m_players.setAutoDelete(false);
Trade *trade = 0;
for (QPtrListIterator<Trade> it(m_trades); (trade = *it) ; ++it)
removeTrade(trade);
+
+ if (deletePlayers)
+ {
+ m_players.setAutoDelete(true);
+ m_players.clear();
+ m_players.setAutoDelete(false);
+ }
+ else
+ {
+ Player *player = 0;
+ for (QPtrListIterator<Player> it(m_players); (player = *it) ; ++it)
+ {
+ player->setLocation(0);
+ player->setDestination(0);
+ }
+ }
}
QPtrList<Player> AtlanticCore::players()
Index: atlantic_core.h
===================================================================
RCS file: /home/kde/kdegames/atlantik/libatlantic/atlantic_core.h,v
retrieving revision 1.13.4.5
retrieving revision 1.13.4.6
diff -u -d -r1.13.4.5 -r1.13.4.6
--- atlantic_core.h 17 Jun 2003 18:21:34 -0000 1.13.4.5
+++ atlantic_core.h 17 Jun 2003 19:55:41 -0000 1.13.4.6
@@ -33,7 +33,7 @@
public:
AtlanticCore(QObject *parent, const char *name);
- void reset();
+ void reset(bool deletePlayers = false);
QPtrList<Player> players();
Player *newPlayer(int playerId);
_______________________________________________
atlantik-cvs mailing list
atlantik-cvs@mail.kde.org
http://mail.kde.org/mailman/listinfo/atlantik-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic