1
This commit is contained in:
parent
2d597fc5b8
commit
3048b8a193
@ -1557,9 +1557,6 @@ behaviac::EBTStatus HeroAgent::ThrowItem(int slot)
|
||||
bomb_dir,
|
||||
fly_distance,
|
||||
0);
|
||||
if (owner_->IsHuman()) {
|
||||
owner_->AsHuman()->stats->IncWeaponUseTimes(weapon.meta->id(), 1);
|
||||
}
|
||||
last_throw_item_frameno_ = owner_->room->GetFrameNo();
|
||||
return behaviac::BT_SUCCESS;
|
||||
}
|
||||
|
@ -2551,7 +2551,7 @@ void SyncObject::FillSMSyncPosition(cs::SMSyncPosition& sync_msg)
|
||||
}
|
||||
|
||||
int Creature::Throw(int slot, const glm::vec3& bomb_pos, const glm::vec3& bomb_dir,
|
||||
float fly_distance, int estimated_time)
|
||||
float fly_distance, int estimated_time)
|
||||
{
|
||||
if (!IsHuman()) {
|
||||
return 0;
|
||||
@ -2559,11 +2559,13 @@ int Creature::Throw(int slot, const glm::vec3& bomb_pos, const glm::vec3& bomb_d
|
||||
if (slot < 0 || slot >= weapons.size()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
Weapon& weapon = weapons.at(slot);
|
||||
if (weapon.weapon_idx != 0 &&
|
||||
weapon.meta &&
|
||||
weapon.ammo > 0) {
|
||||
if (IsHuman()) {
|
||||
AsHuman()->stats->IncWeaponUseTimes(weapon.meta->id(), 1);
|
||||
}
|
||||
if (HasBuffEffect(kBET_Hide)) {
|
||||
RemoveHideEffect(kShotReason);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user