Changeset 6575 for code/branches
- Timestamp:
- Mar 20, 2010, 7:45:01 PM (15 years ago)
- Location:
- code/branches/ppspickups1
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/ppspickups1/data/levels/includes/pickups_speed.oxi
r6552 r6575 1 1 <PickupRepresentation 2 name ="SpeedBoost"3 description ="Speeds up the Ship for a certain time."4 spawnerTemplate ="speedboostpickuprepresentation"2 name = "Small Speed Boost" 3 description = "Adds a small amout of speed (?) to the ship." 4 spawnerTemplate = "smallspeedpickupRepresentation" 5 5 > 6 6 <pickup> 7 <SpeedPickup template= "speedboostpickup"/>7 <SpeedPickup template=smallspeedpickup /> 8 8 </pickup> 9 9 </PickupRepresentation> 10 <PickupRepresentation11 name="SpeedBoost"12 description="Speeds up the Ship for a certain time."13 spawnerTemplate="speedboostpickuprepresentation"14 >15 <pickup>16 <SpeedPickup template="speedboostpickup" />17 </pickup>18 </PickupRepresentation> -
code/branches/ppspickups1/data/levels/pickup_ppstest1.oxw
r6574 r6575 2 2 include("stats.oxo") 3 3 include("hudtemplates3.oxo") 4 ?> 4 5 6 <?lua 5 7 include("templates/spaceship_assff.oxt") 6 8 include("templates/spaceship_pirate.oxt") 7 --include("templates/pickup_representation_templates_speed.oxt")9 include("templates/pickup_representation_templates_speed.oxt") 8 10 ?> 9 11 10 12 <Level 11 name = "S peedPickupTest"12 description = " Test for the new Speed Pickup"13 name = "Sample" 14 description = "Just a few tests" 13 15 > 14 16 <Scene … … 20 22 include("includes/pickups_speed.oxi") 21 23 ?> 22 <!-- 23 <PickupSpawner position="- 100,0,-100" triggerDistance="10" respawnTime="30" maxSpawnedItems="10">24 25 <PickupSpawner position="-25,0,-100" triggerDistance="10" respawnTime="10" maxSpawnedItems="99"> 24 26 <pickup> 25 <SpeedPickup template= "speedboostpickup"/>27 <SpeedPickup template=smallspeedpickup /> 26 28 </pickup> 27 29 </PickupSpawner> 28 --> 30 31 29 32 <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" /> 30 33 <SpawnPoint position="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff /> 31 34 </Scene> 32 35 </Level> 33 <?lua34 include("stats.oxo")35 include("hudtemplates3.oxo")36 37 include("templates/spaceship_assff.oxt")38 include("templates/spaceship_pirate.oxt")39 -- include("templates/pickup_representation_templates_speed.oxt")40 ?>41 42 <Level43 name = "SpeedPickupTest"44 description = "Test for the new Speed Pickup"45 >46 <Scene47 ambientlight = "0.8, 0.8, 0.8"48 skybox = "Orxonox/Starbox"49 >50 51 <?lua52 include("includes/pickups_speed.oxi")53 ?>54 <!--55 <PickupSpawner position="-100,0,-100" triggerDistance="10" respawnTime="30" maxSpawnedItems="10">56 <pickup>57 <SpeedPickup template="speedboostpickup" />58 </pickup>59 </PickupSpawner>60 -->61 <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" />62 <SpawnPoint position="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />63 </Scene>64 </Level> -
code/branches/ppspickups1/data/levels/templates/pickup_representation_templates_speed.oxt
r6552 r6575 1 <Template name=s peedboostpickupRepresentation>1 <Template name=smallspeedpickupRepresentation> 2 2 <PickupRepresentation> 3 3 <spawner-representation> 4 4 <StaticEntity> 5 5 <attached> 6 <Billboard position="0,0,0" colour="1 ,0,0" material="Sphere2" scale=0.1>6 <Billboard position="0,0,0" colour="1.0,0.0,0.0" material="Sphere2" scale=0.1> 7 7 <attached> 8 <Billboard position="0,0,0" colour=" 0,1,0" material="Cross" scale=1/>8 <Billboard position="0,0,0" colour="1.0,1.0,0.0" material="Cross" scale=0.7 /> 9 9 </attached> 10 10 </Billboard> … … 15 15 </Template> 16 16 17 <Template name= "speedboostpickup">17 <Template name=smallspeedpickup> 18 18 <SpeedPickup 19 speedAddition = "0"20 speed Multiplier = "2"21 duration = "10"19 duration = 10 20 speedAdd = 1 21 SpeedMultiply = 1 22 22 activationType = "immediate" 23 23 durationType = "once" 24 24 /> 25 25 </Template> 26 <Template name=speedboostpickupRepresentation>27 <PickupRepresentation>28 <spawner-representation>29 <StaticEntity>30 <attached>31 <Billboard position="0,0,0" colour="1,0,0" material="Sphere2" scale=0.1>32 <attached>33 <Billboard position="0,0,0" colour="0,1,0" material="Cross" scale=1 />34 </attached>35 </Billboard>36 </attached>37 </StaticEntity>38 </spawner-representation>39 </PickupRepresentation>40 </Template>41 42 <Template name="speedboostpickup">43 <SpeedPickup44 speedAddition = "0"45 speedMultiplier = "2"46 duration = "10"47 activationType = "immediate"48 durationType = "once"49 />50 </Template> -
code/branches/ppspickups1/src/modules/pickup/items/SpeedPickup.cc
r6574 r6575 74 74 void SpeedPickup::initialize(void) 75 75 { 76 this->duration_ = 0 ;77 this->speedAdd_ = 0 ;78 this->speedMultiply_ = 0;76 this->duration_ = 0.0; 77 this->speedAdd_ = 0.0; 78 this->speedMultiply_ = 1.0; 79 79 80 80 this->addTarget(ClassIdentifier<Pawn>::getIdentifier()); … … 269 269 void SpeedPickup::setSpeedMultiply(float speedMultiply) 270 270 { 271 if(speedMultiply >0.0f)271 if(speedMultiply != 0.0f) 272 272 { 273 273 this->speedMultiply_ = speedMultiply; … … 276 276 { 277 277 COUT(1) << "Invalid speedMultiply in SpeedPickup." << std::endl; 278 this->speedMultiply_ = 0.0;278 this->speedMultiply_ = 1.0; 279 279 } 280 280 }
Note: See TracChangeset
for help on using the changeset viewer.