Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1781


Ignore:
Timestamp:
Sep 15, 2008, 12:42:18 AM (16 years ago)
Author:
rgrieder
Message:
  • hack-fixed the colour of the radar dots.
  • dealt with some M$ windows hackery (who would ever macro-define min/max???)
Location:
code/trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/OrxonoxStableHeaders.h

    r1755 r1781  
    3737#include "util/OrxonoxPlatform.h"
    3838
    39 #if ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC && !defined(ORXONOX_DISABLE_PCH)
     39#if ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC && !defined(ORXONOX_DISABLE_PCH) && 0
    4040
    4141// including std headers here is useless since they're already precompiled
     
    5555#include "tinyxml/tinyxml.h"
    5656
     57//Get around Windows hackery (windows.h is included by Ogre)
     58#if ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32
     59#  ifdef max
     60#    undef max
     61#  endif
     62#  ifdef min
     63#    undef min
     64#  endif
     65#endif
    5766
    5867//----------- Our files ----------
  • code/trunk/src/orxonox/objects/SpaceShip.cc

    r1772 r1781  
    169169    }
    170170
    171     bool SpaceShip::create(){
    172       if(!myShip_){
    173         if(network::Host::running())
    174 //          COUT(3) << "this id: " << this->objectID << " myShipID: " << network::Host::getShipID() << std::endl;
    175         if(network::Host::running() && objectID == network::Host::getShipID()){
    176           if(!network::Host::isServer())
    177             setObjectMode(0x3);
    178           myShip_=true;
     171    bool SpaceShip::create()
     172    {
     173        if (!myShip_)
     174        {
     175            if (network::Host::running())
     176                //COUT(3) << "this id: " << this->objectID << " myShipID: " << network::Host::getShipID() << std::endl;
     177                if (network::Host::running() && objectID == network::Host::getShipID())
     178                {
     179                    if (!network::Host::isServer())
     180                        setObjectMode(0x3);
     181                    myShip_ = true;
     182                }
    179183        }
    180184        else
    181           this->setRadarObjectColour(this->getProjectileColour());
    182       }
    183       assert(Model::create());
    184       this->init();
    185       return true;
    186     }
    187 
    188     void SpaceShip::registerAllVariables(){
    189       registerVar( &camName_, camName_.length()+1, network::STRING, 0x1 );
    190       registerVar( &maxSpeed_, sizeof(maxSpeed_), network::DATA, 0x1);
    191       registerVar( &maxSideAndBackSpeed_, sizeof(maxSideAndBackSpeed_), network::DATA, 0x1);
    192       registerVar( &maxRotation_, sizeof(maxRotation_), network::DATA, 0x1);
    193       registerVar( &translationAcceleration_, sizeof(translationAcceleration_), network::DATA, 0x1);
    194       registerVar( &rotationAcceleration_, sizeof(rotationAcceleration_), network::DATA, 0x1);
    195       registerVar( &rotationAccelerationRadian_, sizeof(rotationAccelerationRadian_), network::DATA, 0x1);
    196       registerVar( &translationDamping_, sizeof(translationDamping_), network::DATA, 0x1);
    197       registerVar( &rotationDamping_, sizeof(rotationDamping_), network::DATA, 0x1);
    198       registerVar( &rotationDampingRadian_, sizeof(rotationDampingRadian_), network::DATA, 0x1);
    199 
     185            this->setRadarObjectColour(this->getProjectileColour());
     186        assert(Model::create());
     187        this->init();
     188        return true;
     189    }
     190
     191    void SpaceShip::registerAllVariables()
     192    {
     193        registerVar( &camName_, camName_.length()+1, network::STRING, 0x1 );
     194        registerVar( &maxSpeed_, sizeof(maxSpeed_), network::DATA, 0x1);
     195        registerVar( &maxSideAndBackSpeed_, sizeof(maxSideAndBackSpeed_), network::DATA, 0x1);
     196        registerVar( &maxRotation_, sizeof(maxRotation_), network::DATA, 0x1);
     197        registerVar( &translationAcceleration_, sizeof(translationAcceleration_), network::DATA, 0x1);
     198        registerVar( &rotationAcceleration_, sizeof(rotationAcceleration_), network::DATA, 0x1);
     199        registerVar( &rotationAccelerationRadian_, sizeof(rotationAccelerationRadian_), network::DATA, 0x1);
     200        registerVar( &translationDamping_, sizeof(translationDamping_), network::DATA, 0x1);
     201        registerVar( &rotationDamping_, sizeof(rotationDamping_), network::DATA, 0x1);
     202        registerVar( &rotationDampingRadian_, sizeof(rotationDampingRadian_), network::DATA, 0x1);
    200203    }
    201204
  • code/trunk/src/util/Math.h

    r1625 r1781  
    6666_UtilExport orxonox::Vector2 get2DViewcoordinates(const orxonox::Vector3& myposition, const orxonox::Vector3& mydirection, const orxonox::Vector3& myorthonormal, const orxonox::Vector3& otherposition);
    6767_UtilExport orxonox::Vector3 getPredictedPosition(const orxonox::Vector3& myposition, float projectilespeed, const orxonox::Vector3& targetposition, const orxonox::Vector3& targetvelocity);
     68
     69//Get around Windows hackery
     70#if ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32
     71#  ifdef max
     72#    undef max
     73#  endif
     74#  ifdef min
     75#    undef min
     76#  endif
     77#endif
    6878
    6979template <typename T>
Note: See TracChangeset for help on using the changeset viewer.