Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8560


Ignore:
Timestamp:
May 24, 2011, 4:33:48 PM (13 years ago)
Author:
dafrick
Message:

Some cleanup.

Location:
code/branches/dockingsystem2
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/branches/dockingsystem2/data/levels/docking.oxw

    r8544 r8560  
    11<LevelInfo
    22 name = "Transporter"
    3  description = "Level with a Transporter. Demostrates the docking system."
     3 description = "Level with a Transporter. Demonstrates the docking system."
    44 tags = ""
    55/>
     
    2626
    2727    <Light type="directional" position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0" />
    28 
    29 
    3028
    3129    <?lua for i = 1, 10, 1 do ?>
     
    113111            </events>
    114112            <attached>
    115                 <DistanceTrigger position="0,0,0" distance="30" target="Pawn" beaconMode="exclude" targetname="bcnDestroyer" name="dockMe" />
    116                 <Billboard material="Examples/Flare" colour="1.0, 0, 0" />
     113                <DistanceTrigger position="0,0,-200" distance="30" target="Pawn" beaconMode="exclude" targetname="bcnDestroyer" name="dockMe" />
     114                <Billboard position="0,0,-200" material="Examples/Flare" colour="1.0, 0, 0" />
    117115            </attached>
    118116        </Dock>
  • code/branches/dockingsystem2/src/modules/docking/Dock.cc

    r8501 r8560  
    2929/**
    3030    @file Dock.cc
    31         @brief Docking system main class
     31    @brief Docking system main class
    3232*/
    3333
     
    9090        {
    9191            if(!pTrigger->isForPlayer()) {  // The PlayerTrigger is not exclusively for Pawns which means we cannot extract one.
    92                 COUT(2) << "Docking:execute PlayerTrigger was not triggered by a player.." << std::endl;
     92                COUT(4) << "Docking:execute PlayerTrigger was not triggered by a player.." << std::endl;
    9393                return false;
    9494            }
     
    9797        else
    9898        {
    99             COUT(2) << "Docking::execute Not a player trigger, can't extract pawn from it.." << std::endl;
     99            COUT(4) << "Docking::execute Not a player trigger, can't extract pawn from it.." << std::endl;
    100100            return false;
    101101        }
    102102        if(pawn == NULL)
    103103        {
    104             COUT(2) << "Docking::execute Can't retrieve Pawn from Trigger. (" << trigger->getIdentifier()->getName() << ")" << std::endl;
     104            COUT(4) << "Docking::execute Can't retrieve Pawn from Trigger. (" << trigger->getIdentifier()->getName() << ")" << std::endl;
    105105            return false;
    106106        }
     
    158158        if(candidates.find(player) == candidates.end())
    159159        {
    160             COUT(0) << "Dock::dock Player is not a candidate!" << std::endl;
     160            COUT(2) << "Dock::dock Player is not a candidate!" << std::endl;
    161161            return false;
    162162        }
     
    177177        if(docked.find(player) == docked.end())
    178178        {
    179             COUT(0) << "Dock::dockingAnimationFinished Player is not currently docked." << std::endl;
     179            COUT(2) << "Dock::dockingAnimationFinished Player is not currently docked." << std::endl;
    180180            return false;
    181181        }
     
    190190        if(docked.find(player) == docked.end())
    191191        {
    192             COUT(0) << "Dock::undock Player is not docked to this Dock." << std::endl;
     192            COUT(2) << "Dock::undock Player is not docked to this Dock." << std::endl;
    193193            return false;
    194194        }
     
    208208
    209209    bool Dock::undockingAnimationFinished(PlayerInfo* player) {
    210         COUT(0) << "Dock::undockingAnimationFinished executed" << std::endl;
     210        COUT(4) << "Dock::undockingAnimationFinished executed" << std::endl;
    211211        return true;
    212212    }
  • code/branches/dockingsystem2/src/modules/docking/DockToShip.cc

    r8501 r8560  
    4343    {
    4444        RegisterObject(DockToShip);
    45         COUT(0) << "DockToShip instance created.." << endl;
     45        COUT(4) << "DockToShip instance created.." << endl;
    4646    }
    4747
     
    6969    bool DockToShip::docking(PlayerInfo* player)
    7070    {
    71         COUT(0) << "DockToShip::attach" << endl;
     71        COUT(4) << "DockToShip::attach" << endl;
    7272
    7373        DockingTarget *target = DockingEffect::findTarget(this->target);
     
    7979        ControllableEntity *dockTo = (ControllableEntity*) target->getParent();
    8080        if (dockTo == NULL) {
    81             COUT(0) << "Parent is not a ControllableEntity.." << std::endl;
     81            COUT(2) << "Parent is not a ControllableEntity.." << std::endl;
    8282            return false;
    8383        }
     
    9292    bool DockToShip::release(PlayerInfo* player)
    9393    {
    94         COUT(0) << "DockToShip::release" << endl;
     94        COUT(4) << "DockToShip::release" << endl;
    9595
    9696        player->stopTemporaryControl();
  • code/branches/dockingsystem2/src/modules/docking/DockingController.cc

    r8544 r8560  
    9393        if (docking)
    9494        {
    95             COUT(0) << "DockingController::takeControl Taking over control." << std::endl;
     95            COUT(4) << "DockingController::takeControl Taking over control." << std::endl;
    9696
    9797            entity->setDestroyWhenPlayerLeft(false);
     
    104104    void DockingController::positionReached()
    105105    {
    106         COUT(0) << "DockingController::positionReached() called." << std::endl;
     106        COUT(4) << "DockingController::positionReached() called." << std::endl;
    107107
    108108        assert(this->player);
     
    110110
    111111        // stop spaceship
    112         dock->attach(entity);
     112        entity->setPosition(dock->getWorldPosition());
    113113        entity->setVelocity(0, 0, 0);
    114         entity->setOrientation(dock->getOrientation());
     114        entity->setOrientation(dock->getWorldOrientation());
    115115
    116116        // give control back to player
  • code/branches/dockingsystem2/src/modules/docking/DockingTarget.cc

    r8501 r8560  
    2929/**
    3030    @file DockingTarget.cc
    31         @brief Docking system main class
     31    @brief Docking system main class
    3232*/
    3333
     
    5555        XMLPortParam(DockingTarget, "name", setName, getName, xmlelement, mode);
    5656
    57         COUT(0) << "DockingTarget with name '" << this->getName() << "' created.." << std::endl;
     57        COUT(4) << "DockingTarget with name '" << this->getName() << "' created.." << std::endl;
    5858    }
    5959
Note: See TracChangeset for help on using the changeset viewer.