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