fix(factions): grudges survive an owner change and reach kin owned elsewhere
The grudge was a dictionary in the owner's memory: when another client took over the creature mid-fight, its copy made peace on the next UpdateTarget. Grudge spreads to kin also skipped kin owned by another client. The grudge now lives on the creature's ZDO (attacker ZDOID and an end time in network time), written only by the owner; kin owned elsewhere get an RPC that their owner handles.
This commit is contained in:
parent
811e4cac34
commit
7a618936f2
2 changed files with 77 additions and 49 deletions
|
|
@ -59,8 +59,9 @@ namespace RacesOfValheim
|
|||
"Without this the truce is absolute in both directions: MonsterAI.UpdateTarget " +
|
||||
"throws away any target BaseAI.IsEnemy calls a non-enemy, so a truced mob could " +
|
||||
"not fight back even after being struck - it stood still, or fled because it " +
|
||||
"was hurt and had no enemy it was allowed to have. The grudge is per attacker " +
|
||||
"and per creature, on whichever machine runs that creature's AI. 0 restores the " +
|
||||
"was hurt and had no enemy it was allowed to have. Each creature holds one " +
|
||||
"grudge, against the last player who hit it, and keeps it when another player's " +
|
||||
"game takes over running that creature. 0 restores the " +
|
||||
"old absolute truce.",
|
||||
new AcceptableValueRange<float>(0f, 600f)));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue