summaryrefslogtreecommitdiff
path: root/src/gui/char_select.cpp
diff options
context:
space:
mode:
authorRogier Polak <rogier.l.a.polak@gmail.com>2007-02-25 15:12:43 +0000
committerRogier Polak <rogier.l.a.polak@gmail.com>2007-02-25 15:12:43 +0000
commit0ee4b4d0229d8513eb2a71cc735d8807fde57f29 (patch)
tree9a462fb8af3d13c813742e4d20ff7f0fb1b7deb8 /src/gui/char_select.cpp
parent775404c84c3250225d43f10c4a5363e997618cb2 (diff)
downloadmana-client-0ee4b4d0229d8513eb2a71cc735d8807fde57f29.tar.gz
mana-client-0ee4b4d0229d8513eb2a71cc735d8807fde57f29.tar.bz2
mana-client-0ee4b4d0229d8513eb2a71cc735d8807fde57f29.tar.xz
mana-client-0ee4b4d0229d8513eb2a71cc735d8807fde57f29.zip
Fixed small issue concerning SDL timers, removed a useless variable.
Diffstat (limited to 'src/gui/char_select.cpp')
-rw-r--r--src/gui/char_select.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/char_select.cpp b/src/gui/char_select.cpp
index 5e329598..d5a28bec 100644
--- a/src/gui/char_select.cpp
+++ b/src/gui/char_select.cpp
@@ -134,7 +134,8 @@ CharSelectDialog::CharSelectDialog(LockedArray<LocalPlayer*> *charInfo,
void CharSelectDialog::action(const gcn::ActionEvent &event)
{
- if (event.getId() == "ok" && n_character > 0)
+ // The pointers are set to NULL if there is no character stored
+ if (event.getId() == "ok" && (mCharInfo->getEntry()))
{
// Start game
mNewCharButton->setEnabled(false);
@@ -153,7 +154,9 @@ void CharSelectDialog::action(const gcn::ActionEvent &event)
}
else if (event.getId() == "new")
{
- if (n_character < MAX_SLOT + 1)
+ //TODO: search the first free slot, and start CharCreateDialog
+ // maybe add that search to the constructor
+ if (!(mCharInfo->getEntry()))
{
// Start new character dialog
mCharInfo->lock();