mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Add basic distance check to shockwave hit test
Before checking if the entity hitbox intersects the shockwave shell, we do a basic check that the entity is close enough to be hit, considering its radius. This fixes the unlimited vertical range problem, since the distance is measured in 3D.
This commit is contained in:
parent
e3e38ca9e1
commit
65fdbc1d69
@ -95,6 +95,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- Minimap icons are now displayed in both map modes
|
||||
- Server now denies any running trades when a user exits to the character selection screen.
|
||||
- Sfx volume changes now also change the ambient sounds volume
|
||||
- Staff fire shockwave ability no longer has an unlimited vertical range
|
||||
|
||||
## [0.9.0] - 2021-03-20
|
||||
|
||||
|
@ -164,6 +164,7 @@ impl<'a> System<'a> for Sys {
|
||||
// Check if it is a hit
|
||||
let hit = entity != target
|
||||
&& !health_b.is_dead
|
||||
&& (pos_b.0 - pos.0).magnitude() < frame_end_dist + rad_b
|
||||
// Collision shapes
|
||||
&& {
|
||||
// TODO: write code to collide rect with the arc strip so that we can do
|
||||
|
Loading…
Reference in New Issue
Block a user