Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10970


Ignore:
Timestamp:
Dec 11, 2015, 3:26:20 PM (9 years ago)
Author:
maxima
Message:

Merged campaign and presentation. Everything seems to work fine.

Location:
code/branches/presentationHS15
Files:
18 edited
23 copied

Legend:

Unmodified
Added
Removed
  • code/branches/presentationHS15

  • code/branches/presentationHS15/data/defaultConfig/orxonox.ini

    r10262 r10970  
    44campaignMissions_[2] = "pirateAttack.oxw"
    55campaignMissions_[3] = "iJohnVane_TriptoArea51.oxw"
     6campaignMissions_[4] = "iiJohnVane_Area51UnderFire.oxw"
     7campaignMissions_[5] = "iiiJohnVane_EscapeTheBastards.oxw"
     8campaignMissions_[6] = "expeditionSector.oxw"
     9campaignMissions_[7] = "shuttleAttack.oxw"
     10campaignMissions_[8] = "shuttleRetaliation.oxw"
  • code/branches/presentationHS15/data/gui/layouts/CampaignMenu.layout

    r10262 r10970  
    88        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1.0,0},{1.0,0}}" />
    99        <Property Name="BackgroundEnabled" Value="False" />
    10         <Window Type="MenuWidgets/Button" Name="orxonox/MissionOneButton" >
    11             <Property Name="Text" Value="Mission 1" />
     10        <Window Type="MenuWidgets/Button" Name="orxonox/Mission1Button" >
     11            <Property Name="Text" Value="Mission One" />
    1212            <Property Name="Visible" Value="False"/>
    1313            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    14             <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.2875,0},{0.6,0},{0.3375,0}}" />
    15             <Event Name="Clicked" Function="CampaignMenu.MissionOneButton_clicked"/>
     14            <Property Name="UnifiedAreaRect" Value="{{0.35,0},{0.1,0},{0.65,0},{0.15,0}}" />
     15            <Event Name="Clicked" Function="CampaignMenu.Mission1Button_clicked"/>
    1616        </Window>
    17         <Window Type="MenuWidgets/Button" Name="orxonox/MissionTwoButton" >
    18             <Property Name="Text" Value="Mission 2" />
     17        <Window Type="MenuWidgets/Button" Name="orxonox/Mission2Button" >
     18            <Property Name="Text" Value="Fight in our Back" />
    1919            <Property Name="Visible" Value="False"/>
    2020            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    21             <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.3625,0},{0.6,0},{0.4125,0}}" />
     21            <Property Name="UnifiedAreaRect" Value="{{0.35,0},{0.18,0},{0.65,0},{0.23,0}}" />
    2222            <Property Name="Disabled" Value="True" />
    23             <Event Name="Clicked" Function="CampaignMenu.MissionTwoButton_clicked"/>
     23            <Event Name="Clicked" Function="CampaignMenu.Mission2Button_clicked"/>
    2424        </Window>
    25         <Window Type="MenuWidgets/Button" Name="orxonox/MissionThreeButton" >
    26             <Property Name="Text" Value="Mission 3" />
     25        <Window Type="MenuWidgets/Button" Name="orxonox/Mission3Button" >
     26            <Property Name="Text" Value="Pirate Attack" />
    2727            <Property Name="Visible" Value="False"/>
    2828            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    29             <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.4375,0},{0.6,0},{0.4875,0}}" />
     29            <Property Name="UnifiedAreaRect" Value="{{0.35,0},{0.26,0},{0.65,0},{0.31,0}}" />
    3030            <Property Name="Disabled" Value="True" />
    31             <Event Name="Clicked" Function="CampaignMenu.MissionThreeButton_clicked"/>
     31            <Event Name="Clicked" Function="CampaignMenu.Mission3Button_clicked"/>
    3232        </Window>
    33         <Window Type="MenuWidgets/Button" Name="orxonox/MissionFourButton" >
    34             <Property Name="Text" Value="Mission 4" />
     33        <Window Type="MenuWidgets/Button" Name="orxonox/Mission4Button" >
     34            <Property Name="Text" Value="Trip to Area 51" />
    3535            <Property Name="Visible" Value="False"/>
    3636            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    37             <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.5125,0},{0.6,0},{0.5625,0}}" />
     37            <Property Name="UnifiedAreaRect" Value="{{0.35,0},{0.34,0},{0.65,0},{0.39,0}}" />
    3838            <Property Name="Disabled" Value="True" />
    39             <Event Name="Clicked" Function="CampaignMenu.MissionFourButton_clicked"/>
     39            <Event Name="Clicked" Function="CampaignMenu.Mission4Button_clicked"/>
    4040        </Window>
     41        <Window Type="MenuWidgets/Button" Name="orxonox/Mission5Button" >
     42            <Property Name="Text" Value="Area 51 under Fire" />
     43            <Property Name="Visible" Value="False"/>
     44            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     45            <Property Name="UnifiedAreaRect" Value="{{0.35,0},{0.42,0},{0.65,0},{0.47,0}}" />
     46            <Property Name="Disabled" Value="True" />
     47            <Event Name="Clicked" Function="CampaignMenu.Mission5Button_clicked"/>
     48        </Window>
     49        <Window Type="MenuWidgets/Button" Name="orxonox/Mission6Button" >
     50            <Property Name="Text" Value="Escape the Bastards" />
     51            <Property Name="Visible" Value="False"/>
     52            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     53            <Property Name="UnifiedAreaRect" Value="{{0.35,0},{0.50,0},{0.65,0},{0.55,0}}" />
     54            <Property Name="Disabled" Value="True" />
     55            <Event Name="Clicked" Function="CampaignMenu.Mission6Button_clicked"/>
     56        </Window>
     57        <Window Type="MenuWidgets/Button" Name="orxonox/Mission7Button" >
     58            <Property Name="Text" Value="Expedition to Sector 5C" />
     59            <Property Name="Visible" Value="False"/>
     60            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     61            <Property Name="UnifiedAreaRect" Value="{{0.35,0},{0.58,0},{0.65,0},{0.63,0}}" />
     62            <Property Name="Disabled" Value="True" />
     63            <Event Name="Clicked" Function="CampaignMenu.Mission7Button_clicked"/>
     64        </Window>
     65        <Window Type="MenuWidgets/Button" Name="orxonox/Mission8Button" >
     66            <Property Name="Text" Value="Shuttle under Attack" />
     67            <Property Name="Visible" Value="False"/>
     68            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     69            <Property Name="UnifiedAreaRect" Value="{{0.35,0},{0.66,0},{0.65,0},{0.71,0}}" />
     70            <Property Name="Disabled" Value="True" />
     71            <Event Name="Clicked" Function="CampaignMenu.Mission8Button_clicked"/>
     72        </Window>
     73        <Window Type="MenuWidgets/Button" Name="orxonox/Mission9Button" >
     74            <Property Name="Text" Value="Retaliation" />
     75            <Property Name="Visible" Value="False"/>
     76            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     77            <Property Name="UnifiedAreaRect" Value="{{0.35,0},{0.74,0},{0.65,0},{0.79,0}}" />
     78            <Property Name="Disabled" Value="True" />
     79            <Event Name="Clicked" Function="CampaignMenu.Mission9Button_clicked"/>
     80        </Window>
     81
     82
    4183        <Window Type="MenuWidgets/Button" Name="orxonox/CampaignMenuBackButton" >
    4284            <Property Name="Text" Value="Back" />
    4385            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    44             <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.8,0},{0.6,0},{0.85,0}}" />
     86            <Property Name="UnifiedAreaRect" Value="{{0.35,0},{0.85,0},{0.65,0},{0.9,0}}" />
    4587            <Event Name="Clicked" Function="CampaignMenu.CampaignMenuBackButton_clicked"/>
    4688        </Window>
  • code/branches/presentationHS15/data/gui/scripts/CampaignMenu.lua

    r10262 r10970  
    88
    99function P.updateButtons()
    10     P.updateButton(0, winMgr:getWindow("orxonox/MissionOneButton"))
    11     P.updateButton(1, winMgr:getWindow("orxonox/MissionTwoButton"))
    12     P.updateButton(2, winMgr:getWindow("orxonox/MissionThreeButton"))
    13     P.updateButton(3, winMgr:getWindow("orxonox/MissionFourButton"))
     10    P.updateButton(0, winMgr:getWindow("orxonox/Mission1Button"))
     11    P.updateButton(1, winMgr:getWindow("orxonox/Mission2Button"))
     12    P.updateButton(2, winMgr:getWindow("orxonox/Mission3Button"))
     13    P.updateButton(3, winMgr:getWindow("orxonox/Mission4Button"))
     14    P.updateButton(4, winMgr:getWindow("orxonox/Mission5Button"))
     15    P.updateButton(5, winMgr:getWindow("orxonox/Mission6Button"))
     16    P.updateButton(6, winMgr:getWindow("orxonox/Mission7Button"))
     17    P.updateButton(7, winMgr:getWindow("orxonox/Mission8Button"))
     18    P.updateButton(8, winMgr:getWindow("orxonox/Mission9Button"))
     19
    1420
    1521    if (P.getIndexOfLastFinishedMission() == orxonox.LevelManager:getInstance():getNumberOfCampaignMissions() - 1) then
     
    5460end
    5561
    56 function P.MissionOneButton_clicked(e)
     62function P.Mission1Button_clicked(e)
    5763    P.loadLevel(P.FindLevel(0))
    5864end
    5965
    60 function P.MissionTwoButton_clicked(e)
     66function P.Mission2Button_clicked(e)
    6167    P.loadLevel(P.FindLevel(1))
    6268end
    6369
    64 function P.MissionThreeButton_clicked(e)
     70function P.Mission3Button_clicked(e)
    6571    P.loadLevel(P.FindLevel(2))
    6672end
    6773
    68 function P.MissionFourButton_clicked(e)
     74function P.Mission4Button_clicked(e)
    6975    P.loadLevel(P.FindLevel(3))
     76end
     77
     78function P.Mission5Button_clicked(e)
     79    P.loadLevel(P.FindLevel(4))
     80end
     81
     82function P.Mission6Button_clicked(e)
     83    P.loadLevel(P.FindLevel(5))
     84end
     85
     86function P.Mission7Button_clicked(e)
     87    P.loadLevel(P.FindLevel(6))
     88end
     89
     90function P.Mission8Button_clicked(e)
     91    P.loadLevel(P.FindLevel(7))
     92end
     93
     94function P.Mission9Button_clicked(e)
     95    P.loadLevel(P.FindLevel(8))
    7096end
    7197
  • code/branches/presentationHS15/data/levels/missionOne.oxw

    r10962 r10970  
    16791679
    16801680<!-- @Triggers: HACK. The attacktrigger6 Event is created, but does not trigger the Script.
    1681 (WTF?) TODO: looks like a BUG 
     1681(WTF?) TODO: looks like a BUG
    16821682Thus a distanceTrigger is created, that gets enabled, when the inner trigger gets activated.
    16831683Due to the large radius it is likely that it actually gets triggered.
    16841684-->
    16851685
    1686   <DistanceTrigger name="testDistanceTrigger" position="0,0,0" distance=10000 target="SpaceShip" stayActive="true" delay=37.0>
     1686  <DistanceTrigger name="testDistanceTrigger" position="0,0,0" distance=10000 target="Pawn" stayActive="true" delay=37.0>
    16871687    <EventTrigger name="testEventTrigger" activations="1" stayactive="true" delay=0.1>
    16881688      <events>
  • code/branches/presentationHS15/src/libraries/util/Math.cc

    r10630 r10970  
    161161         - If the other object is exactly above me, the function returns <tt>Vector2(0, 0.5)</tt>.
    162162    */
    163     orxonox::Vector2 get2DViewcoordinates(const orxonox::Vector3& myposition, const orxonox::Vector3& mydirection, const orxonox::Vector3& myorthonormal, const orxonox::Vector3& otherposition)
     163    orxonox::Vector2 get2DViewCoordinates(const orxonox::Vector3& myposition, const orxonox::Vector3& mydirection, const orxonox::Vector3& myorthonormal, const orxonox::Vector3& otherposition)
    164164    {
    165165        orxonox::Vector3 distance = otherposition - myposition;
  • code/branches/presentationHS15/src/libraries/util/Math.h

    r9939 r10970  
    9191    _UtilExport float getAngle(const orxonox::Vector3& myposition, const orxonox::Vector3& mydirection, const orxonox::Vector3& otherposition);
    9292    _UtilExport orxonox::Vector2 get2DViewdirection(const orxonox::Vector3& myposition, const orxonox::Vector3& mydirection, const orxonox::Vector3& myorthonormal, const orxonox::Vector3& otherposition);
    93     _UtilExport orxonox::Vector2 get2DViewcoordinates(const orxonox::Vector3& myposition, const orxonox::Vector3& mydirection, const orxonox::Vector3& myorthonormal, const orxonox::Vector3& otherposition);
     93    _UtilExport orxonox::Vector2 get2DViewCoordinates(const orxonox::Vector3& myposition, const orxonox::Vector3& mydirection, const orxonox::Vector3& myorthonormal, const orxonox::Vector3& otherposition);
    9494    _UtilExport orxonox::Vector2 get3DProjection(const orxonox::Vector3& myposition, const orxonox::Vector3& mydirection, const orxonox::Vector3& myorthonormal, const orxonox::Vector3& otherposition, const float mapangle, const float detectionlimit);
    9595    _UtilExport bool isObjectHigherThanShipOnMap(const orxonox::Vector3& myposition, const orxonox::Vector3& mydirection, const orxonox::Vector3& myorthonormal, const orxonox::Vector3& otherposition, const float mapangle);
  • code/branches/presentationHS15/src/modules/docking/DockingController.cc

    r9667 r10970  
    6161
    6262        float distance = (this->dock_->getWorldPosition() - entity->getPosition()).length();
    63         Vector2 coord = get2DViewcoordinates(     // I don't understand this too
     63        Vector2 coord = get2DViewCoordinates(     // I don't understand this too
    6464            entity->getPosition(),
    6565            entity->getOrientation() * WorldEntity::FRONT,
  • code/branches/presentationHS15/src/modules/overlays/hud/HUDRadar.cc

    r9945 r10970  
    240240            }
    241241            else
    242                 coord = get2DViewcoordinates(this->owner_->getPosition(), this->owner_->getOrientation() * WorldEntity::FRONT, this->owner_->getOrientation() * WorldEntity::UP, wePointer->getWorldPosition());
     242                coord = get2DViewCoordinates(this->owner_->getPosition(), this->owner_->getOrientation() * WorldEntity::FRONT, this->owner_->getOrientation() * WorldEntity::UP, wePointer->getWorldPosition());
    243243
    244244            coord *= math::pi / 3.5f; // small adjustment to make it fit the texture
  • code/branches/presentationHS15/src/modules/weapons/weaponmodes/MineGun.cc

    r10963 r10970  
    5858        this->setMunitionName("MineMunition");
    5959        this->setDefaultSound("sounds/mineactivate.ogg");
     60
     61        hudImageString_ = "Orxonox/WSHUD_WM_MineGun";
    6062    }
    6163
  • code/branches/presentationHS15/src/orxonox/controllers/CMakeLists.txt

    r10216 r10970  
    1111  FormationController.cc
    1212  ControllerDirector.cc
     13  DivisionController.cc
     14  WingmanController.cc
     15  SectionController.cc
     16  CommonController.cc
     17  ActionpointController.cc
     18  FlyingController.cc
     19  FightingController.cc
     20  MasterController.cc
    1321)
  • code/branches/presentationHS15/src/orxonox/controllers/FormationController.cc

    r10631 r10970  
    277277        }
    278278
    279         Vector2 coord = get2DViewcoordinates(this->getControllableEntity()->getPosition(), this->getControllableEntity()->getOrientation() * WorldEntity::FRONT, this->getControllableEntity()->getOrientation() * WorldEntity::UP, target);
     279        Vector2 coord = get2DViewCoordinates(this->getControllableEntity()->getPosition(), this->getControllableEntity()->getOrientation() * WorldEntity::FRONT, this->getControllableEntity()->getOrientation() * WorldEntity::UP, target);
    280280        float distance = (target - this->getControllableEntity()->getPosition()).length();
    281281        float rotateX = clamp(coord.x * 10, -1.0f, 1.0f);
     
    970970        if (controller)
    971971        {
     972            if (controller->getIdentifier()->getName() == "MasterController")
     973                return true;
    972974            FormationController* ac = orxonox_cast<FormationController*>(controller);
    973975            if (ac)
     
    981983        if (controller)
    982984        {
     985            if (controller->getIdentifier()->getName() == "MasterController")
     986                return true;
    983987            FormationController* ac = orxonox_cast<FormationController*>(controller);
    984988            if (ac)
     
    10691073            return;
    10701074
    1071         Vector2 coord = get2DViewcoordinates(this->getControllableEntity()->getPosition(), this->getControllableEntity()->getOrientation() * WorldEntity::FRONT, this->getControllableEntity()->getOrientation() * WorldEntity::UP, target);
     1075        Vector2 coord = get2DViewCoordinates(this->getControllableEntity()->getPosition(), this->getControllableEntity()->getOrientation() * WorldEntity::FRONT, this->getControllableEntity()->getOrientation() * WorldEntity::UP, target);
    10721076        float distance = (target - this->getControllableEntity()->getPosition()).length();
    10731077
  • code/branches/presentationHS15/src/orxonox/worldentities/CMakeLists.txt

    r10962 r10970  
    1212  TeamSpawnPoint.cc
    1313  ExplosionPart.cc
     14  Actionpoint.cc
    1415)
    1516
  • code/branches/presentationHS15/src/orxonox/worldentities/SpawnPoint.h

    r9667 r10970  
    5555                { return this->template_; }
    5656
    57             Pawn* spawn();
     57            virtual Pawn* spawn();
    5858            void spawn(ControllableEntity* entity);
    5959
  • code/branches/presentationHS15/src/orxonox/worldentities/TeamSpawnPoint.cc

    r9667 r10970  
    4949        XMLPortParam(TeamSpawnPoint, "team", setTeamNumber, getTeamNumber, xmlelement, mode).defaultValues(0);
    5050    }
     51    Pawn* TeamSpawnPoint::spawn()
     52    {
     53        Pawn* entity = SpawnPoint::spawn();
     54        static_cast<ControllableEntity*>(entity)->setTeam (this->teamNumber_);
     55        return entity;
     56    }
    5157}
  • code/branches/presentationHS15/src/orxonox/worldentities/TeamSpawnPoint.h

    r9667 r10970  
    4949            unsigned int getTeamNumber() const
    5050                { return this->teamNumber_; }
     51            virtual Pawn* spawn();
    5152
    5253        private:
    53             unsigned int teamNumber_;
     54            int teamNumber_;
    5455    };
    5556}
  • code/branches/presentationHS15/src/orxonox/worldentities/pawns/Pawn.h

    r10962 r10970  
    201201            const std::string& getExplosionSound();
    202202
     203            virtual const WeaponSystem* getWeaponSystem() const
     204                { return this->weaponSystem_; }
     205
    203206        protected:
    204207            virtual void preDestroy();
  • code/branches/presentationHS15/test/util/MathTest.cc

    r9114 r10970  
    337337    getAngle
    338338    get2DViewdirection
    339     get2DViewcoordinates
     339    get2DViewCoordinates
    340340    getPredictedPosition
    341341*/
Note: See TracChangeset for help on using the changeset viewer.