mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'kalculate/attacking-the-dead' into 'master'
Fixing #504 - Enemies stop attacking after combat Closes #504 See merge request veloren/veloren!820
This commit is contained in:
commit
0d189cb546
@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- Added gamma setting
|
||||
- Added new orc hairstyles
|
||||
- Added sfx for wielding/unwielding weapons
|
||||
- Fixed NPCs attacking the player forever after killing them
|
||||
|
||||
### Changed
|
||||
|
||||
|
@ -153,7 +153,7 @@ impl<'a> System<'a> for Sys {
|
||||
been_close,
|
||||
..
|
||||
} => {
|
||||
if let (Some(tgt_pos), _tgt_stats, tgt_alignment) = (
|
||||
if let (Some(tgt_pos), Some(tgt_stats), tgt_alignment) = (
|
||||
positions.get(*target),
|
||||
stats.get(*target),
|
||||
alignments
|
||||
@ -164,7 +164,8 @@ impl<'a> System<'a> for Sys {
|
||||
// Don't attack entities we are passive towards
|
||||
// TODO: This is here, it's a bit of a hack
|
||||
if let Some(alignment) = alignment {
|
||||
if (*alignment).passive_towards(tgt_alignment) {
|
||||
if (*alignment).passive_towards(tgt_alignment) || tgt_stats.is_dead
|
||||
{
|
||||
do_idle = true;
|
||||
break 'activity;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user