Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9615


Ignore:
Timestamp:
Apr 23, 2013, 1:42:53 PM (12 years ago)
Author:
maxima
Message:

If the HumanController dies but had slaves,
then the Controller changes to one of his slaves

Location:
code/branches/formationupdate
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/formationupdate/data/levels/maxim.oxw

    r9613 r9615  
    6565
    6666        <!-- ADDING FORMATION: 5 Swallows -->
    67         <?lua for i=0,4,1 do
     67        <?lua for i=0,1,1 do
    6868        ?>
    69             <SpaceShip position="<?lua print(400+i*200) ?>,-200,1000" lookat="-1300,-600,900" visible="true">
     69            <SpaceShip position="<?lua print(800+i*200) ?>,700,600" lookat="-1300,-600,900" visible="true">
    7070                <templates>
    7171                    <Template link=spaceshipswallow />
     
    7979       
    8080        <!-- ADDING ENEMY FORMATION: 5 Swallows -->
    81         <!--
    82         <?lua for i=0,4,1 do
     81
     82        <?lua for i=0,1,1 do
    8383        ?>
    8484            <SpaceShip position="<?lua print(5000+i*200) ?>,-200,1000" lookat="-1300,-600,900" visible="true">
     
    9191            </SpaceShip>
    9292        <?lua end ?>
    93         -->
    9493  </Scene>
    9594</Level>
  • code/branches/formationupdate/src/orxonox/worldentities/pawns/Pawn.cc

    r9614 r9615  
    325325                        }
    326326                }
     327                orxout(user_warning) << "The HumanController has no slaves!" << endl;
    327328                return false;
    328329    }
     
    359360                 * Doesn't work yet
    360361                 *
    361                  * if(this->hasSlaves())
     362                 */ if(this->hasSlaves())
    362363                {
    363364                                // start to control a slave
    364365                                this->getPlayer()->startControl(this->getSlave()->getControllableEntity());
    365                 }*/
    366                 this->getPlayer()->stopControl();
     366                }
     367                 else{
     368                         this->getPlayer()->stopControl();
     369                 }
    367370            }
    368371            if (GameMode::isMaster())
Note: See TracChangeset for help on using the changeset viewer.