From 4eb46ec465e468b206cb4fd93b281ad67169fe83 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 5 Dec 2022 18:23:26 +0800 Subject: [PATCH] 1 --- server/gameserver/android_agent.cc | 10 +++++----- server/gameserver/android_agent.h | 1 + server/gameserver/app.cc | 1 - 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/server/gameserver/android_agent.cc b/server/gameserver/android_agent.cc index 1ddd1c77..4e41f07d 100644 --- a/server/gameserver/android_agent.cc +++ b/server/gameserver/android_agent.cc @@ -16,7 +16,7 @@ AndroidAgent::~AndroidAgent() State_e AndroidAgent::GetState() { - return behaviac::BT_SUCCESS; + return kPreBattle; } behaviac::EBTStatus AndroidAgent::DoIdle(int min_time, int max_time) @@ -26,7 +26,7 @@ behaviac::EBTStatus AndroidAgent::DoIdle(int min_time, int max_time) } xtimer_list* timer = GetOwner()->room->xtimer.AddDeadLineTimerAndAttach ( - time / FRAME_RATE_MS, + min_time / FRAME_RATE_MS, a8::XParams(), [] (const a8::XParams& param) { @@ -45,17 +45,17 @@ behaviac::EBTStatus AndroidAgent::DoIdle(int min_time, int max_time) return behaviac::BT_RUNNING; } -behaviac::EBTStatus DoRandomWalk() +behaviac::EBTStatus AndroidAgent::DoRandomWalk() { return behaviac::BT_SUCCESS; } -behaviac::EBTStatus DoRandomShot() +behaviac::EBTStatus AndroidAgent::DoRandomShot() { return behaviac::BT_SUCCESS; } -behaviac::EBTStatus DoAttack() +behaviac::EBTStatus AndroidAgent::DoAttack() { return behaviac::BT_SUCCESS; } diff --git a/server/gameserver/android_agent.h b/server/gameserver/android_agent.h index 096e2a47..98287150 100644 --- a/server/gameserver/android_agent.h +++ b/server/gameserver/android_agent.h @@ -1,6 +1,7 @@ #pragma once #include "behaviac_headers.h" +#include "behaviac_customized_types.h" class Android; class AndroidAgent : public behaviac::Agent diff --git a/server/gameserver/app.cc b/server/gameserver/app.cc index 17633966..6409e4de 100644 --- a/server/gameserver/app.cc +++ b/server/gameserver/app.cc @@ -34,7 +34,6 @@ #include "framework/cpp/tglog.h" #include "framework/cpp/httpclientpool.h" #include "framework/cpp/btmgr.h" -#include "FirstAgent.h" #include "collider.h"