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.9 by root, Sat Sep 16 22:24:13 2006 UTC

1
2/*
3 * static char *rcsid_move_c =
4 * "$Id: move.C,v 1.7 2006/09/10 15:59:57 root Exp $";
5 */
6
7/* 1/*
8 CrossFire, A Multiplayer game for X-windows 2 CrossFire, A Multiplayer game for X-windows
9 3
10 Copyright (C) 2002 Mark Wedel & Crossfire Development Team 4 Copyright (C) 2002 Mark Wedel & Crossfire Development Team
11 Copyright (C) 1992 Frank Tore Johansen 5 Copyright (C) 1992 Frank Tore Johansen
22 16
23 You should have received a copy of the GNU General Public License 17 You should have received a copy of the GNU General Public License
24 along with this program; if not, write to the Free Software 18 along with this program; if not, write to the Free Software
25 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 20
27 The author can be reached via e-mail to crossfire-devel@real-time.com 21 The author can be reached via e-mail to <crossfire@schmorp.de>
28*/ 22*/
29 23
30#include <global.h> 24#include <global.h>
31#ifndef __CEXTRACT__ 25#ifndef __CEXTRACT__
32# include <sproto.h> 26# include <sproto.h>
65move_ob (object *op, int dir, object *originator) 59move_ob (object *op, int dir, object *originator)
66{ 60{
67 sint16 newx = op->x + freearr_x[dir]; 61 sint16 newx = op->x + freearr_x[dir];
68 sint16 newy = op->y + freearr_y[dir]; 62 sint16 newy = op->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) 67 if (op == NULL)
74 { 68 {
75 LOG (llevError, "Trying to move NULL.\n"); 69 LOG (llevError, "Trying to move NULL.\n");
205teleport (object *teleporter, uint8 tele_type, object *user) 199teleport (object *teleporter, uint8 tele_type, object *user)
206{ 200{
207 object *altern; 201 object *altern;
208 int i, j, k, nrofalt = 0; 202 int i, j, k, nrofalt = 0;
209 object *other_teleporter, *tmp; 203 object *other_teleporter, *tmp;
210 mapstruct *m; 204 maptile *m;
211 sint16 sx, sy; 205 sint16 sx, sy;
212 206
213 if (user == NULL) 207 if (user == NULL)
214 return 0; 208 return 0;
215 if (user->head != NULL) 209 if (user->head != NULL)
313 * This is currently only used for the boulder roll code. 307 * This is currently only used for the boulder roll code.
314 * Returns 1 if object does not fit, 0 if it does. 308 * Returns 1 if object does not fit, 0 if it does.
315 */ 309 */
316 310
317int 311int
318try_fit (object *op, mapstruct *m, int x, int y) 312try_fit (object *op, maptile *m, int x, int y)
319{ 313{
320 object *tmp, *more; 314 object *tmp, *more;
321 sint16 tx, ty; 315 sint16 tx, ty;
322 int mflags; 316 int mflags;
323 mapstruct *m2; 317 maptile *m2;
324 318
325 if (op->head) 319 if (op->head)
326 op = op->head; 320 op = op->head;
327 321
328 for (more = op; more; more = more->more) 322 for (more = op; more; more = more->more)
361roll_ob (object *op, int dir, object *pusher) 355roll_ob (object *op, int dir, object *pusher)
362{ 356{
363 object *tmp; 357 object *tmp;
364 sint16 x, y; 358 sint16 x, y;
365 int flags; 359 int flags;
366 mapstruct *m; 360 maptile *m;
367 MoveType move_block; 361 MoveType move_block;
368 362
369 if (op->head) 363 if (op->head)
370 op = op->head; 364 op = op->head;
371 365
427 && owner == pusher 421 && owner == pusher
428#endif 422#endif
429 ) 423 )
430 { 424 {
431 int temp; 425 int temp;
432 mapstruct *m; 426 maptile *m;
433 427
434 remove_ob (who); 428 remove_ob (who);
435 remove_ob (pusher); 429 remove_ob (pusher);
436 temp = pusher->x; 430 temp = pusher->x;
437 pusher->x = who->x; 431 pusher->x = who->x;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines