From: Daniel Karbach Date: Sat, 6 Oct 2012 00:06:41 +0000 (+0200) Subject: reversed order of monster checks X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=f8fd75df4d5f74ff6701a40dbf08aed42f85b179;p=l2e.git reversed order of monster checks and added some TODOs --- diff --git a/src/map/MapState.cpp b/src/map/MapState.cpp index 62e4802..108d97c 100644 --- a/src/map/MapState.cpp +++ b/src/map/MapState.cpp @@ -196,15 +196,20 @@ void MapState::LockEntities() { void MapState::CheckMonster() { Vector coords(map->TileCoordinates(controlled->Position())); Vector neighbor[4]; - neighbor[0] = Vector(coords.X() - 1, coords.Y()); // W - neighbor[1] = Vector(coords.X(), coords.Y() + 1); // S - neighbor[2] = Vector(coords.X() + 1, coords.Y()); // E - neighbor[3] = Vector(coords.X(), coords.Y() - 1); // N + neighbor[0] = Vector(coords.X(), coords.Y() - 1); // N + neighbor[1] = Vector(coords.X() + 1, coords.Y()); // E + neighbor[2] = Vector(coords.X(), coords.Y() + 1); // S + neighbor[3] = Vector(coords.X() - 1, coords.Y()); // W for (int i(0); i < 4; ++i) { for (std::vector::iterator e(entities.begin()), end(entities.end()); e != end; ++e) { if ((*e)->Hostile() && map->TileCoordinates((*e)->Position()) == neighbor[i]) { - // remove entity, push battle state and transition and halt all other activity + // TODO: check for turn advantage, see #26 + // TODO: remove entity, push battle state and transition and halt all other activity + // needed information here: + // - battle background (from tile?) + // - monsters + layout (from entity) + // - battle resources (from global resources) } } }