This commit is contained in:
aozhiwei 2023-11-17 13:21:29 +08:00
parent 31a3880bad
commit 14711ad22e

View File

@ -1497,7 +1497,15 @@ behaviac::EBTStatus HeroAgent::ThrowItem(int slot)
if (weapon.weapon_idx != 0 &&
weapon.meta &&
weapon.ammo > 0) {
//return true;
glm::vec3 bomb_pos;
glm::vec3 bomb_dir;
float fly_distance = owner_->GetPos().Distance2D2(current_target_agent->GetPos());
owner_->Throw(slot,
bomb_pos,
bomb_dir,
fly_distance,
0);
return behaviac::BT_SUCCESS;
}
}
return behaviac::BT_FAILURE;