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

Comparing deliantra/server/server/time.C (file contents):
Revision 1.27 by root, Tue Dec 26 09:52:40 2006 UTC vs.
Revision 1.28 by root, Sat Dec 30 10:16:11 2006 UTC

26 * collected in this file. 26 * collected in this file.
27 */ 27 */
28 28
29#include <global.h> 29#include <global.h>
30#include <spells.h> 30#include <spells.h>
31#ifndef __CEXTRACT__
32# include <sproto.h> 31#include <sproto.h>
33#endif
34 32
35/* The following removes doors. The functions check to see if similar 33/* The following removes doors. The functions check to see if similar
36 * doors are next to the one that is being removed, and if so, set it 34 * doors are next to the one that is being removed, and if so, set it
37 * so those will be removed shortly (in a cascade like fashion.) 35 * so those will be removed shortly (in a cascade like fashion.)
38 */ 36 */
986 if (tmp->type == PLAYER) 984 if (tmp->type == PLAYER)
987 { 985 {
988 if (INVOKE_OBJECT (TRIGGER, op, ARG_OBJECT (tmp))) 986 if (INVOKE_OBJECT (TRIGGER, op, ARG_OBJECT (tmp)))
989 return; 987 return;
990 988
991 enter_exit (tmp, head); 989 tmp->enter_exit (head);
992 } 990 }
993 else 991 else
994 /* Currently only players can transfer maps */ 992 /* Currently only players can transfer maps */
995 return; 993 return;
996 } 994 }
1060 player->contr->bed_y = EXIT_Y (op); 1058 player->contr->bed_y = EXIT_Y (op);
1061 } 1059 }
1062 else 1060 else
1063 LOG (llevDebug, "WARNING: destination '%s' in player_changer must be an absolute path!\n", &EXIT_PATH (op)); 1061 LOG (llevDebug, "WARNING: destination '%s' in player_changer must be an absolute path!\n", &EXIT_PATH (op));
1064 1062
1065 enter_exit (op->above, op); 1063 op->above->enter_exit (op);
1066 player->contr->save (); 1064 player->contr->save ();
1067 } 1065 }
1068} 1066}
1069 1067
1070/* firewalls fire other spells. 1068/* firewalls fire other spells.
1084 if (!spell || spell->type != SPELL) 1082 if (!spell || spell->type != SPELL)
1085 spell = &op->other_arch->clone; 1083 spell = &op->other_arch->clone;
1086 1084
1087 if (!spell) 1085 if (!spell)
1088 { 1086 {
1089 LOG (llevError, "move_firewall: no spell specified (%s, %s, %d, %d)\n", &op->name, op->map->name, op->x, op->y); 1087 LOG (llevError, "move_firewall: no spell specified (%s, %s, %d, %d)\n", &op->name, &op->map->name, op->x, op->y);
1090 return; 1088 return;
1091 } 1089 }
1092 1090
1093 cast_spell (op, op, op->stats.sp ? op->stats.sp : rndm (1, 8), spell, NULL); 1091 cast_spell (op, op, op->stats.sp ? op->stats.sp : rndm (1, 8), spell, NULL);
1094} 1092}
1132 nx = op->x + freearr_x[dir]; 1130 nx = op->x + freearr_x[dir];
1133 ny = op->y + freearr_y[dir]; 1131 ny = op->y + freearr_y[dir];
1134 m = op->map; 1132 m = op->map;
1135 if (get_map_flags (m, &m, nx, ny, &nx, &ny) & P_OUT_OF_MAP) 1133 if (get_map_flags (m, &m, nx, ny, &nx, &ny) & P_OUT_OF_MAP)
1136 { 1134 {
1137 LOG (llevError, "move_player_mover: Trying to push player off the map! map=%s (%d, %d)\n", m->path, op->x, op->y); 1135 LOG (llevError, "move_player_mover: Trying to push player off the map! map=%s (%d, %d)\n", &m->path, op->x, op->y);
1138 return; 1136 return;
1139 } 1137 }
1140 1138
1141 if (should_director_abort (op, victim)) 1139 if (should_director_abort (op, victim))
1142 return; 1140 return;
1203{ 1201{
1204 object *tmp; 1202 object *tmp;
1205 1203
1206 if (!op->other_arch) 1204 if (!op->other_arch)
1207 { 1205 {
1208 LOG (llevInfo, "Duplicator with no other_arch! %d %d %s\n", op->x, op->y, op->map ? op->map->path : "nullmap"); 1206 LOG (llevInfo, "Duplicator with no other_arch! %d %d %s\n", op->x, op->y, op->map ? &op->map->path : "nullmap");
1209 return; 1207 return;
1210 } 1208 }
1211 1209
1212 if (op->above == NULL) 1210 if (op->above == NULL)
1213 return; 1211 return;
1278 } 1276 }
1279 else 1277 else
1280 { 1278 {
1281 if (creator->other_arch == NULL) 1279 if (creator->other_arch == NULL)
1282 { 1280 {
1283 LOG (llevError, "move_creator: Creator doesn't have other arch set: %s (%s, %d, %d)\n", &creator->name, creator->map->path, 1281 LOG (llevError, "move_creator: Creator doesn't have other arch set: %s (%s, %d, %d)\n",
1284 creator->x, creator->y); 1282 &creator->name, &creator->map->path, creator->x, creator->y);
1285 return; 1283 return;
1286 } 1284 }
1287 1285
1288 new_ob = object_create_arch (creator->other_arch); 1286 new_ob = object_create_arch (creator->other_arch);
1289 fix_generated_item (new_ob, creator, 0, 0, GT_MINIMAL); 1287 fix_generated_item (new_ob, creator, 0, 0, GT_MINIMAL);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines