1 | /* |
1 | /* |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
3 | * |
3 | * |
4 | * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
4 | * Copyright (©) 2005,2006,2007,2008,2009 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
5 | * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team |
5 | * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team |
6 | * Copyright (©) 1992,2007 Frank Tore Johansen |
6 | * Copyright (©) 1992,2007 Frank Tore Johansen |
7 | * |
7 | * |
8 | * Deliantra is free software: you can redistribute it and/or modify |
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 |
9 | * it under the terms of the GNU General Public License as published by |
… | |
… | |
461 | } |
461 | } |
462 | else |
462 | else |
463 | move_type = MOVE_WALK; |
463 | move_type = MOVE_WALK; |
464 | } |
464 | } |
465 | } |
465 | } |
|
|
466 | |
|
|
467 | // if the object has an animation, try to provide a default face |
|
|
468 | if (has_anim ()) |
|
|
469 | { |
|
|
470 | const animation &anim_ob = anim (); |
|
|
471 | |
|
|
472 | if (anim_speed) |
|
|
473 | // if this item is time-animated, force the last frame |
|
|
474 | animate_object (this, 0); |
|
|
475 | else if (flag [FLAG_MONSTER]) |
|
|
476 | // if it is a monster, set appropriate facing |
|
|
477 | animate_object (this, direction); |
|
|
478 | } |
466 | } |
479 | } |
467 | |
480 | |
468 | static void |
481 | static void |
469 | set_move (MoveType &mt, const char *str) |
482 | set_move (MoveType &mt, const char *str) |
470 | { |
483 | { |