summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--src/gui/char_select.cpp2
-rw-r--r--src/main.cpp2
3 files changed, 9 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index b126ae80..6c94ccad 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,11 @@
-2007-03-23 Bjørn Lindeijer <bjorn@lindeijer.nl>
+2007-03-24 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/main.cpp: Changed the order of network message handling and
+ logic, in order to prevent an incoming character delete message from
+ deleting the player character that was about to be drawn.
+ * src/gui/char_select.cpp: Removed useless lock/unlock calls.
+
+2007-03-23 Bjørn Lindeijer <bjorn@lindeijer.nl>
* src/gui/char_select.cpp, src/gui/char_select.h,
src/net/charserverhandler.h, src/net/charserverhandler.cpp: Clarified
diff --git a/src/gui/char_select.cpp b/src/gui/char_select.cpp
index 845c6d64..fc6be59f 100644
--- a/src/gui/char_select.cpp
+++ b/src/gui/char_select.cpp
@@ -151,11 +151,9 @@ void CharSelectDialog::action(const gcn::ActionEvent &event)
else if (event.getId() == "new" && n_character <= MAX_SLOT)
{
// Start new character dialog
- mCharInfo->lock();
CharCreateDialog *charCreateDialog =
new CharCreateDialog(this, mCharInfo->getPos(), mNetwork, mSex);
charServerHandler.setCharCreateDialog(charCreateDialog);
- mCharInfo->unlock();
}
else if (event.getId() == "delete")
{
diff --git a/src/main.cpp b/src/main.cpp
index 98a7aeb7..78b967e2 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -625,9 +625,9 @@ int main(int argc, char *argv[])
guiInput->pushInput(event);
}
- gui->logic();
network->flush();
network->dispatchMessages();
+ gui->logic();
if (network->getState() == Network::NET_ERROR)
{