This commit is contained in:
aozhiwei 2019-05-07 16:51:30 +08:00
parent 2236a9b640
commit faf591dcc6
3 changed files with 5 additions and 6 deletions

View File

@ -140,6 +140,6 @@ const int SMOKE_SLOT = 4;
const int MAP_HEIGHT = 8192;
const int MAP_WIDTH = 8192;
const int MAP_CELL_WIDTH = 64 * 5;
const int MAP_CELL_WIDTH = 64 * 8;
const int DOOR_THING_ID = 61701;

View File

@ -111,7 +111,6 @@ void Player::UpdateMove()
moved_frames = 0;
return;
}
bool move_ok = false;
int speed = std::max(1, (int)GetSpeed());
for (int i = 0; i < speed; ++i) {
Vector2D old_pos = pos;
@ -120,7 +119,9 @@ void Player::UpdateMove()
pos = old_pos;
#if 1
FindPath();
i += 1;
if (rand() % 3 == 0) {
i += 1;
}
#else
if (i == 0) {
FindPath();
@ -129,8 +130,6 @@ void Player::UpdateMove()
#endif
}
move_ok = true;
}
if (move_ok) {
room->grid_service.MoveHuman(this);
}
if (last_collision_door && !TestCollision(last_collision_door)) {

View File

@ -23,7 +23,7 @@
#include "hero.h"
const int ROOM_MAX_PLAYER_NUM = 50;
#if 0
#if 1
const int ANDROID_NUM = 0;
#else
const int ANDROID_NUM = 10;