mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Prevent projectiles from hitting their owners
This commit is contained in:
parent
32db0df208
commit
84b1abdfcb
@ -57,6 +57,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- Overhauled icon art
|
- Overhauled icon art
|
||||||
- Asset cleanup to lower client-size
|
- Asset cleanup to lower client-size
|
||||||
- Rewrote the humanoid skeleton to be more ideal for attack animations
|
- Rewrote the humanoid skeleton to be more ideal for attack animations
|
||||||
|
- Arrows can no longer hurt their owners
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
|
@ -100,7 +100,9 @@ impl<'a> System<'a> for Sys {
|
|||||||
for effect in projectile.hit_entity.drain(..) {
|
for effect in projectile.hit_entity.drain(..) {
|
||||||
match effect {
|
match effect {
|
||||||
projectile::Effect::Damage(change) => {
|
projectile::Effect::Damage(change) => {
|
||||||
server_emitter.emit(ServerEvent::Damage { uid: other, change })
|
if other != projectile.owner.unwrap() {
|
||||||
|
server_emitter.emit(ServerEvent::Damage { uid: other, change });
|
||||||
|
}
|
||||||
},
|
},
|
||||||
projectile::Effect::Knockback(knockback) => {
|
projectile::Effect::Knockback(knockback) => {
|
||||||
if let Some(entity) =
|
if let Some(entity) =
|
||||||
@ -134,8 +136,10 @@ impl<'a> System<'a> for Sys {
|
|||||||
cause: HealthSource::World,
|
cause: HealthSource::World,
|
||||||
}),
|
}),
|
||||||
projectile::Effect::Possess => {
|
projectile::Effect::Possess => {
|
||||||
if let Some(owner) = projectile.owner {
|
if other != projectile.owner.unwrap() {
|
||||||
server_emitter.emit(ServerEvent::Possess(owner.into(), other));
|
if let Some(owner) = projectile.owner {
|
||||||
|
server_emitter.emit(ServerEvent::Possess(owner.into(), other));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
_ => {},
|
_ => {},
|
||||||
|
Loading…
Reference in New Issue
Block a user