- Timestamp:
- May 18, 2012, 2:58:33 PM (13 years ago)
- Location:
- code/branches/presentation2012
- Files:
-
- 9 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2012
- Property svn:mergeinfo changed
/code/branches/pickup2012 (added) merged: 9029,9099,9118-9119,9155,9184
- Property svn:mergeinfo changed
-
code/branches/presentation2012/data/levels/includes/pickups.oxi
r8713 r9195 210 210 </PickupRepresentation> 211 211 212 <!-- DamageBoost Pickup --> 213 214 <PickupRepresentation 215 pickupName = "Small DamageBoost Pickup" 216 pickupDescription = "Multiplies the ship damage with 2." 217 spawnerTemplate = "smalldamageboostpickupRepresentation" 218 inventoryRepresentation = "SmallDamageBoost" 219 > 220 <pickup> 221 <DamageBoostPickup template=smalldamageboostpickup /> 222 </pickup> 223 </PickupRepresentation> 224 225 <PickupRepresentation 226 pickupName = "Medium DamageBoost Pickup" 227 pickupDescription = "Multiplies the ship damage with 5." 228 spawnerTemplate = "mediumdamageboostpickupRepresentation" 229 inventoryRepresentation = "MediumDamageBoost" 230 > 231 <pickup> 232 <DamageBoostPickup template=mediumdamageboostpickup /> 233 </pickup> 234 </PickupRepresentation> 235 236 <PickupRepresentation 237 pickupName = "Large DamageBoost Pickup" 238 pickupDescription = "Multiplies the ship damage with 7." 239 spawnerTemplate = "largedamageboostpickupRepresentation" 240 inventoryRepresentation = "LargeDamageBoost" 241 > 242 <pickup> 243 <DamageBoostPickup template=largedamageboostpickup /> 244 </pickup> 245 </PickupRepresentation> 246 212 247 <!-- Shrink Pickup --> 213 248 -
code/branches/presentation2012/data/levels/pickups.oxw
r9016 r9195 168 168 </pickup> 169 169 </PickupSpawner> 170 171 <!-- DamageBoost pickup --> 172 173 <PickupSpawner position="-50,75,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10"> 174 <pickup> 175 <DamageBoostPickup template=smalldamageboostpickup /> 176 </pickup> 177 </PickupSpawner> 178 179 <PickupSpawner position="-50,100,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10"> 180 <pickup> 181 <DamageBoostPickup template=mediumdamageboostpickup /> 182 </pickup> 183 </PickupSpawner> 184 185 <PickupSpawner position="-50,125,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10"> 186 <pickup> 187 <DamageBoostPickup template=largedamageboostpickup /> 188 </pickup> 189 </PickupSpawner> 190 170 191 171 192 <!-- Other pickups --> … … 206 227 </pickup> 207 228 </PickupSpawner> 229 230 <!-- @Objects: 4 boxes (uncontrolled pawns) --> 231 <Pawn team=1 health=30 position="0,0,0" direction="0,-1,0" collisionType=dynamic mass=100000 name=box RVName = "Box 4" > 232 <events> 233 <visibility> 234 <EventListener event="flying4" /> 235 </visibility> 236 </events> 237 <attached> 238 <Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" /> 239 </attached> 240 <collisionShapes> 241 <BoxCollisionShape position="0,0,0" halfExtents="15,15,15" /> 242 </collisionShapes> 243 </Pawn> 244 245 <Pawn team=1 health=30 position="0,100,0" direction="0,-1,0" collisionType=dynamic mass=100000 name=box RVName = "Box 3"> 246 <events> 247 <visibility> 248 <EventListener event="flying4" /> 249 </visibility> 250 </events> 251 <attached> 252 <Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" /> 253 </attached> 254 <collisionShapes> 255 <BoxCollisionShape position="0,0,0" halfExtents="15,15,15" /> 256 </collisionShapes> 257 </Pawn> 258 259 <Pawn health=30 position="0,200,0" direction="0,-1,0" collisionType=dynamic mass=100000 name=box team=1 RVName = "Box 2"> 260 <events> 261 <visibility> 262 <EventListener event="flying4" /> 263 </visibility> 264 </events> 265 <attached> 266 <Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" /> 267 </attached> 268 <collisionShapes> 269 <BoxCollisionShape position="0,0,0" halfExtents="15,15,15" /> 270 </collisionShapes> 271 </Pawn> 272 273 <Pawn health=30 position="0,300,0" direction="0,-1,0" collisionType=dynamic mass=100000 name=box team=1 RVName = "Box 1"> 274 <events> 275 <visibility> 276 <EventListener event="flying4" /> 277 </visibility> 278 </events> 279 <attached> 280 <Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" /> 281 </attached> 282 <collisionShapes> 283 <BoxCollisionShape position="0,0,0" halfExtents="15,15,15" /> 284 </collisionShapes> 285 </Pawn> 208 286 209 287 <!--StaticEntity position="0,-200,0" direction="0,-1,0" collisionType=static mass=500 friction=0.01 > -
code/branches/presentation2012/data/levels/templates/pickupRepresentationTemplates.oxt
r8706 r9195 215 215 </PickupRepresentation> 216 216 </Template> 217 218 <!-- DamageBoost pickups --> 219 220 <Template name=smalldamageboostpickupRepresentation> 221 <PickupRepresentation> 222 <spawner-representation> 223 <StaticEntity> 224 <attached> 225 <Billboard position="0,0,0" colour="0.10,0.20,0.30" material="Sphere2" scale=0.1 > 226 <attached> 227 <Billboard position="0,0,0" colour="0.30,0.30,0.30" material="damageSmall" scale=0.7 /> 228 </attached> 229 </Billboard> 230 </attached> 231 </StaticEntity> 232 </spawner-representation> 233 </PickupRepresentation> 234 </Template> 235 236 <Template name=smalldamageboostpickup> 237 <DamageBoostPickup 238 duration = 10.0 239 damageMultiplier = 2.0 240 activationType = "immediate" 241 durationType = "continuous" 242 /> 243 </Template> 244 245 <Template name=mediumdamageboostpickupRepresentation> 246 <PickupRepresentation> 247 <spawner-representation> 248 <StaticEntity> 249 <attached> 250 <Billboard position="0,0,0" colour="0.10,0.20,0.30" material="Sphere2" scale=0.1 > 251 <attached> 252 <Billboard position="0,0,0" colour="0.30,0.30,0.30" material="damageMedium" scale=0.7 /> 253 </attached> 254 </Billboard> 255 </attached> 256 </StaticEntity> 257 </spawner-representation> 258 </PickupRepresentation> 259 </Template> 260 261 <Template name=mediumdamageboostpickup> 262 <DamageBoostPickup 263 duration = 10.0 264 damageMultiplier = 5.0 265 activationType = "immediate" 266 durationType = "continuous" 267 /> 268 </Template> 269 270 <Template name=largedamageboostpickupRepresentation> 271 <PickupRepresentation> 272 <spawner-representation> 273 <StaticEntity> 274 <attached> 275 <Billboard position="0,0,0" colour="0.10,0.20,0.30" material="Sphere2" scale=0.1 > 276 <attached> 277 <Billboard position="0,0,0" colour="0.30,0.30,0.30" material="damageLarge" scale=0.7 /> 278 </attached> 279 </Billboard> 280 </attached> 281 </StaticEntity> 282 </spawner-representation> 283 </PickupRepresentation> 284 </Template> 285 286 <Template name=largedamageboostpickup> 287 <DamageBoostPickup 288 duration = 10.0 289 damageMultiplier = 7.0 290 activationType = "immediate" 291 durationType = "continuous" 292 /> 293 </Template> 294 217 295 218 296 <!-- Speed pickups --> -
code/branches/presentation2012/src/modules/pickup/PickupPrereqs.h
r8706 r9195 86 86 class ShieldPickup; 87 87 class ShrinkPickup; 88 88 class DamageBoostPickup; 89 89 } 90 90 -
code/branches/presentation2012/src/modules/pickup/items/CMakeLists.txt
r8706 r9195 7 7 ShieldPickup.cc 8 8 ShrinkPickup.cc 9 DamageBoostPickup.cc 9 10 ) -
code/branches/presentation2012/src/modules/pickup/items/SpeedPickup.h
r8727 r9195 112 112 private: 113 113 void initialize(void); //!< Initializes the member variables. 114 SpaceShip* carrierToSpaceShipHelper(void); //!< Helper to transform the PickupCarrier to a SpaceS Hip, and throw an error message if the conversion fails.114 SpaceShip* carrierToSpaceShipHelper(void); //!< Helper to transform the PickupCarrier to a SpaceShip, and throw an error message if the conversion fails. 115 115 116 116 Timer durationTimer_; //!< Timer. -
code/branches/presentation2012/src/orxonox/worldentities/pawns/Pawn.cc
r9016 r9195 75 75 this->lastHitOriginator_ = 0; 76 76 77 // set damage multiplier to default value 1, meaning nominal damage 78 this->damageMultiplier_ = 1; 79 77 80 this->spawnparticleduration_ = 3.0f; 78 81 … … 228 231 void Pawn::damage(float damage, float healthdamage, float shielddamage, Pawn* originator) 229 232 { 230 if (this->getGametype() && this->getGametype()->allowPawnDamage(this, originator)) 233 //Applies multiplier given by the DamageBoost Pickup. 234 Pawn *test = dynamic_cast<Pawn *>(originator); 235 if( test != NULL ) 236 { 237 damage *= originator->getDamageMultiplier(); 238 } 239 240 if (this->getGametype() && this->getGametype()->allowPawnDamage(this, originator)) 231 241 { 232 242 if (shielddamage >= this->getShieldHealth()) -
code/branches/presentation2012/src/orxonox/worldentities/pawns/Pawn.h
r9016 r9195 162 162 { return this->numexplosionchunks_; } 163 163 164 // These are used with the Damage Boost Pickup to use the damage multiplier. 165 inline void setDamageMultiplier(float multiplier) 166 { this->damageMultiplier_ = multiplier; } 167 inline float getDamageMultiplier() 168 { return this->damageMultiplier_; } 169 170 164 171 virtual void startLocalHumanControl(); 165 172 … … 208 215 float reloadWaitCountdown_; 209 216 217 // Modifier 218 float damageMultiplier_; // Used by the Damage Boost Pickup. 219 210 220 WeakPtr<Pawn> lastHitOriginator_; 211 221
Note: See TracChangeset
for help on using the changeset viewer.