Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 16, 2008, 6:01:13 PM (15 years ago)
Author:
landauf
Message:

Merged objecthierarchy2 into presentation branch

Couln't merge 2 lines in Gamestate.cc and a whole block of code in GSDedicated.cc (it seems like oli implemented in both branches something like a network-tick-limiter but with different approaches)

Not yet tested in network mode and with bots
The SpaceShips movement is also not yet fully adopted to the new physics (see Engine class)

Location:
code/branches/presentation
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation

  • code/branches/presentation/src/orxonox/objects/Radar.cc

    r2087 r2485  
    9999    void Radar::tick(float dt)
    100100    {
     101        SUPER(Radar, tick, dt);
     102
    101103        if (this->focus_ != *(this->itFocus_))
    102104        {
     
    112114            for (ObjectList<RadarViewable>::iterator itElement = ObjectList<RadarViewable>::begin(); itElement; ++itElement)
    113115            {
    114 /*
    115                 if ((*itElement) != SpaceShip::getLocalShip() && (*itListener)->getRadarSensitivity() > (*itElement)->getRadarObjectCamouflage())
     116                if ((*itListener)->getRadarSensitivity() > (*itElement)->getRadarObjectCamouflage())
    116117                    (*itListener)->displayObject(*itElement, *itElement == this->focus_);
    117 */
    118118            }
    119119        }
     
    128128            this->focus_ = 0;
    129129        }
    130         else
    131         {
    132             Vector3 localPosition;// = SpaceShip::getLocalShip()->getPosition();
     130/*
     131        else if (this->owner_)
     132        {
     133            Vector3 localPosition = this->owner_->getPosition();
    133134            Vector3 targetPosition = localPosition;
    134135            if (*(this->itFocus_))
    135                 targetPosition = this->itFocus_->getWorldPosition();
     136                targetPosition = this->itFocus_->getRVWorldPosition();
    136137
    137138            // find the closed object further away than targetPosition
     
    143144            for (ObjectList<RadarViewable>::iterator it = ObjectList<RadarViewable>::begin(); it; ++it)
    144145            {
    145 /*
    146                 if (*it == SpaceShip::getLocalShip())
     146                if (*it == (RadarViewable*)this->owner_)
    147147                    continue;
    148 */
    149                 float targetDistance = localPosition.squaredDistance((*it)->getWorldPosition());
     148
     149                float targetDistance = localPosition.squaredDistance((*it)->getRVWorldPosition());
    150150                if (targetDistance > currentDistance && targetDistance < nextDistance)
    151151                {
     
    171171            }
    172172        }
     173*/
    173174    }
    174175
     
    186187        for (ObjectList<RadarViewable>::iterator it = ObjectList<RadarViewable>::begin(); it; ++it, ++i)
    187188        {
    188             COUT(3) << i++ << ": " << (*it)->getWorldPosition() << std::endl;
     189            COUT(3) << i++ << ": " << (*it)->getRVWorldPosition() << std::endl;
    189190        }
    190191    }
Note: See TracChangeset for help on using the changeset viewer.