| 875 | |
| 876 | |
| 877 | bool Projectile::onNewDataBlock( GameBaseData *dptr, bool reload ) |
| 878 | { |
| 879 | mDataBlock = dynamic_cast<ProjectileData*>( dptr ); |
| 880 | if ( !mDataBlock || !Parent::onNewDataBlock( dptr, reload ) ) |
| 881 | return false; |
| 882 | |
| 883 | if ( isGhost() ) |
| 884 | { |
| 885 | // Create the sound ahead of time. This reduces runtime |
| 886 | // costs and makes the system easier to understand. |
| 887 | |
| 888 | SFX_DELETE( mSound ); |
| 889 | |
| 890 | if ( mDataBlock->getProjectileSound() ) |
| 891 | mSound = SFX->createSource( mDataBlock->getProjectileSoundProfile() ); |
| 892 | } |
| 893 | |
| 894 | return true; |
| 895 | } |
| 896 | |
| 897 | void Projectile::submitLights( LightManager *lm, bool staticLighting ) |
| 898 | { |
no test coverage detected