1
This commit is contained in:
parent
cd38462b94
commit
8b3590c52b
@ -89,12 +89,6 @@ void AndroidAI::DoMove()
|
||||
for (int i = 0; i < speed; ++i) {
|
||||
a8::Vec2 old_pos = hum->pos;
|
||||
hum->pos = hum->pos + hum->move_dir;
|
||||
if (hum->IsCollisionInMapService()) {
|
||||
hum->pos = old_pos;
|
||||
if (i == 0) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
hum->room->grid_service.MoveHuman(hum);
|
||||
}
|
||||
}
|
||||
|
@ -162,30 +162,6 @@ void Human::RecalcSelfCollider()
|
||||
#endif
|
||||
}
|
||||
|
||||
bool Human::IsCollisionInMapService()
|
||||
{
|
||||
#if 0
|
||||
if (room->OverBorder(pos, meta->p->radius())){
|
||||
return true;
|
||||
}
|
||||
|
||||
std::set<ColliderComponent*> colliders;
|
||||
room->map_service.GetColliders(pos.x, pos.y, colliders);
|
||||
|
||||
Global::last_collider = nullptr;
|
||||
for (ColliderComponent* collider : colliders) {
|
||||
#if 0
|
||||
switch (collider->owner->entity_type) {
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
void Human::SyncAroundPlayers(const char* file, int line, const char* func)
|
||||
{
|
||||
for (auto& cell : grid_list) {
|
||||
@ -586,9 +562,6 @@ void Human::_UpdateMove(int speed)
|
||||
for (int i = 0; i < speed; ++i) {
|
||||
a8::Vec2 old_pos = pos;
|
||||
pos = pos + move_dir;
|
||||
if (IsCollisionInMapService()) {
|
||||
pos = old_pos;
|
||||
}
|
||||
room->grid_service.MoveHuman(this);
|
||||
}
|
||||
}
|
||||
|
@ -66,7 +66,6 @@ class Human : public Entity
|
||||
virtual void GetAabbBox(AabbCollider& aabb_box);
|
||||
void FillMFTeamData(cs::MFTeamData* team_data);
|
||||
void RecalcSelfCollider();
|
||||
bool IsCollisionInMapService();
|
||||
void SyncAroundPlayers(const char* file, int line, const char* func);
|
||||
void BeKill(int killer_id, const std::string& killer_name);
|
||||
void AddToNewObjects(Entity* entity);
|
||||
|
Loading…
x
Reference in New Issue
Block a user