Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 23, 2009, 7:28:48 PM (16 years ago)
Author:
rgrieder
Message:

Add a new core-feature: orxonox_cast<T>()
The functions casts objects like dynamic_cast, but uses the identifier instead for MSVC (much faster) and is just a redirection to dynamic_cast for GCC.
Also replaced almost all dynamic_casts (of course only those related to the class hierarchy).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core4/src/orxonox/objects/weaponsystem/projectiles/Projectile.cc

    r3196 r3223  
    126126                dmg = this->owner_->getPickups().processModifiers(ModifierType::Damage, dmg, false);
    127127
    128             Pawn* victim = dynamic_cast<Pawn*>(otherObject);
     128            Pawn* victim = orxonox_cast<Pawn>(otherObject);
    129129            if (victim)
    130130                victim->damage(dmg, this->owner_);
Note: See TracChangeset for help on using the changeset viewer.