Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9118


Ignore:
Timestamp:
Apr 27, 2012, 2:36:52 PM (12 years ago)
Author:
lkevin
Message:

First working version. Default damage increase is
currently set to 20. Now fixing things and documenting.

Location:
code/branches/pickup2012
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pickup2012/data/levels/pickups.oxw

    r9016 r9118  
    168168      </pickup>
    169169    </PickupSpawner>
     170   
     171    <!-- DamageBoost pickup -->
     172   
     173    <PickupSpawner position="-100,300,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10">
     174      <pickup>
     175        <DamageBoostPickup template=normaldamageboostpickup />
     176      </pickup>
     177    </PickupSpawner>
     178   
    170179   
    171180    <!-- Other pickups -->
     
    206215      </pickup>
    207216    </PickupSpawner>
     217   
     218    <!-- @Objects: 4 boxes (uncontrolled pawns) -->
     219    <Pawn team=1 health=30 position="0,0,0" direction="0,-1,0" collisionType=dynamic mass=100000 name=box RVName = "Box 4" >
     220        <events>
     221          <visibility>
     222            <EventListener event="flying4" />
     223          </visibility>
     224        </events>
     225        <attached>
     226            <Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" />
     227        </attached>
     228        <collisionShapes>
     229            <BoxCollisionShape position="0,0,0" halfExtents="15,15,15" />
     230        </collisionShapes>
     231    </Pawn>
     232
     233    <Pawn team=1 health=30 position="0,100,0" direction="0,-1,0" collisionType=dynamic mass=100000 name=box RVName = "Box 3">
     234        <events>
     235          <visibility>
     236            <EventListener event="flying4" />
     237          </visibility>
     238        </events>
     239        <attached>
     240           <Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" />
     241        </attached>
     242        <collisionShapes>
     243            <BoxCollisionShape position="0,0,0" halfExtents="15,15,15" />
     244        </collisionShapes>
     245    </Pawn>
     246
     247    <Pawn health=30 position="0,200,0" direction="0,-1,0" collisionType=dynamic mass=100000 name=box team=1 RVName = "Box 2">
     248        <events>
     249          <visibility>
     250            <EventListener event="flying4" />
     251          </visibility>
     252        </events>
     253        <attached>
     254           <Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" />
     255        </attached>
     256        <collisionShapes>
     257            <BoxCollisionShape position="0,0,0" halfExtents="15,15,15" />
     258        </collisionShapes>
     259    </Pawn>
     260
     261    <Pawn health=30 position="0,300,0" direction="0,-1,0" collisionType=dynamic mass=100000 name=box team=1 RVName = "Box 1">
     262        <events>
     263          <visibility>
     264            <EventListener event="flying4" />
     265          </visibility>
     266        </events>
     267        <attached>
     268            <Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" />
     269        </attached>
     270        <collisionShapes>
     271           <BoxCollisionShape position="0,0,0" halfExtents="15,15,15" />
     272        </collisionShapes>
     273    </Pawn>
    208274
    209275    <!--StaticEntity position="0,-200,0" direction="0,-1,0" collisionType=static mass=500 friction=0.01 >
  • code/branches/pickup2012/data/levels/templates/pickupRepresentationTemplates.oxt

    r9099 r9118  
    225225                    <Billboard position="0,0,0" colour="0.99,0.96,0.52" material="Sphere2" scale=0.5>
    226226                        <attached>
    227                             <Billboard position="0,0,0" colour="0.98,0.94,0.22" material="asterisk" scale=0.5 />
    228                         </attached>
    229                     </Billboard>
    230                 </attached>
    231             </StaticEntity>
    232         </spawner-representation>
    233     </PickupRepresentation>
    234 </Template>
    235 
    236 <Template name=smallspeedpickup>
    237   <SpeedPickup
     227                            <Billboard position="0,0,0" colour="0.98,0.94,0.22" material="3arrowsup" scale=0.5 />
     228                        </attached>
     229                    </Billboard>
     230                </attached>
     231            </StaticEntity>
     232        </spawner-representation>
     233    </PickupRepresentation>
     234</Template>
     235
     236<Template name=normaldamageboostpickup>
     237  <DamageBoostPickup
    238238    duration = 10.0
    239     damageBoost = damageBoost*2
    240239    activationType = "immediate"
    241240    durationType = "continuous"
  • code/branches/pickup2012/src/orxonox/worldentities/pawns/Pawn.cc

    r9099 r9118  
    232232    {
    233233        // apply multiplier
    234         damage *= originator->getDamageMultiplier();
     234        Pawn *test = dynamic_cast<Pawn *>(originator);
     235        if( test != NULL )
     236          damage *= originator->getDamageMultiplier();
    235237
    236238        if (this->getGametype() && this->getGametype()->allowPawnDamage(this, originator))
Note: See TracChangeset for help on using the changeset viewer.