Merge pull request #2323 from kacpherek/fix/warden-disables-shield

🤖 Agent: Proven in union R1 (branch union/cg19-r1, main + 83 of kacpherek's PRs): the 98 harnesses it can affect, clippy -D warnings, tests, lan_e2e in-frame and on the server thread.
This commit is contained in:
Ludovic Marie
2026-10-27 13:40:03 +01:00
committed by GitHub
+11 -6
View File
@@ -182,12 +182,17 @@ impl Game<'_> {
return;
};
let (mx, mz) = (m.position.x, m.position.z);
let disable = m
.extra
.main_hand
.as_deref()
.and_then(|item| self.res.items().get(item))
.map_or(0.0, |i| i.disable_blocking_seconds);
// LivingEntity.getSecondsToDisableBlocking: the held weapon's value;
// Warden overrides it with a flat 5 seconds.
let disable = if m.species() == horizon_client::mobs::Species::Warden {
5.0
} else {
m.extra
.main_hand
.as_deref()
.and_then(|item| self.res.items().get(item))
.map_or(0.0, |i| i.disable_blocking_seconds)
};
// Ravager.blockedByItem: stunned half the time (the defender pushed
// apart), else the defender flung away; no roar in progress.
if m.species() == horizon_client::mobs::Species::Ravager {