fix: a TRAP GameObject never becomes the mouseover, so an AB node banner wins the pick

A trap is proximity-triggered and never clicked, so its interaction predicate
\+0xc is constant false like the transports'. Arathi Basin's visual-only aura
GameObjects (180100-180102, type 6, faction 114 hostile-to-all) otherwise stay
eligible through the inverted TRAP term and take the pick from the banner.
This commit is contained in:
chairmanpow
2026-10-12 17:02:37 +01:00
parent fa02975473
commit a0e7087546
2 changed files with 17 additions and 3 deletions
+10 -2
View File
@@ -372,7 +372,12 @@ pub(crate) fn mouseover_eligible(
overrides: GoOverrides,
) -> bool {
match type_id {
GO_TYPE_TRANSPORT | GO_TYPE_MAP_OBJECT | GO_TYPE_MO_TRANSPORT => false,
// TRAP's `+0xc` is constant false, like the transports': a trap is proximity-triggered and
// never clicked, so it never becomes the mouseover. Arathi Basin's visual-only aura
// GameObjects (180100-180102, type 6, faction 114 hostile-to-all) would otherwise stay
// eligible through the inverted TRAP term and take the pick from the node banner behind
// them — the banner is what the capture needs, the aura is decoration.
GO_TYPE_TRAP | GO_TYPE_TRANSPORT | GO_TYPE_MAP_OBJECT | GO_TYPE_MO_TRANSPORT => false,
GO_TYPE_SPELL_FOCUS
| GO_TYPE_DUEL_ARBITER
| GO_TYPE_FISHINGHOLE
@@ -947,7 +952,10 @@ mod tests {
Some(4),
GoOverrides::default()
));
assert!(mouseover_eligible(
// A TRAP never becomes the mouseover, hostile or not: it is proximity-triggered and never
// clicked, so its `+0xc` slot is constant false. This is what keeps a battleground's
// visual-only aura GO (type 6, hostile-to-all) off the pick over the node banner.
assert!(!mouseover_eligible(
GO_TYPE_TRAP,
0,
0,
+7 -1
View File
@@ -554,13 +554,19 @@ pub(super) fn update_hovered_object(
// Transports (TRANSPORT 11, MAP_OBJECT 14, MO_TRANSPORT 15) never join: the reference's model
// resolver `0x5f80e0` gives them no pick geometry and their interaction predicates are
// constant false, so a ship's hull never swallows the pick of an NPC on deck.
//
// TRAP (6) never joins either: a trap is proximity-triggered, never clicked, so the reference
// registers no mouse geometry for one. Arathi Basin's visual-only aura GameObjects
// (180100-180102, type 6) otherwise sit at the node banner's centre and win the pick from it —
// their faction is hostile to everyone, so the inverted TRAP term keeps them highlightable and
// the banner is never reached, whatever the battleground gate does.
if removed_parts.read().next().is_some() || !added_parts.is_empty() {
pickable.clear();
pickable.extend(go_parts.iter().filter(|&e| {
// Through the hit's own resolver, so a card and its mesh siblings agree.
!stores
.get(resolve_net(e))
.is_ok_and(|s| matches!(s.0.gameobject_type_id(), 11 | 14 | 15))
.is_ok_and(|s| matches!(s.0.gameobject_type_id(), 6 | 11 | 14 | 15))
}));
}
hovered.target = None;