Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 4, 2016, 11:54:04 PM (8 years ago)
Author:
fvultier
Message:

A few modifications in the weapon system: WeaponModes may play a reload sound now. Fireing Sounds of WeaponModes may overlap now. New weapon: FlameGun, a flame thrower for close combat (e.g. for the FPS player)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/modules/weapons/projectiles/BasicProjectile.cc

    r11099 r11108  
    5454        this->bDestroy_ = false;
    5555
     56        // Default is destroying the projectile after collision
     57        this->destroyAfterCollision_ = true;
     58
    5659        // Default damage must be zero, otherwise it would be above zero if no settings are made in the weaponsettings xml file.
    5760        // same thing for all weaponmodes files
     
    8790                return false;
    8891
    89             this->bDestroy_ = true; // If something is hit, the object is destroyed and can't hit something else.
    90                                     // The projectile is destroyed by its tick()-function (in the following tick).
     92            if (getDestroyAfterCollision())
     93            {
     94                this->bDestroy_ = true; // If something is hit, the object is destroyed and can't hit something else.
     95                                        // The projectile is destroyed by its tick()-function (in the following tick).
     96                                        // TODO: Use destroyLater() for this
     97            }
    9198
    9299            Pawn* victim = orxonox_cast<Pawn*>(otherObject); // If otherObject isn't a Pawn, then victim is nullptr
Note: See TracChangeset for help on using the changeset viewer.