This commit is contained in:
aozhiwei 2021-06-29 06:40:33 +00:00
parent 37481d59a1
commit ee6aa207e0
3 changed files with 6 additions and 3 deletions

View File

@ -59,6 +59,9 @@ void Bullet::OnHit(std::set<Entity*>& objects)
void Bullet::ProcBomb() void Bullet::ProcBomb()
{ {
self_collider_->rad = gun_meta->i->explosion_range(); self_collider_->rad = gun_meta->i->explosion_range();
if (IsCurrWeapon()) {
self_collider_->rad *= (1 + sender.Get()->GetAttrRate(kHAT_WeaponExplosionRange));
}
std::set<Entity*> objects; std::set<Entity*> objects;
Car* c4_target = nullptr; Car* c4_target = nullptr;
TraverseCreatures TraverseCreatures
@ -480,5 +483,5 @@ void Bullet::ProcOilBucketBomb(int delay_time)
bool Bullet::IsCurrWeapon() bool Bullet::IsCurrWeapon()
{ {
return false; return sender.Get()->GetCurrWeapon()->meta == gun_meta;
} }

View File

@ -1462,7 +1462,7 @@ void Creature::AutoLoadingBullet(bool manual)
on_loading_bullet(); on_loading_bullet();
} }
StartAction(AT_Reload, StartAction(AT_Reload,
p_weapon->GetAttrValue(kHAT_ReloadTime), p_weapon->GetAttrValue(kHAT_ReloadTime) * (1 + GetAttrRate(kHAT_WeaponReloadTime)),
p_weapon->weapon_id, p_weapon->weapon_id,
p_weapon->weapon_idx); p_weapon->weapon_idx);
} }

View File

@ -107,7 +107,7 @@ float Human::GetSpeed()
if (GetCurrWeapon()->weapon_idx == GUN_SLOT1 || if (GetCurrWeapon()->weapon_idx == GUN_SLOT1 ||
GetCurrWeapon()->weapon_idx == GUN_SLOT2) { GetCurrWeapon()->weapon_idx == GUN_SLOT2) {
if (action_type != AT_Reload) { if (action_type != AT_Reload) {
return meta->i->shot_speed(); return meta->i->shot_speed() * (1 + GetAttrRate(kHAT_ShotSpeed));
} }
} }
} else if (aiming) { } else if (aiming) {