… | |
… | |
21 | The authors can be reached via e-mail at <crossfire@schmorp.de> |
21 | The authors can be reached via e-mail at <crossfire@schmorp.de> |
22 | */ |
22 | */ |
23 | |
23 | |
24 | |
24 | |
25 | #include <global.h> |
25 | #include <global.h> |
26 | |
|
|
27 | #ifndef WIN32 /* ---win32 exclude header */ |
|
|
28 | # include <unistd.h> |
26 | #include <unistd.h> |
29 | #endif /* win32 */ |
|
|
30 | |
27 | |
31 | /* |
28 | /* |
32 | * Pass a char array, returns a pointer to the region of the same name. |
29 | * Pass a char array, returns a pointer to the region of the same name. |
33 | * if it can't find a region of the same name it returns the first region |
30 | * if it can't find a region of the same name it returns the first region |
34 | * with the 'fallback' property set. |
31 | * with the 'fallback' property set. |
… | |
… | |
237 | reg = get_region_by_map (op->map); |
234 | reg = get_region_by_map (op->map); |
238 | while (reg != NULL) |
235 | while (reg != NULL) |
239 | { |
236 | { |
240 | if (reg->jailmap) |
237 | if (reg->jailmap) |
241 | { |
238 | { |
242 | exit = get_object (); |
239 | exit = object::create (); |
243 | EXIT_PATH (exit) = reg->jailmap; |
240 | EXIT_PATH (exit) = reg->jailmap; |
244 | /* damned exits reset savebed and remove teleports, so the prisoner can't escape */ |
241 | /* damned exits reset savebed and remove teleports, so the prisoner can't escape */ |
245 | SET_FLAG (exit, FLAG_DAMNED); |
242 | SET_FLAG (exit, FLAG_DAMNED); |
246 | EXIT_X (exit) = reg->jailx; |
243 | EXIT_X (exit) = reg->jailx; |
247 | EXIT_Y (exit) = reg->jaily; |
244 | EXIT_Y (exit) = reg->jaily; |