1
This commit is contained in:
parent
a502061f8d
commit
44487e48ec
@ -398,24 +398,26 @@ void Bullet::MapServiceUpdate()
|
||||
auto old_pos = GetPos();
|
||||
GetMutablePos().AddGlmVec3(dir * step_len);
|
||||
float distance = GetPos().DistanceGlmVec3(born_pos.ToGlmVec3());
|
||||
#ifdef DEBUG1
|
||||
#ifdef DEBUG
|
||||
if (IsFlyHook()) {
|
||||
a8::XPrintf("step_len:%f born_pos:%f,%f,%f curr_pos:%f,%f,%f old_pos:%f,%f,%f distance:%f\n",
|
||||
{
|
||||
step_len,
|
||||
born_pos.x,
|
||||
born_pos.y,
|
||||
born_pos.z,
|
||||
born_pos.GetX(),
|
||||
born_pos.GetY(),
|
||||
born_pos.GetZ(),
|
||||
|
||||
old_pos.x,
|
||||
old_pos.y,
|
||||
old_pos.z,
|
||||
old_pos.GetX(),
|
||||
old_pos.GetY(),
|
||||
old_pos.GetZ(),
|
||||
|
||||
GetPos().x,
|
||||
GetPos().y,
|
||||
GetPos().z,
|
||||
GetPos().GetX(),
|
||||
GetPos().GetY(),
|
||||
GetPos().GetZ(),
|
||||
|
||||
distance
|
||||
distance
|
||||
});
|
||||
}
|
||||
#endif
|
||||
if (room->OverBorder(GetPos().ToGlmVec3(), gun_meta->bullet_rad())) {
|
||||
if (IsBomb()) {
|
||||
@ -930,6 +932,11 @@ void Bullet::ProcNormalBullet(BulletCheckResult& result)
|
||||
}
|
||||
if (need_remove) {
|
||||
if (IsFlyHook()) {
|
||||
#ifdef DEBUG
|
||||
a8::XPrintf("ProcHookHit\n",
|
||||
{
|
||||
});
|
||||
#endif
|
||||
if (!hited) {
|
||||
if (raycast_hited) {
|
||||
if (result.flyed_distance > 0.001f) {
|
||||
@ -1015,13 +1022,14 @@ void Bullet::Raycast()
|
||||
raycast_len_ = gun_meta->range();
|
||||
}
|
||||
#ifdef DEBUG
|
||||
a8::XPrintf("bullet.raycast ret:%d hit_result:%d raycast_hit_point_:%f,%f,%f\n",
|
||||
a8::XPrintf("bullet.raycast ret:%d hit_result:%d raycast_hit_point_:%f,%f,%f speed:%f\n",
|
||||
{
|
||||
ret,
|
||||
hit_result,
|
||||
raycast_hit_point_.x,
|
||||
raycast_hit_point_.y,
|
||||
raycast_hit_point_.z,
|
||||
gun_meta->bullet_speed()
|
||||
});
|
||||
#endif
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user