Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 12, 2013, 3:16:18 PM (11 years ago)
Author:
wroennin
Message:

fixed bug where marker_ had not the right zOrder

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/radarDreiD/src/modules/overlays/hud/HUDRadar.cc

    r9882 r9893  
    225225            // calc position on radar...
    226226            Vector2 coord;
     227
    227228            if(RadarMode_)
    228229            {
     
    232233                bool overXZPlain = isObjectHigherThanShipOnMap(this->owner_->getPosition(), this->owner_->getOrientation() * WorldEntity::FRONT, this->owner_->getOrientation() * WorldEntity::UP, wePointer->getWorldPosition(), this->mapAngle_);
    233234
     235                int zOrder = determineMap3DZOrder(this->owner_->getPosition(), this->owner_->getOrientation() * WorldEntity::FRONT, this->owner_->getOrientation() * WorldEntity::UP, wePointer->getWorldPosition(), detectionLimit_);
    234236                if(overXZPlain == false /*&& (it->second->getZOrder() >  100 * this->overlay_->getZOrder())*/) // it appears that zOrder of attached Overlayelements is 100 times the zOrder of the Overlay
    235                         it->second->_notifyZOrder(this->overlay_->getZOrder() * 100 - 70 + determineMap3DZOrder(this->owner_->getPosition(), this->owner_->getOrientation() * WorldEntity::FRONT, this->owner_->getOrientation() * WorldEntity::UP, wePointer->getWorldPosition(), detectionLimit_));
     237                        it->second->_notifyZOrder(this->overlay_->getZOrder() * 100 - 70 + zOrder);
    236238                if(overXZPlain == true /*&& (it->second->getZOrder() <= 100 * this->overlay_->getZOrder())*/)
    237                         it->second->_notifyZOrder(this->overlay_->getZOrder() * 100 + 70 + determineMap3DZOrder(this->owner_->getPosition(), this->owner_->getOrientation() * WorldEntity::FRONT, this->owner_->getOrientation() * WorldEntity::UP, wePointer->getWorldPosition(), detectionLimit_));
     239                        it->second->_notifyZOrder(this->overlay_->getZOrder() * 100 + 70 + zOrder);
    238240            }
    239241            else
     
    253255                this->marker_->setDimensions(size * 1.5f, size * 1.5f);
    254256                this->marker_->setPosition((1.0f + coord.x - size * 1.5f) * 0.5f, (1.0f - coord.y - size * 1.5f) * 0.5f);
     257                if(RadarMode_)
     258                        this->marker_->_notifyZOrder(it->second->getZOrder() -1);
    255259                this->marker_->show();
    256260            }
Note: See TracChangeset for help on using the changeset viewer.