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 |
… | |
… | |
210 | static int |
210 | static int |
211 | check_infection (object *disease) |
211 | check_infection (object *disease) |
212 | { |
212 | { |
213 | int range = abs (disease->magic); |
213 | int range = abs (disease->magic); |
214 | |
214 | |
215 | object *op = disease->outer_env (); |
215 | object *op = disease->outer_env_or_self (); |
216 | |
216 | |
217 | if (!op->is_on_map ()) |
217 | if (!op->is_on_map ()) |
218 | return 0; |
218 | return 0; |
219 | |
219 | |
220 | unordered_mapwalk (op, -range, -range, range, range) |
220 | unordered_mapwalk (op, -range, -range, range, range) |