mirror of https://github.com/axmolengine/axmol.git
Fix ClippingAttachment doesn't work
Refer to: https://github.com/EsotericSoftware/spine-runtimes/pull/2011 Reported by: @kangleblue Signed-off-by: halx99 <halx99@live.com>
This commit is contained in:
parent
beb8606e16
commit
14a3a0de93
|
@ -915,14 +915,18 @@ namespace {
|
|||
Attachment *attachment = slot.getAttachment();
|
||||
if (!attachment ||
|
||||
slotIsOutRange(slot, startSlotIndex, endSlotIndex) ||
|
||||
!slot.getBone().isActive() ||
|
||||
slot.getColor().a == 0)
|
||||
!slot.getBone().isActive())
|
||||
return true;
|
||||
if (attachment->getRTTI().isExactly(RegionAttachment::rtti)) {
|
||||
const auto& attachmentRTTI = attachment->getRTTI();
|
||||
if (attachmentRTTI.isExactly(ClippingAttachment::rtti))
|
||||
return false;
|
||||
if (slot.getColor().a == 0)
|
||||
return true;
|
||||
if (attachmentRTTI.isExactly(RegionAttachment::rtti)) {
|
||||
if (static_cast<RegionAttachment*>(attachment)->getColor().a == 0)
|
||||
return true;
|
||||
}
|
||||
else if (attachment->getRTTI().isExactly(MeshAttachment::rtti)) {
|
||||
else if (attachmentRTTI.isExactly(MeshAttachment::rtti)) {
|
||||
if (static_cast<MeshAttachment*>(attachment)->getColor().a == 0)
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue