diff --git a/gameSource/LivingLifePage.cpp b/gameSource/LivingLifePage.cpp index f3ed55bb..a7b83b99 100644 --- a/gameSource/LivingLifePage.cpp +++ b/gameSource/LivingLifePage.cpp @@ -21752,7 +21752,9 @@ void LivingLifePage::checkForPointerHit( PointerHitRecord *inRecord, // AND this object is tall // (don't click through short behind short) if( p->hitOurPlacement && - getObjectHeight( oID ) > .75 * CELL_D ) { + getObjectHeight( oID ) > .75 * CELL_D && + !obj->noClickThrough // object prevents click-through + ) { if( p->closestCellY > y ) { p->hitOurPlacementBehind = true; diff --git a/gameSource/objectBank.cpp b/gameSource/objectBank.cpp index 380682e4..248c01ad 100644 --- a/gameSource/objectBank.cpp +++ b/gameSource/objectBank.cpp @@ -577,6 +577,15 @@ static void setupNoHighlight( ObjectRecord *inR ) { inR->noHighlight = true; } } + + +static void setupNoClickThrough( ObjectRecord *inR ) { + inR->noClickThrough = false; + + if( strstr( inR->description, "+noClickThrough" ) != NULL ) { + inR->noClickThrough = true; + } + } @@ -796,6 +805,8 @@ float initObjectBankStep() { setupNoHighlight( r ); + setupNoClickThrough( r ); + setupMaxPickupAge( r ); setupAutoDefaultTrans( r ); @@ -3660,6 +3671,8 @@ int addObject( const char *inDescription, setupOwned( r ); setupNoHighlight( r ); + + setupNoClickThrough( r ); setupMaxPickupAge( r ); diff --git a/gameSource/objectBank.h b/gameSource/objectBank.h index 60bf0e86..12ed1d88 100644 --- a/gameSource/objectBank.h +++ b/gameSource/objectBank.h @@ -414,6 +414,10 @@ typedef struct ObjectRecord { char noHighlight; + // tall objects can be clicked through to reach small objects behind + // this property disables that + char noClickThrough; + // for auto-orienting fences, walls, etc // all three objects know the IDs of all three objects int horizontalVersionID;