1
This commit is contained in:
parent
593e6baa29
commit
2c243936dd
@ -3788,3 +3788,10 @@ void Creature::CheckShotHold()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Creature::Throw(int throw_uniid, int slot,
|
||||
const glm::vec3& pos, const glm::vec3& dir,
|
||||
float fly_distance, int estimated_time)
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -370,7 +370,8 @@ class Creature : public MoveableEntity
|
||||
virtual void NetInitOk();
|
||||
bool IsNearGas(float distance);
|
||||
float GetSafeAreaRaidus();
|
||||
std::shared_ptr<std::set<int>> CalcReporterList(bool is_trace_bullet,
|
||||
std::shared_ptr<std::set<int>> CalcReporterList
|
||||
(bool is_trace_bullet,
|
||||
const mt::Equip* weapon_meta,
|
||||
const mt::Equip* bullet_meta);
|
||||
bool CanShot(bool try_reload);
|
||||
@ -394,6 +395,9 @@ class Creature : public MoveableEntity
|
||||
float GetSkillLocalVar(int skill_id, int idx);
|
||||
void SetSkillLocalVar(int skill_id, int idx, float val);
|
||||
void CheckShotHold();
|
||||
void Throw(int throw_uniid, int slot,
|
||||
const glm::vec3& pos, const glm::vec3& dir,
|
||||
float fly_distance, int estimated_time);
|
||||
|
||||
protected:
|
||||
virtual void OnBuffRemove(Buff& buff);
|
||||
|
@ -1489,6 +1489,17 @@ behaviac::EBTStatus HeroAgent::ThrowItem(int slot)
|
||||
if (!CanThrowItem(slot)) {
|
||||
return behaviac::BT_FAILURE;
|
||||
}
|
||||
if (!current_target_agent->IsValid()) {
|
||||
return behaviac::BT_FAILURE;
|
||||
}
|
||||
if (slot > 0 && slot < owner_->weapons.size()) {
|
||||
Weapon& weapon = owner_->weapons[slot];
|
||||
if (weapon.weapon_idx != 0 &&
|
||||
weapon.meta &&
|
||||
weapon.ammo > 0) {
|
||||
//return true;
|
||||
}
|
||||
}
|
||||
return behaviac::BT_FAILURE;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user