1
This commit is contained in:
parent
bd26a0ea68
commit
a23000dcd0
@ -22,15 +22,42 @@ ai级别
|
||||
8: 跑动射击
|
||||
*/
|
||||
|
||||
static std::vector<int> AI_LEVEL =
|
||||
{
|
||||
1
|
||||
};
|
||||
|
||||
AndroidNewAI::~AndroidNewAI()
|
||||
{
|
||||
}
|
||||
|
||||
void AndroidNewAI::Update(int delta_time)
|
||||
{
|
||||
Human* hum = (Human*)owner;
|
||||
if (hum->poisoning) {
|
||||
hum->poisoning_time += delta_time;
|
||||
}
|
||||
if (hum->poisoning) {
|
||||
hum->UpdatePoisoning();
|
||||
}
|
||||
if (hum->dead) {
|
||||
return;
|
||||
}
|
||||
if (a8::HasBitFlag(hum->status, HS_NewBieGuideAndroid)) {
|
||||
#if 0
|
||||
UpdateNewBieNpc();
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
if (a8::HasBitFlag(hum->status, HS_LastAndroid)) {
|
||||
#if 0
|
||||
UpdateLastNpc();
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
if ((hum->room->GetRoomType() == RT_NewBrid ||
|
||||
hum->room->GetRoomType() == RT_MidBrid) &&
|
||||
hum->room->GetGasData().gas_mode != GasInactive &&
|
||||
hum->team_uuid.empty()
|
||||
) {
|
||||
#if 0
|
||||
UpdateNewBieRoomLogic();
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -10,4 +10,7 @@ class AndroidNewAI : public AIComponent
|
||||
virtual ~AndroidNewAI() override;
|
||||
virtual void Update(int delta_time) override;
|
||||
|
||||
private:
|
||||
int ai_level_ = 0;
|
||||
|
||||
};
|
||||
|
@ -725,3 +725,8 @@ MetaData::Robot* MetaMgr::RandRobot(std::set<int>& refreshed_robot_set)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<AiCommand>* MetaMgr::GetAiCommandSequence(int ai_level)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -45,6 +45,7 @@ class MetaMgr : public a8::Singleton<MetaMgr>
|
||||
int GetKillPointParam1(int kill_num);
|
||||
int GetKillPointParam2(int kill_num);
|
||||
MetaData::Robot* RandRobot(std::set<int>& refreshed_robot_set);
|
||||
std::vector<AiCommand>* GetAiCommandSequence(int ai_level);
|
||||
|
||||
int gas_inactive_time = 10;
|
||||
int newbie_gas_inactive_time = 10;
|
||||
|
@ -145,6 +145,15 @@ struct ObjectSyncFlags
|
||||
};
|
||||
#pragma pack()
|
||||
|
||||
struct AiCommand
|
||||
{
|
||||
int cmd = 0;
|
||||
std::string cmd_name = 0;
|
||||
long long param1 = 0;
|
||||
long long param2 = 0;
|
||||
long long param3 = 0;
|
||||
};
|
||||
|
||||
class GridService;
|
||||
class MapService;
|
||||
class Building;
|
||||
|
Loading…
x
Reference in New Issue
Block a user