1
This commit is contained in:
parent
ca6a1191ee
commit
f013c8ac94
@ -1488,8 +1488,9 @@ void CallFuncBuff::Shot()
|
||||
attack_dir = owner->GetAttackDir();
|
||||
} else {
|
||||
GlmHelper::Normalize(attack_dir);
|
||||
fly_distance = GlmHelper::Norm2D(target_pos - owner->GetPos().ToGlmVec3());
|
||||
}
|
||||
fly_distance = std::max(1.0f, fly_distance);
|
||||
fly_distance = std::max(500.0f, fly_distance);
|
||||
InternalShot(owner,
|
||||
owner->GetCurrWeapon()->meta,
|
||||
bullet_meta,
|
||||
|
@ -454,7 +454,7 @@ void InternalShot(Creature* c,
|
||||
}
|
||||
if (c->IsPlayer() || c->IsCar()) {
|
||||
#ifdef MYDEBUG
|
||||
a8::XPrintf("idx:%d offset:%f,%f,%f angle:%f old_angle:%f angle_xyz:%f,%f,%f %f %f gun_muzzle_position:%f,%f,%f pos:%f,%f,%f gun_id:%d t:%d\n",
|
||||
a8::XPrintf("idx:%d offset:%f,%f,%f angle:%f old_angle:%f angle_xyz:%f,%f,%f %f %f gun_muzzle_position:%f,%f,%f pos:%f,%f,%f gun_id:%d t:%d fly_distance:%f\n",
|
||||
{
|
||||
bulletIdx,
|
||||
bullet_born_offset.x,
|
||||
@ -474,7 +474,8 @@ void InternalShot(Creature* c,
|
||||
bullet_born_pos.y,
|
||||
bullet_born_pos.z,
|
||||
weapon_meta->id(),
|
||||
shot_animi_time
|
||||
shot_animi_time,
|
||||
fly_distance
|
||||
});
|
||||
#endif
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user