1
This commit is contained in:
parent
d440ff727d
commit
d3d140f68c
@ -1153,18 +1153,19 @@ void Bullet::ReportHookHitPos(int hit_obj_uniid, const glm::vec3& hit_pos)
|
||||
return;
|
||||
}
|
||||
if (sender.Get()) {
|
||||
float distance = GetPos().Distance2D2(hit_pos) + 3;
|
||||
//float distance = GetPos().Distance2D2(hit_pos) + 3;
|
||||
GetMutablePos().FromGlmVec3(hit_pos);
|
||||
room->grid_service->MoveBullet(this);
|
||||
BulletCheckResult result;
|
||||
Creature* hit_obj = room->GetCreatureByUniId(hit_obj_uniid);
|
||||
//GetHitCreatures(result);
|
||||
result.flyed_distance = std::min(distance, gun_meta->range() + 1.0f);
|
||||
if (hit_obj) {
|
||||
++result.c_hit_num;
|
||||
result.objects.insert(hit_obj);
|
||||
GetMutablePos().FromGlmVec3(hit_obj->GetPos().ToGlmVec3());
|
||||
result.flyed_distance = hit_obj->GetPos().Distance2D2(sender.Get()->GetPos());
|
||||
} else {
|
||||
distance = gun_meta->range() + 1;
|
||||
result.flyed_distance = raycast_len_;
|
||||
}
|
||||
ProcNormalBullet(result);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user