ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/main.C
(Generate patch)

Comparing deliantra/server/server/main.C (file contents):
Revision 1.8 by root, Sun Aug 27 16:15:13 2006 UTC vs.
Revision 1.9 by root, Sun Aug 27 15:24:22 2006 UTC

1/* 1/*
2 * static char *rcsid_main_c = 2 * static char *rcsid_main_c =
3 * "$Id: main.C,v 1.8 2006/08/27 16:15:13 root Exp $"; 3 * "$Id: main.C,v 1.9 2006/08/27 15:24:22 root Exp $";
4 */ 4 */
5 5
6/* 6/*
7 CrossFire, A Multiplayer game for X-windows 7 CrossFire, A Multiplayer game for X-windows
8 8
280 LOG(llevInfo,"enter_map: Could not find free spot for player - will dump on top of object (%s: %d, %d)\n", 280 LOG(llevInfo,"enter_map: Could not find free spot for player - will dump on top of object (%s: %d, %d)\n",
281 newmap->path, x , y); 281 newmap->path, x , y);
282 } 282 }
283 } /* end if looking for free spot */ 283 } /* end if looking for free spot */
284 284
285 if (op->map!=NULL)
286 {
287 INVOKE_PLAYER (MAP_CHANGE, op->contr, ARG_MAP (op->map), ARG_MAP (newmap));
288 INVOKE_MAP (LEAVE, op->map, ARG_PLAYER (op->contr));
289 }
285 290
286 /* If it is a player login, he has yet to be inserted anyplace. 291 /* If it is a player login, he has yet to be inserted anyplace.
287 * otherwise, we need to deal with removing the playe here. 292 * otherwise, we need to deal with removing the player here.
288 */ 293 */
289 if(!QUERY_FLAG(op, FLAG_REMOVED)) 294 if(!QUERY_FLAG(op, FLAG_REMOVED))
290 remove_ob(op); 295 remove_ob(op);
291
292 if (op->map!=NULL)
293 {
294 INVOKE_PLAYER (LEAVE, op->contr, ARG_MAP (op->map));
295 INVOKE_MAP (LEAVE, op->map, ARG_PLAYER (op->contr));
296 }
297 296
298 /* remove_ob clears these so they must be reset after the remove_ob call */ 297 /* remove_ob clears these so they must be reset after the remove_ob call */
299 op->x = x; 298 op->x = x;
300 op->y = y; 299 op->y = y;
301 op->map = newmap; 300 op->map = newmap;
302 insert_ob_in_map(op,op->map,NULL,INS_NO_WALK_ON); 301 insert_ob_in_map(op,op->map,NULL,INS_NO_WALK_ON);
303 302
304 INVOKE_PLAYER (ENTER, op->contr, ARG_MAP (op->map));
305 INVOKE_MAP (ENTER, op->map, ARG_PLAYER (op->contr)); 303 INVOKE_MAP (ENTER, op->map, ARG_PLAYER (op->contr));
306 304
307 if (!op->contr->hidden) 305 if (!op->contr->hidden)
308 newmap->players++; 306 newmap->players++;
309 307
310 newmap->timeout=0; 308 newmap->timeout=0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines