This commit is contained in:
aozhiwei 2020-07-14 20:50:08 +08:00
parent 47252ba513
commit 4f0a22525c

View File

@ -561,6 +561,8 @@ void AndroidNewAI::ChangeToStateNewAI(AndroidStateEx_e to_state)
case ASE_Idle:
{
node_.param1 = 0;
node_.start_shot_frameno = 0;
node_.shot_times = 0;
moving_ = false;
if (hum->room->GetGasData().gas_mode == GasInactive ||
hum->room->IsWaitingStart()) {
@ -573,12 +575,16 @@ void AndroidNewAI::ChangeToStateNewAI(AndroidStateEx_e to_state)
case ASE_Thinking:
{
node_.param1 = 0;
node_.start_shot_frameno = 0;
node_.shot_times = 0;
moving_ = false;
}
break;
case ASE_Attack:
{
node_.param1 = 0;
node_.start_shot_frameno = 0;
node_.shot_times = 0;
moving_ = false;
node_.shot_times = 0;
}
@ -587,6 +593,8 @@ void AndroidNewAI::ChangeToStateNewAI(AndroidStateEx_e to_state)
{
moving_ = true;
node_.param1 = SERVER_FRAME_RATE * 2 + rand() % (SERVER_FRAME_RATE * 3);
node_.start_shot_frameno = 0;
node_.shot_times = 0;
hum->move_dir = a8::Vec2(1.0f, 0);
hum->move_dir.Rotate(a8::RandAngle());
hum->move_dir.Normalize();