移除无用代码

This commit is contained in:
aozhiwei 2020-06-05 09:54:41 +08:00
parent 2112624943
commit aec866a010

View File

@ -186,17 +186,7 @@ void AndroidAI::UpdateNewBieNpc()
} else if (hum->room->GetFrameNo() - hum->enable_frameno < SERVER_FRAME_RATE * 1.5) {
int speed = std::max(1, (int)hum->GetSpeed());
for (int i = 0; i < speed; ++i) {
a8::Vec2 old_pos = hum->GetPos();
hum->SetPos(hum->GetPos() + hum->move_dir);
#if 0
if (hum->IsCollisionInMapService()) {
hum->SetPos(old_pos);
if (i == 0) {
hum->FindPathInMapService();
}
break;
}
#endif
hum->room->grid_service->MoveHuman(hum);
}
} else if (hum->room->GetFrameNo() - hum->enable_frameno < SERVER_FRAME_RATE * 3) {
@ -230,17 +220,7 @@ void AndroidAI::UpdateLastNpc()
} else if (hum->room->GetFrameNo() - hum->enable_frameno < SERVER_FRAME_RATE * 1.5) {
int speed = std::max(1, (int)hum->GetSpeed());
for (int i = 0; i < speed; ++i) {
a8::Vec2 old_pos = hum->GetPos();
hum->SetPos(hum->GetPos() + hum->move_dir);
#if 0
if (hum->IsCollisionInMapService()) {
hum->SetPos(old_pos);
if (i == 0) {
hum->FindPathInMapService();
}
break;
}
#endif
hum->room->grid_service->MoveHuman(hum);
}
} else if (hum->room->GetFrameNo() - hum->enable_frameno < SERVER_FRAME_RATE * 3) {
@ -337,17 +317,7 @@ void AndroidAI::UpdateNewBieRoomLogic()
hum->attack_dir = hum->move_dir;
speed *= 0.7;
for (int i = 0; i < speed; ++i) {
a8::Vec2 old_pos = hum->GetPos();
hum->SetPos(hum->GetPos() + hum->move_dir);
#if 0
if (hum->IsCollisionInMapService()) {
hum->SetPos(old_pos);
if (i == 0) {
hum->FindPathInMapService();
}
break;
}
#endif
hum->room->grid_service->MoveHuman(hum);
}
} else {