This commit is contained in:
aozhiwei 2023-04-02 15:15:27 +08:00
parent 162216cc27
commit 1502ed1278

View File

@ -1076,6 +1076,16 @@ void Bullet::Raycast()
void Bullet::ProcRequestBulletDmg(int shield_hit, int strength_wall_uniid, int target_uniid, const glm::vec3& pos) void Bullet::ProcRequestBulletDmg(int shield_hit, int strength_wall_uniid, int target_uniid, const glm::vec3& pos)
{ {
#if 1 #if 1
if (trace_target_id) {
if (trace_target_id == target_uniid) {
Entity* entity = room->GetEntityByUniId(trace_target_id);
if (entity && entity->IsCreature(room)) {
Creature* c = (Creature*)entity;
}
}
} else {
}
#else #else
Entity* entity = room->GetEntityByUniId(target_uniid); Entity* entity = room->GetEntityByUniId(target_uniid);
if (entity && entity->IsCreature(room) && entity != this && !entity->IsDead(room)) { if (entity && entity->IsCreature(room) && entity != this && !entity->IsDead(room)) {