1
This commit is contained in:
parent
c8d6113fdd
commit
30fec57651
@ -113,34 +113,6 @@ void VirtualBullet::Check(float distance)
|
|||||||
if (result.o_hit_num <= 0) {
|
if (result.o_hit_num <= 0) {
|
||||||
GetHitCreatures(result);
|
GetHitCreatures(result);
|
||||||
}
|
}
|
||||||
#if 0
|
|
||||||
float bullet_range = gun_meta->range();
|
|
||||||
if (!objects.empty() || (!IsBomb() && distance > bullet_range)) {
|
|
||||||
if (IsBomb()) {
|
|
||||||
ForceRemove();
|
|
||||||
} else {
|
|
||||||
bool hited = false;
|
|
||||||
if (!eat && !objects.empty()) {
|
|
||||||
hited = true;
|
|
||||||
OnHit(objects);
|
|
||||||
}
|
|
||||||
bool need_remove = true;
|
|
||||||
if (distance < bullet_range) {
|
|
||||||
if (!gun_meta->is_penetrate_thing() && !gun_meta->ispenetrate()) {
|
|
||||||
} else {
|
|
||||||
if ((!gun_meta->is_penetrate_thing() && (t_hit_num > 0)) ||
|
|
||||||
(!gun_meta->ispenetrate() && (c_hit_num > 0))) {
|
|
||||||
} else {
|
|
||||||
need_remove = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (need_remove) {
|
|
||||||
ForceRemove();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void VirtualBullet::ForceRemove()
|
void VirtualBullet::ForceRemove()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user