1
This commit is contained in:
parent
15816af295
commit
a941fa538c
@ -561,6 +561,10 @@ void AndroidNewAI::DoMoveNewAI()
|
|||||||
if (hum->UpdatedTimes() % 2 == 0) {
|
if (hum->UpdatedTimes() % 2 == 0) {
|
||||||
if (std::abs(hum->move_dir.x) > FLT_EPSILON ||
|
if (std::abs(hum->move_dir.x) > FLT_EPSILON ||
|
||||||
std::abs(hum->move_dir.y) > FLT_EPSILON) {
|
std::abs(hum->move_dir.y) > FLT_EPSILON) {
|
||||||
|
#if 1
|
||||||
|
int speed = std::max(1, (int)hum->GetSpeed());
|
||||||
|
hum->_UpdateMove(speed);
|
||||||
|
#else
|
||||||
int speed = std::max(1, (int)hum->GetSpeed());
|
int speed = std::max(1, (int)hum->GetSpeed());
|
||||||
for (int i = 0; i < speed; ++i) {
|
for (int i = 0; i < speed; ++i) {
|
||||||
a8::Vec2 old_pos = hum->GetPos();
|
a8::Vec2 old_pos = hum->GetPos();
|
||||||
@ -574,6 +578,7 @@ void AndroidNewAI::DoMoveNewAI()
|
|||||||
}
|
}
|
||||||
hum->room->grid_service->MoveHuman(hum);
|
hum->room->grid_service->MoveHuman(hum);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -275,9 +275,9 @@ class Human : public MoveableEntity
|
|||||||
Entity* GetLastCollisionDoor() { return last_collision_door_; }
|
Entity* GetLastCollisionDoor() { return last_collision_door_; }
|
||||||
void SetLastCollisionDoor(Entity* door) { last_collision_door_ = door; }
|
void SetLastCollisionDoor(Entity* door) { last_collision_door_ = door; }
|
||||||
ObjectSyncFlags* GetObjectSyncFlags(int obj_uniid);
|
ObjectSyncFlags* GetObjectSyncFlags(int obj_uniid);
|
||||||
|
void _UpdateMove(int speed);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void _UpdateMove(int speed);
|
|
||||||
void _InternalUpdateMove(float speed);
|
void _InternalUpdateMove(float speed);
|
||||||
void ProcLootOldSkin(Loot* entity, MetaData::Equip* item_meta);
|
void ProcLootOldSkin(Loot* entity, MetaData::Equip* item_meta);
|
||||||
void ProcLootSkin(Loot* entity, MetaData::Equip* item_meta);
|
void ProcLootSkin(Loot* entity, MetaData::Equip* item_meta);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user