Author: grumbel
Date: 2008-07-04 00:15:30 +0200 (Fri, 04 Jul 2008)
New Revision: 3646
Modified:
trunk/pingus/src/server_event.cpp
Log:
Fixed demo file issue
Modified: trunk/pingus/src/server_event.cpp
===================================================================
--- trunk/pingus/src/server_event.cpp 2008-07-03 22:15:17 UTC (rev 3645)
+++ trunk/pingus/src/server_event.cpp 2008-07-03 22:15:30 UTC (rev 3646)
@@ -100,12 +100,16 @@
type = PINGU_ACTION_EVENT;
reader.read_int ("time", time_stamp);
reader.read_int ("id", pingu_id);
- reader.read_string("raw-x", raw_x);
- reader.read_string("raw-y", raw_y);
+
+ if (reader.read_string("raw-x", raw_x))
+ pos.x = string2float(raw_x);
+
+ if (reader.read_string("raw-y", raw_y))
+ pos.y = string2float(raw_y);
+
reader.read_enum("action", pingu_action, Actions::action_from_string);
- pos.x = string2float(raw_x);
- pos.y = string2float(raw_y);
+
}
else
{
_______________________________________________
pingus-cvs mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/pingus-cvs