--- deliantra/server/socket/loop.C 2012/01/03 11:25:37 1.92
+++ deliantra/server/socket/loop.C 2012/11/04 02:20:11 1.94
@@ -1,22 +1,22 @@
/*
* This file is part of Deliantra, the Roguelike Realtime MMORPG.
- *
+ *
* Copyright (©) 2005,2006,2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
- *
+ *
* Deliantra is free software: you can redistribute it and/or modify it under
* the terms of the Affero GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the Affero GNU General Public License
* and the GNU General Public License along with this program. If not, see
* .
- *
+ *
* The authors can be reached via e-mail to
*/
@@ -115,34 +115,37 @@
void
client::tick ()
{
- if (!pl || destroyed ())
+ if (destroyed ())
return;
- pl->dirty = true;
+ if (pl)
+ {
+ pl->dirty = true;
- /* Update the players stats once per tick. More efficient than
- * sending them whenever they change, and probably just as useful
- */
- pl->need_updated_stats ();
- esrv_update_stats (pl);
+ /* Update the players stats once per tick. More efficient than
+ * sending them whenever they change, and probably just as useful
+ */
+ pl->need_updated_stats ();
+ esrv_update_stats (pl);
- if (pl->ns->update_spells)
- esrv_update_spells (pl);
+ if (pl->ns->update_spells)
+ esrv_update_spells (pl);
- sint32 weight = pl->ob->client_weight ();
+ sint32 weight = pl->ob->client_weight ();
- if (last_weight != weight)
- {
- pl->ob->update_stats ();
- esrv_update_item (UPD_WEIGHT, pl->ob, pl->ob);
- }
+ if (last_weight != weight)
+ {
+ pl->ob->update_stats ();
+ esrv_update_item (UPD_WEIGHT, pl->ob, pl->ob);
+ }
- draw_client_map (pl);
+ draw_client_map (pl);
- if (update_look)
- esrv_draw_look (pl);
+ if (update_look)
+ esrv_draw_look (pl);
- mapinfo_queue_run ();
+ mapinfo_queue_run ();
+ }
#if HAVE_TCP_INFO
// check time of last ack, and, if too old, kill connection