This commit is contained in:
aozhiwei 2023-04-02 15:19:09 +08:00
parent 1502ed1278
commit 93ae48e62f

View File

@ -1080,7 +1080,13 @@ void Bullet::ProcRequestBulletDmg(int shield_hit, int strength_wall_uniid, int t
if (trace_target_id == target_uniid) {
Entity* entity = room->GetEntityByUniId(trace_target_id);
if (entity && entity->IsCreature(room)) {
Creature* c = (Creature*)entity;
if (sender.Get() && sender.Get()->IsHuman()) {
sender.Get()->AsHuman()->stats->IncWeaponUseTimes(gun_meta->id(), 1);
}
std::set<Entity*> objects;
objects.insert(entity);
OnHit(objects);
AddGunBuff();
}
}
} else {