mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Fix pet aggro
This commit is contained in:
parent
725fd09ed7
commit
5d5cb28b59
@ -51,6 +51,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
new chunk for the initial setting or subsequent change to apply).
|
||||
- Moderators and admins are no longer blocked from logging in when there are too many players.
|
||||
- FXAA now behaves correctly at non-1.0x internal resolutions
|
||||
- Pets no longer aggro on pet owners after being healed
|
||||
|
||||
## [0.13.0] - 2022-07-23
|
||||
|
||||
|
@ -825,8 +825,8 @@ impl<'a> AgentData<'a> {
|
||||
let wants_pickup = matches!(self.body, Some(Body::Humanoid(_)))
|
||||
|| matches!(item, item_drop::Body::Consumable);
|
||||
|
||||
// The agent will attempt to pickup the item if it wants to pick it up and is
|
||||
// allowed to
|
||||
// The agent will attempt to pickup the item if it wants to pick it up and
|
||||
// is allowed to
|
||||
let attempt_pickup = wants_pickup
|
||||
&& read_data
|
||||
.loot_owners
|
||||
|
@ -201,7 +201,8 @@ fn react_if_on_fire(bdata: &mut BehaviorData) -> bool {
|
||||
fn target_if_attacked(bdata: &mut BehaviorData) -> bool {
|
||||
match bdata.agent_data.health {
|
||||
Some(health)
|
||||
if bdata.read_data.time.0 - health.last_change.time.0 < DAMAGE_MEMORY_DURATION =>
|
||||
if bdata.read_data.time.0 - health.last_change.time.0 < DAMAGE_MEMORY_DURATION
|
||||
&& health.last_change.amount < 0.0 =>
|
||||
{
|
||||
if let Some(by) = health.last_change.damage_by() {
|
||||
if let Some(attacker) = bdata
|
||||
|
Loading…
Reference in New Issue
Block a user