StopFollowers(*controlled);
if (!moveTimer.Running()) {
int tileSize((controlled->GetOrientation() % 2) ? map->Tileset()->Width() : map->Tileset()->Height());
StopFollowers(*controlled);
if (!moveTimer.Running()) {
int tileSize((controlled->GetOrientation() % 2) ? map->Tileset()->Width() : map->Tileset()->Height());
Vector<int> nextTileCoords(map->TileCoordinates(nextTilePosition));
for (std::vector<Entity *>::const_iterator i(entities.begin()), end(entities.end()); i != end; ++i) {
const Entity &e(**i);
Vector<int> nextTileCoords(map->TileCoordinates(nextTilePosition));
for (std::vector<Entity *>::const_iterator i(entities.begin()), end(entities.end()); i != end; ++i) {
const Entity &e(**i);
if (!e.Blocking()) continue;
if (!pushing || !e.Pushable()) return true;
if (CheckBlocking(nextTilePosition, Entity::Orientation(nextDirection))) return true;
if (!e.Blocking()) continue;
if (!pushing || !e.Pushable()) return true;
if (CheckBlocking(nextTilePosition, Entity::Orientation(nextDirection))) return true;
Vector<int> nextTileCoords(map->TileCoordinates(directionVector + position));
for (std::vector<Entity *>::const_iterator i(entities.begin()), end(entities.end()); i != end; ++i) {
const Entity &e(**i);
Vector<int> nextTileCoords(map->TileCoordinates(directionVector + position));
for (std::vector<Entity *>::const_iterator i(entities.begin()), end(entities.end()); i != end; ++i) {
const Entity &e(**i);
Vector<int> neighbor[4];
neighbor[0] = Vector<int>(coords.X(), coords.Y() - 1); // N
neighbor[1] = Vector<int>(coords.X() + 1, coords.Y()); // E
Vector<int> neighbor[4];
neighbor[0] = Vector<int>(coords.X(), coords.Y() - 1); // N
neighbor[1] = Vector<int>(coords.X() + 1, coords.Y()); // E
for (int i(0); i < 4; ++i) {
for (std::vector<Entity *>::iterator e(entities.begin()), end(entities.end()); e != end; ++e) {
for (int i(0); i < 4; ++i) {
for (std::vector<Entity *>::iterator e(entities.begin()), end(entities.end()); e != end; ++e) {
// TODO: check for turn advantage, see #26
// TODO: other transition
// TODO: check for turn advantage, see #26
// TODO: other transition
- BattleState *battleState(new BattleState(game, map->BattleBackgroundAt((*e)->Position()), (*e)->PartyLayout()));
+ BattleState *battleState(new BattleState(game, map->BattleBackgroundAt(ToInt((*e)->Position())), (*e)->PartyLayout()));
for (int i(0); i < 4; ++i) {
if (game->state->party[i]) {
battleState->AddHero(*game->state->party[i]);
for (int i(0); i < 4; ++i) {
if (game->state->party[i]) {
battleState->AddHero(*game->state->party[i]);
- Vector<int> coords(map->TileCoordinates(e.Position()));
- Vector<int> fCoords(map->TileCoordinates(f.Position()));
+ Vector<int> coords(map->TileCoordinates(ToInt(e.Position())));
+ Vector<int> fCoords(map->TileCoordinates(ToInt(f.Position())));