Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8904


Ignore:
Timestamp:
Oct 25, 2011, 10:56:31 PM (13 years ago)
Author:
jo
Message:

On the way to a multiplayer gametype basceclass.

Location:
code/branches/gamecontent
Files:
2 added
12 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gamecontent/data/levels/includes/weaponSettingsSpacecruiser.oxi

    r8891 r8904  
    77      <WeaponSlot position="-34,-30,-169" />
    88      <WeaponSlot position=" 34,-30,-169" />
    9 
    109    </weaponslots>
    1110    <weaponsets>
  • code/branches/gamecontent/data/levels/missionOne.oxw

    r8891 r8904  
    2222 name         = "Mission One"
    2323 description  = "How to steer a spaceship."
     24 gametype     = "Mission"
    2425>
    2526  <templates>
     
    396397                    </templates>
    397398                    <controller>
    398                       <WaypointController>
     399                      <WaypointController team=1>
    399400                         <waypoints>
    400401                          <Model mesh="cube.mesh" scale=8 position="  0,1700,-200" />
     
    417418                  </templates>
    418419                  <controller>
    419                     <WaypointController>
     420                    <WaypointController team=1>
    420421                      <waypoints>
    421422                        <Model mesh="cube.mesh" scale=8 position="  0,2400,1000" />
  • code/branches/gamecontent/data/levels/templates/spaceshipSpacecruiser.oxt

    r8891 r8904  
    1111   initialhealth     = 300
    1212
    13    shieldhealth        = 60
    14    initialshieldhealth = 60
    15    maxshieldhealth     = 80
    16    shieldabsorption    = 0.8
     13   shieldhealth        = 75
     14   initialshieldhealth = 75
     15   maxshieldhealth     = 90
     16   shieldabsorption    = 0.9
    1717   reloadrate          = 1
    1818   reloadwaittime      = 1
     
    5757    </attached>
    5858    <collisionShapes>
    59       <BoxCollisionShape position="0,-30,-108"   halfExtents="38,6,62" />
    60       <BoxCollisionShape position="0,-20,-108"   halfExtents="20,6,40" />
    61       <BoxCollisionShape position="-16,-35,-112"  halfExtents="15,5,57" roll=-14 pitch=3.5/>
    62       <BoxCollisionShape position="16,-35,-112"   halfExtents="15,5,57" roll=14 pitch=3.5/>
    63       <BoxCollisionShape position="19,-21.5,-108" halfExtents="18,5,52" roll=-21 />
    64       <BoxCollisionShape position="-19,-21.5,-108"halfExtents="18,5,52" roll=21 />
    65       <BoxCollisionShape position="0,-21,-169"halfExtents="18,1,16" pitch=-30x />
     59      <BoxCollisionShape position="0,-30,-108"     halfExtents="38,6,62" />
     60      <BoxCollisionShape position="0,-20,-108"     halfExtents="20,6,40" />
     61      <BoxCollisionShape position="-16,-35,-112"   halfExtents="15,5,57" roll=-14 pitch=3.5/>
     62      <BoxCollisionShape position="16,-35,-112"    halfExtents="15,5,57" roll=14 pitch=3.5/>
     63      <BoxCollisionShape position="19,-21.5,-108"  halfExtents="18,5,52" roll=-21 />
     64      <BoxCollisionShape position="-19,-21.5,-108" halfExtents="18,5,52" roll=21 />
     65      <BoxCollisionShape position="0,-21,-169"     halfExtents="18,1,16" pitch=-30 />
    6666
    6767    </collisionShapes>
     
    7575  <SpaceShip>
    7676    <camerapositions>
    77       <CameraPosition position="0,10,  40" drag=true mouselook=true />
    78       <CameraPosition position="0,20,  80" drag=true mouselook=true />
     77      <CameraPosition position="0,15,  60" drag=true mouselook=true />
    7978      <CameraPosition position="0,30, 120" drag=true mouselook=true />
    80       <CameraPosition position="0,20,-260" drag=true mouselook=true yaw=180/>
    81       <CameraPosition position="0,30,-350" drag=true mouselook=true yaw=180/>
    82       <!--CameraPosition position="0,150,-25" pitch=-90 drag=true />
    83       <CameraPosition position="0,0,-40" yaw=180 drag=true />
    84       <CameraPosition position="0,3,-14" yaw=0 />
    85       <CameraPosition position="-50,5,-8" yaw=-90 drag=true />
    86       <CameraPosition position="50,5,-8" yaw=90 drag=true /-->
     79      <CameraPosition position="0,40, 350" drag=true mouselook=true />
    8780    </camerapositions>
    8881  </SpaceShip>
     
    9386   boostfactor    = 2
    9487
    95    speedfront     = 150
    96    speedback      =  50
    97    speedleftright =  50
    98    speedupdown    =  50
     88   speedfront     = 200
     89   speedback      =  70
     90   speedleftright =  70
     91   speedupdown    =  70
    9992
    10093   defEngineSndNormal = "sounds/Engine_low.ogg"
  • code/branches/gamecontent/src/modules/pong/Pong.cc

    r8900 r8904  
    293293            std::string message(name1 + " has won!");
    294294            ChatManager::message(message);
    295 this->tick(0);
    296295            this->end();
    297296        }
     
    301300             std::string message2(name2 + " has won!");
    302301             ChatManager::message(message2);
    303 this->tick(0);
    304302             this->end();
    305303        }
  • code/branches/gamecontent/src/orxonox/controllers/WaypointPatrolController.cc

    r7184 r8904  
    4242        RegisterObject(WaypointPatrolController);
    4343
    44         //this->team_ = 0;
    4544        this->alertnessradius_ = 500;
    4645
     
    5352
    5453        XMLPortParam(WaypointPatrolController, "alertnessradius", setAlertnessRadius, getAlertnessRadius, xmlelement, mode).defaultValues(500.0f);
    55 //        XMLPortParam(WaypointPatrolController, "team", setTeam, getTeam, xmlelement, mode).defaultValues(0);
    5654    }
    5755
  • code/branches/gamecontent/src/orxonox/controllers/WaypointPatrolController.h

    r7163 r8904  
    4646            virtual void tick(float dt);
    4747
    48            /* inline void setTeam(int team)
    49                 { this->team_ = team; }
    50             inline int getTeam() const
    51                 { return this->team_; } */
    52 
    5348            inline void setAlertnessRadius(float radius)
    5449                { this->alertnessradius_ = radius; }
     
    5954            void searchEnemy();
    6055
    61             //int team_;
    6256            float alertnessradius_;
    6357            Timer patrolTimer_;
  • code/branches/gamecontent/src/orxonox/gametypes/CMakeLists.txt

    r8899 r8904  
    1010  LastTeamStanding.cc
    1111  TeamGametype.cc
     12  Mission.cc
    1213)
  • code/branches/gamecontent/src/orxonox/gametypes/Gametype.h

    r8706 r8904  
    123123                { return this->gtinfo_->getHUDTemplate(); }
    124124
    125             void addBots(unsigned int amount);
     125            virtual void addBots(unsigned int amount);
    126126            void killBots(unsigned int amount = 0);
    127127
  • code/branches/gamecontent/src/orxonox/gametypes/TeamDeathmatch.h

    r5781 r8904  
    5656
    5757            int getTeam(PlayerInfo* player);
    58 
    5958            inline const ColourValue& getTeamColour(int teamnr) const
    6059                { return this->teamcolours_[teamnr]; }
  • code/branches/gamecontent/src/orxonox/gametypes/TeamGametype.cc

    r8901 r8904  
    6767    {
    6868        Gametype::playerEntered(player);
    69 
    70         std::vector<unsigned int> playersperteam(this->teams_, 0);
     69        this->findAndSetTeam(player);
     70    }
     71
     72    void TeamGametype::findAndSetTeam(PlayerInfo* player)
     73    {
     74         std::vector<unsigned int> playersperteam(this->teams_, 0);
    7175
    7276        for (std::map<PlayerInfo*, int>::iterator it = this->teamnumbers_.begin(); it != this->teamnumbers_.end(); ++it)
     
    8690
    8791        this->teamnumbers_[player] = minplayersteam;
     92
    8893    }
    8994
  • code/branches/gamecontent/src/orxonox/gametypes/TeamGametype.h

    r8901 r8904  
    4747
    4848            virtual void playerEntered(PlayerInfo* player);
     49            virtual void findAndSetTeam(PlayerInfo* player);
    4950            virtual bool playerLeft(PlayerInfo* player);
    5051
  • code/branches/gamecontent/src/orxonox/worldentities/pawns/Pawn.cc

    r8891 r8904  
    455455        SUPER(Pawn, changedActivity);
    456456
    457         this->setRadarVisibility(this->isActive());
     457        this->setRadarVisibility(this->isVisible());
    458458    }
    459459
Note: See TracChangeset for help on using the changeset viewer.