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:
kanym 2026-11-06 21:28:13 +01:00
commit 7a618936f2
2 changed files with 77 additions and 49 deletions

View file

@ -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)));