interaction highlight: limit highlight's Plane for objects behind the Clonk

Otherwise, a catapult might appear to shine through the Clonk. This might look odd.
For objects in front the the Clonk, the GUI-Plane is kept.
liquid_container
David Dormagen 2016-02-08 12:35:42 +01:00
parent c6da7d54aa
commit 76f971e9d9
1 changed files with 10 additions and 1 deletions

View File

@ -92,7 +92,16 @@ private func FxIntHighlightInteractionStart(object target, proplist fx, temp, pr
}
};
fx.dummy.Visibility = VIS_Owner;
fx.dummy.Plane = 1000;
// The selector's plane should be just behind the Clonk for stuff that usually is behind the Clonk.
// Otherwise, it looks rather odd when the catapult shines through the Clonk.
if (fx.obj.Plane < this.Plane)
{
fx.dummy.Plane = this.Plane - 1;
}
else
{
fx.dummy.Plane = 1000;
}
var multiple_interactions_hint = "";
if (fx.interaction.has_multiple_interactions)
multiple_interactions_hint = Format("<c 999999>[%s] $More$..</c>", GetPlayerControlAssignment(GetOwner(), CON_Up, true, false));