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.7 by root, Sun Sep 10 15:59:57 2006 UTC vs.
Revision 1.29 by root, Sun Dec 28 06:59:27 2008 UTC

1
2/* 1/*
3 * static char *rcsid_move_c = 2 * This file is part of Deliantra, the Roguelike Realtime MMORPG.
4 * "$Id: move.C,v 1.7 2006/09/10 15:59:57 root Exp $"; 3 *
4 * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
5 * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team
6 * Copyright (©) 1992,2007 Frank Tore Johansen
7 *
8 * Deliantra is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 *
21 * The authors can be reached via e-mail to <support@deliantra.net>
5 */ 22 */
6
7/*
8 CrossFire, A Multiplayer game for X-windows
9
10 Copyright (C) 2002 Mark Wedel & Crossfire Development Team
11 Copyright (C) 1992 Frank Tore Johansen
12
13 This program is free software; you can redistribute it and/or modify
14 it under the terms of the GNU General Public License as published by
15 the Free Software Foundation; either version 2 of the License, or
16 (at your option) any later version.
17
18 This program is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU General Public License for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with this program; if not, write to the Free Software
25 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26
27 The author can be reached via e-mail to crossfire-devel@real-time.com
28*/
29 23
30#include <global.h> 24#include <global.h>
31#ifndef __CEXTRACT__ 25#ifndef __CEXTRACT__
32# include <sproto.h> 26# include <sproto.h>
33#endif
34
35#ifdef COZY_SERVER
36// use a ptotoype
37extern int same_party (partylist *a, partylist *b);
38#endif 27#endif
39 28
40/* 29/*
41 * move_object() tries to move object op in the direction "dir". 30 * move_object() tries to move object op in the direction "dir".
42 * If it fails (something blocks the passage), it returns 0, 31 * If it fails (something blocks the passage), it returns 0,
46 */ 35 */
47 36
48int 37int
49move_object (object *op, int dir) 38move_object (object *op, int dir)
50{ 39{
51 return move_ob (op, dir, op); 40 return op->move (dir);
52} 41}
53
54 42
55/* object op is trying to move in direction dir. 43/* object op is trying to move in direction dir.
56 * originator is typically the same as op, but 44 * originator is typically the same as op, but
57 * can be different if originator is causing op to 45 * can be different if originator is causing op to
58 * move (originator is pushing op) 46 * move (originator is pushing op)
62 * very similiar to move_object. 50 * very similiar to move_object.
63 */ 51 */
64int 52int
65move_ob (object *op, int dir, object *originator) 53move_ob (object *op, int dir, object *originator)
66{ 54{
55 return op->move (dir, originator);
56}
57
58int
59object::move (int dir, object *originator)
60{
67 sint16 newx = op->x + freearr_x[dir]; 61 sint16 newx = x + freearr_x[dir];
68 sint16 newy = op->y + freearr_y[dir]; 62 sint16 newy = y + freearr_y[dir];
69 object *tmp; 63 object *tmp;
70 mapstruct *m; 64 maptile *m;
71 int mflags; 65 int mflags;
72 66
73 if (op == NULL)
74 {
75 LOG (llevError, "Trying to move NULL.\n");
76 return 0;
77 }
78
79 m = op->map; 67 m = map;
80 mflags = get_map_flags (m, &m, newx, newy, &newx, &newy); 68 mflags = get_map_flags (m, &m, newx, newy, &newx, &newy);
81 69
82 /* If the space the player is trying to is out of the map, 70 /* If the space the player is trying to is out of the map,
83 * bail now - we know it can't work. 71 * bail now - we know it can't work.
84 */ 72 */
85 if (mflags & P_OUT_OF_MAP) 73 if (mflags & P_OUT_OF_MAP)
86 return 0; 74 return 0;
87 75
88
89 /* Is this space blocked? Players with wizpass are immune to 76 /* Is this space blocked? Players with wizpass are immune to
90 * this condition. 77 * this condition.
91 */ 78 */
92 if (blocked_link (op, m, newx, newy) && !QUERY_FLAG (op, FLAG_WIZPASS)) 79 if (blocked_link (this, m, newx, newy) && !flag [FLAG_WIZPASS])
93 return 0; 80 return 0;
94 81
95 /* 0.94.2 - we need to set the direction for the new animation code. 82 /* 0.94.2 - we need to set the direction for the new animation code.
96 * it uses it to figure out face to use - I can't see it 83 * it uses it to figure out face to use - I can't see it
97 * breaking anything, but it might. 84 * breaking anything, but it might.
98 */ 85 */
99 if (op->more != NULL && !move_ob (op->more, dir, op->more->head)) 86 if (more && !more->move (dir, more->head))
100 return 0; 87 return 0;
101 88
102 op->direction = dir; 89 direction = dir;
103 90
104 if (op->will_apply & 4) 91 if (will_apply & 4)
105 check_earthwalls (op, m, newx, newy); 92 check_earthwalls (this, m, newx, newy);
93
106 if (op->will_apply & 8) 94 if (will_apply & 8)
107 check_doors (op, m, newx, newy); 95 check_doors (this, m, newx, newy);
108 96
109 /* 0.94.1 - I got a stack trace that showed it crash with remove_ob trying 97 /* 0.94.1 - I got a stack trace that showed it crash with remove_ob trying
110 * to remove a removed object, and this function was the culprit. A possible 98 * to remove a removed object, and this function was the culprit. A possible
111 * guess I have is that check_doors above ran into a trap, killing the 99 * guess I have is that check_doors above ran into a trap, killing the
112 * monster. 100 * monster.
113 * 101 *
114 * Unfortunately, it doesn't appear that the calling functions of move_object 102 * Unfortunately, it doesn't appear that the calling functions of move_object
115 * deal very well with op being killed, so all this might do is just 103 * deal very well with op being killed, so all this might do is just
116 * migrate the problem someplace else. 104 * migrate the problem someplace else.
117 */ 105 */
118 106 if (flag [FLAG_REMOVED])//D remove or fix?
119 if (QUERY_FLAG (op, FLAG_REMOVED))
120 { 107 {
121 LOG (llevDebug, "move_object: monster has been removed - will not process further\n"); 108 LOG (llevDebug, "move_object: monster has been removed - will not process further\n");
122 /* Was not successful, but don't want to try and move again */ 109 /* Was not successful, but don't want to try and move again */
123 return 1; 110 return 1;
124 } 111 }
125 112
126 /* If this is a tail portion, just want to tell caller that move is 113 /* If this is a tail portion, just want to tell caller that move is
127 * ok - the caller will deal with actual object removal/insertion 114 * ok - the caller will deal with actual object removal/insertion
128 */ 115 */
129 if (op->head) 116 if (head)
130 return 1; 117 return 1;
131 118
119 if (m != map && contr)
120 {
121 if (INVOKE_MAP (LEAVE, map, ARG_PLAYER (contr)))
122 return 0;
123
124 remove ();
125
126 if (INVOKE_PLAYER (MAP_CHANGE, contr, ARG_MAP (m), ARG_INT (newx), ARG_INT (newy)))
127 return 0;
128
129 if (INVOKE_MAP (ENTER, m, ARG_PLAYER (contr), ARG_INT (newx), ARG_INT (newy)))
130 return 0;
131 }
132 else
132 remove_ob (op); 133 remove ();
133 134
134 /* we already have newx, newy, and m, so lets use them.
135 * In addition, this fixes potential crashes, because multipart object was
136 * on edge of map, +=x, +=y doesn't make correct coordinates.
137 */
138 for (tmp = op; tmp != NULL; tmp = tmp->more) 135 for (tmp = this; tmp; tmp = tmp->more)
139 { 136 {
140 tmp->x += freearr_x[dir]; 137 tmp->x += freearr_x[dir];
141 tmp->y += freearr_y[dir]; 138 tmp->y += freearr_y[dir];
142 tmp->map = get_map_from_coord (tmp->map, &tmp->x, &tmp->y); 139 xy_normalise (tmp->map, tmp->x, tmp->y);
143 } 140 }
144 141
145 /* insert_ob_in_map will deal with any tiling issues */ 142 /* insert_ob_in_map will deal with any tiling issues */
146 insert_ob_in_map (op, m, originator, 0); 143 insert_ob_in_map (this, map, originator, 0);
147 144
148 return 1; 145 return 1;
149} 146}
150 147
151 148
173 i = find_first_free_spot (op, op->map, x, y); 170 i = find_first_free_spot (op, op->map, x, y);
174 171
175 if (i == -1) 172 if (i == -1)
176 return 0; /* No free spot */ 173 return 0; /* No free spot */
177 174
178 if (op->head != NULL)
179 op = op->head; 175 op = op->head_ ();
180 remove_ob (op); 176 op->remove ();
177
181 for (tmp = op; tmp != NULL; tmp = tmp->more) 178 for (object *tmp = op; tmp; tmp = tmp->more)
179 {
182 tmp->x = x + freearr_x[i] + (tmp->arch == NULL ? 0 : tmp->arch->clone.x), 180 tmp->x = x + freearr_x[i] + (!tmp->arch ? 0 : tmp->arch->x);
183 tmp->y = y + freearr_y[i] + (tmp->arch == NULL ? 0 : tmp->arch->clone.y); 181 tmp->y = y + freearr_y[i] + (!tmp->arch ? 0 : tmp->arch->y);
182 }
184 183
185 tmp = insert_ob_in_map (op, op->map, originator, 0); 184 op = insert_ob_in_map (op, op->map, originator, 0);
186 if (tmp) 185
187 return 0; 186 return !op;
188 else
189 return 1;
190} 187}
191 188
192/* 189/*
193 * Return value: 1 if object was destroyed, 0 otherwise. 190 * Return value: 1 if object was destroyed, 0 otherwise.
194 * Modified so that instead of passing the 'originator' that had no 191 * Modified so that instead of passing the 'originator' that had no
205teleport (object *teleporter, uint8 tele_type, object *user) 202teleport (object *teleporter, uint8 tele_type, object *user)
206{ 203{
207 object *altern; 204 object *altern;
208 int i, j, k, nrofalt = 0; 205 int i, j, k, nrofalt = 0;
209 object *other_teleporter, *tmp; 206 object *other_teleporter, *tmp;
210 mapstruct *m; 207 maptile *m;
211 sint16 sx, sy; 208 sint16 sx, sy;
212 209
213 if (user == NULL) 210 if (user == NULL)
214 return 0; 211 return 0;
215 if (user->head != NULL) 212 if (user->head != NULL)
222 for (i = -5; i < 6; i++) 219 for (i = -5; i < 6; i++)
223 for (j = -5; j < 6; j++) 220 for (j = -5; j < 6; j++)
224 { 221 {
225 if (i == 0 && j == 0) 222 if (i == 0 && j == 0)
226 continue; 223 continue;
224
227 /* Perhaps this should be extended to support tiled maps */ 225 /* Perhaps this should be extended to support tiled maps */
228 if (OUT_OF_REAL_MAP (teleporter->map, teleporter->x + i, teleporter->y + j)) 226 if (OUT_OF_REAL_MAP (teleporter->map, teleporter->x + i, teleporter->y + j))
229 continue; 227 continue;
228
230 other_teleporter = get_map_ob (teleporter->map, teleporter->x + i, teleporter->y + j); 229 other_teleporter = GET_MAP_OB (teleporter->map, teleporter->x + i, teleporter->y + j);
231 230
232 while (other_teleporter) 231 while (other_teleporter)
233 { 232 {
234 if (other_teleporter->type == tele_type) 233 if (other_teleporter->type == tele_type)
235 break; 234 break;
236 other_teleporter = other_teleporter->above; 235 other_teleporter = other_teleporter->above;
237 } 236 }
237
238 if (other_teleporter && !(RANDOM () % ++nrofalt)) 238 if (other_teleporter && !rndm (++nrofalt))
239 altern = other_teleporter; 239 altern = other_teleporter;
240 } 240 }
241 241
242 if (!nrofalt) 242 if (!nrofalt)
243 { 243 {
244 LOG (llevError, "No alternative teleporters around!\n"); 244 LOG (llevError, "%s: no alternative teleporters around (user %s).\n",
245 teleporter->debug_desc (), user->debug_desc ());
245 return 0; 246 return 0;
246 } 247 }
247 248
248 other_teleporter = altern; 249 other_teleporter = altern;
249 k = find_free_spot (user, other_teleporter->map, other_teleporter->x, other_teleporter->y, 1, 9); 250 k = find_free_spot (user, other_teleporter->map, other_teleporter->x, other_teleporter->y, 1, 9);
278 } 279 }
279 else 280 else
280 return 0; 281 return 0;
281 } 282 }
282 283
283 remove_ob (user); 284 user->remove ();
284 285
285 /* Update location for the object */ 286 /* Update location for the object */
286 for (tmp = user; tmp != NULL; tmp = tmp->more) 287 for (tmp = user; tmp; tmp = tmp->more)
287 { 288 {
288 tmp->x = other_teleporter->x + freearr_x[k] + (tmp->arch == NULL ? 0 : tmp->arch->clone.x); 289 tmp->x = other_teleporter->x + freearr_x[k] + (tmp->arch ? tmp->arch->x : 0);
289 tmp->y = other_teleporter->y + freearr_y[k] + (tmp->arch == NULL ? 0 : tmp->arch->clone.y); 290 tmp->y = other_teleporter->y + freearr_y[k] + (tmp->arch ? tmp->arch->y : 0);
290 } 291 }
292
291 tmp = insert_ob_in_map (user, other_teleporter->map, NULL, 0); 293 tmp = insert_ob_in_map (user, other_teleporter->map, NULL, 0);
292 return (tmp == NULL); 294 return !tmp;
293} 295}
294 296
295void 297void
296recursive_roll (object *op, int dir, object *pusher) 298recursive_roll (object *op, int dir, object *pusher)
297{ 299{
313 * This is currently only used for the boulder roll code. 315 * This is currently only used for the boulder roll code.
314 * Returns 1 if object does not fit, 0 if it does. 316 * Returns 1 if object does not fit, 0 if it does.
315 */ 317 */
316 318
317int 319int
318try_fit (object *op, mapstruct *m, int x, int y) 320try_fit (object *op, maptile *m, int x, int y)
319{ 321{
320 object *tmp, *more; 322 object *tmp, *more;
321 sint16 tx, ty; 323 sint16 tx, ty;
322 int mflags; 324 int mflags;
323 mapstruct *m2; 325 maptile *m2;
324 326
325 if (op->head) 327 if (op->head)
326 op = op->head; 328 op = op->head;
327 329
328 for (more = op; more; more = more->more) 330 for (more = op; more; more = more->more)
333 mflags = get_map_flags (m, &m2, tx, ty, &tx, &ty); 335 mflags = get_map_flags (m, &m2, tx, ty, &tx, &ty);
334 336
335 if (mflags & P_OUT_OF_MAP) 337 if (mflags & P_OUT_OF_MAP)
336 return 1; 338 return 1;
337 339
338 for (tmp = get_map_ob (m2, tx, ty); tmp; tmp = tmp->above) 340 for (tmp = GET_MAP_OB (m2, tx, ty); tmp; tmp = tmp->above)
339 { 341 {
340 if (tmp->head == op || tmp == op) 342 if (tmp->head == op || tmp == op)
341 continue; 343 continue;
342 344
343 if ((QUERY_FLAG (tmp, FLAG_ALIVE) && tmp->type != DOOR)) 345 if ((QUERY_FLAG (tmp, FLAG_ALIVE) && tmp->type != DOOR))
361roll_ob (object *op, int dir, object *pusher) 363roll_ob (object *op, int dir, object *pusher)
362{ 364{
363 object *tmp; 365 object *tmp;
364 sint16 x, y; 366 sint16 x, y;
365 int flags; 367 int flags;
366 mapstruct *m; 368 maptile *m;
367 MoveType move_block; 369 MoveType move_block;
368 370
369 if (op->head) 371 if (op->head)
370 op = op->head; 372 op = op->head;
371 373
372 x = op->x + freearr_x[dir]; 374 x = op->x + freearr_x[dir];
373 y = op->y + freearr_y[dir]; 375 y = op->y + freearr_y[dir];
374 376
375 if (!QUERY_FLAG (op, FLAG_CAN_ROLL) || (op->weight && random_roll (0, op->weight / 50000 - 1, pusher, PREFER_LOW) > pusher->stats.Str)) 377 if (!QUERY_FLAG (op, FLAG_CAN_ROLL)
378 || (op->weight && random_roll (0, op->weight / 50000 - 1, pusher, PREFER_LOW)
379 > pusher->stats.Str))
376 return 0; 380 return 0;
377 381
378 m = op->map; 382 m = op->map;
379 flags = get_map_flags (m, &m, x, y, &x, &y); 383 flags = get_map_flags (m, &m, x, y, &x, &y);
380 384
384 move_block = GET_MAP_MOVE_BLOCK (m, x, y); 388 move_block = GET_MAP_MOVE_BLOCK (m, x, y);
385 389
386 /* If the target space is not blocked, no need to look at the objects on it */ 390 /* If the target space is not blocked, no need to look at the objects on it */
387 if ((op->move_type & move_block) == op->move_type) 391 if ((op->move_type & move_block) == op->move_type)
388 { 392 {
389 for (tmp = get_map_ob (m, x, y); tmp != NULL; tmp = tmp->above) 393 for (tmp = GET_MAP_OB (m, x, y); tmp != NULL; tmp = tmp->above)
390 { 394 {
391 if (tmp->head == op) 395 if (tmp->head == op)
392 continue; 396 continue;
393 if (OB_MOVE_BLOCK (op, tmp) && !roll_ob (tmp, dir, pusher)) 397 if (OB_MOVE_BLOCK (op, tmp) && !roll_ob (tmp, dir, pusher))
394 return 0; 398 return 0;
395 } 399 }
396 } 400 }
397 if (try_fit (op, m, x, y)) 401 if (try_fit (op, m, x, y))
398 return 0; 402 return 0;
399 403
400 remove_ob (op); 404 op->remove ();
401 for (tmp = op; tmp != NULL; tmp = tmp->more) 405 for (tmp = op; tmp != NULL; tmp = tmp->more)
402 tmp->x += freearr_x[dir], tmp->y += freearr_y[dir]; 406 tmp->x += freearr_x[dir], tmp->y += freearr_y[dir];
403 insert_ob_in_map (op, op->map, pusher, 0); 407 insert_ob_in_map (op, op->map, pusher, 0);
404 return 1; 408 return 1;
405} 409}
411 int str1, str2; 415 int str1, str2;
412 object *owner; 416 object *owner;
413 417
414 if (who->head != NULL) 418 if (who->head != NULL)
415 who = who->head; 419 who = who->head;
416 owner = get_owner (who); 420 owner = who->owner;
417 421
418 /* Wake up sleeping monsters that may be pushed */ 422 /* Wake up sleeping monsters that may be pushed */
419 CLEAR_FLAG (who, FLAG_SLEEP); 423 CLEAR_FLAG (who, FLAG_SLEEP);
420 424
421 /* player change place with his pets or summoned creature */ 425 /* player change place with his pets or summoned creature */
422 /* TODO: allow multi arch pushing. Can't be very difficult */ 426 /* TODO: allow multi arch pushing. Can't be very difficult */
423 if (who->more == NULL 427 if (who->more == NULL
424#ifdef COZY_SERVER
425 && ((owner && owner->contr && pusher->contr && same_party (owner->contr->party, pusher->contr->party)) || owner == pusher) 428 && ((owner && owner->contr && pusher->contr && same_party (owner->contr->party, pusher->contr->party))
426#else
427 && owner == pusher 429 || owner == pusher)
428#endif
429 ) 430 )
430 { 431 {
431 int temp; 432 int temp;
432 mapstruct *m; 433 maptile *m;
433 434
434 remove_ob (who); 435 who->remove ();
435 remove_ob (pusher); 436 pusher->remove ();
436 temp = pusher->x; 437 temp = pusher->x;
437 pusher->x = who->x; 438 pusher->x = who->x;
438 who->x = temp; 439 who->x = temp;
439 440
440 temp = pusher->y; 441 temp = pusher->y;
447 448
448 insert_ob_in_map (who, who->map, pusher, 0); 449 insert_ob_in_map (who, who->map, pusher, 0);
449 insert_ob_in_map (pusher, pusher->map, pusher, 0); 450 insert_ob_in_map (pusher, pusher->map, pusher, 0);
450 return 0; 451 return 0;
451 } 452 }
452
453 453
454 /* We want ONLY become enemy of evil, unaggressive monster. We must RUN in them */ 454 /* We want ONLY become enemy of evil, unaggressive monster. We must RUN in them */
455 /* In original we have here a unaggressive check only - that was the reason why */ 455 /* In original we have here a unaggressive check only - that was the reason why */
456 /* we so often become an enemy of friendly monsters... */ 456 /* we so often become an enemy of friendly monsters... */
457 /* funny: was they set to unaggressive 0 (= not so nice) they don't attack */ 457 /* funny: was they set to unaggressive 0 (= not so nice) they don't attack */
458
459 if (owner != pusher && pusher->type == PLAYER && who->type != PLAYER && 458 if (owner != pusher && pusher->type == PLAYER && who->type != PLAYER &&
460 !QUERY_FLAG (who, FLAG_FRIENDLY) && !QUERY_FLAG (who, FLAG_NEUTRAL)) 459 !QUERY_FLAG (who, FLAG_FRIENDLY) && !QUERY_FLAG (who, FLAG_NEUTRAL))
461 { 460 {
462 if (pusher->contr->run_on) /* only when we run */ 461 if (pusher->contr->run_on) /* only when we run */
463 { 462 {
464 new_draw_info_format (NDI_UNIQUE, 0, pusher, "You start to attack %s !!", &who->name); 463 new_draw_info_format (NDI_UNIQUE, 0, pusher, "You start to attack %s!!", &who->name);
465 CLEAR_FLAG (who, FLAG_UNAGGRESSIVE); /* the sucker don't like you anymore */ 464 CLEAR_FLAG (who, FLAG_UNAGGRESSIVE); /* the sucker don't like you anymore */
466 who->enemy = pusher; 465 who->enemy = pusher;
467 return 1; 466 return 1;
468 } 467 }
469 else 468 else
470 {
471 new_draw_info_format (NDI_UNIQUE, 0, pusher, "You avoid attacking %s.", &who->name); 469 new_draw_info_format (NDI_UNIQUE, 0, pusher, "You avoid attacking %s.", &who->name);
472 }
473 } 470 }
474 471
475 /* now, lets test stand still. we NEVER can push stand_still monsters. */ 472 /* now, lets test stand still. we NEVER can push stand_still monsters. */
476 if (QUERY_FLAG (who, FLAG_STAND_STILL)) 473 if (QUERY_FLAG (who, FLAG_STAND_STILL))
477 { 474 {
487 */ 484 */
488 485
489 str1 = (who->stats.Str > 0 ? who->stats.Str : who->level); 486 str1 = (who->stats.Str > 0 ? who->stats.Str : who->level);
490 str2 = (pusher->stats.Str > 0 ? pusher->stats.Str : pusher->level); 487 str2 = (pusher->stats.Str > 0 ? pusher->stats.Str : pusher->level);
491 if (QUERY_FLAG (who, FLAG_WIZ) || 488 if (QUERY_FLAG (who, FLAG_WIZ) ||
492 random_roll (str1, str1 / 2 + str1 * 2, who, PREFER_HIGH) >= 489 random_roll (str1, str1 * 5 / 2, who, PREFER_HIGH) >=
493 random_roll (str2, str2 / 2 + str2 * 2, pusher, PREFER_HIGH) || !move_object (who, dir)) 490 random_roll (str2, str2 * 5 / 2, pusher, PREFER_HIGH) || !move_object (who, dir))
494 { 491 {
495 if (who->type == PLAYER) 492 if (who->type == PLAYER)
496 {
497 new_draw_info_format (NDI_UNIQUE, 0, who, "%s tried to push you.", &pusher->name); 493 new_draw_info_format (NDI_UNIQUE, 0, who, "%s tried to push you.", &pusher->name);
498 } 494
499 return 0; 495 return 0;
500 } 496 }
501 497
502 /* If we get here, the push succeeded. 498 /* If we get here, the push succeeded.
503 * Let everyone know the status. 499 * Let everyone know the status.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines