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

Comparing deliantra/server/server/move.c (file contents):
Revision 1.1 by root, Fri Feb 3 07:14:33 2006 UTC vs.
Revision 1.2 by root, Fri Feb 3 07:25:25 2006 UTC

1/* 1/*
2 * static char *rcsid_move_c = 2 * static char *rcsid_move_c =
3 * "$Id: move.c,v 1.1 2006/02/03 07:14:33 root Exp $"; 3 * "$Id: move.c,v 1.2 2006/02/03 07:25:25 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
28 28
29#include <global.h> 29#include <global.h>
30#ifndef __CEXTRACT__ 30#ifndef __CEXTRACT__
31#include <sproto.h> 31#include <sproto.h>
32#endif 32#endif
33
34extern int same_party (partylist *a, partylist *b);
33 35
34/* 36/*
35 * move_object() tries to move object op in the direction "dir". 37 * move_object() tries to move object op in the direction "dir".
36 * If it fails (something blocks the passage), it returns 0, 38 * If it fails (something blocks the passage), it returns 0,
37 * otherwise 1. 39 * otherwise 1.
395 /* Wake up sleeping monsters that may be pushed */ 397 /* Wake up sleeping monsters that may be pushed */
396 CLEAR_FLAG(who,FLAG_SLEEP); 398 CLEAR_FLAG(who,FLAG_SLEEP);
397 399
398 /* player change place with his pets or summoned creature */ 400 /* player change place with his pets or summoned creature */
399 /* TODO: allow multi arch pushing. Can't be very difficult */ 401 /* TODO: allow multi arch pushing. Can't be very difficult */
400 if (who->more == NULL && owner == pusher) { 402 if (who->more == NULL
403 &&
404 (
405 (owner && owner->contr && pusher->contr
406 && same_party (owner->contr->party, pusher->contr->party))
407 || owner == pusher
408 )
409 ) {
401 int temp; 410 int temp;
402 mapstruct *m; 411 mapstruct *m;
403 412
404 remove_ob(who); 413 remove_ob(who);
405 remove_ob(pusher); 414 remove_ob(pusher);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines