Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 27, 2017, 6:53:05 PM (7 years ago)
Author:
remartin
Message:

Solved pickup problem with tiny adaptation in Pawn.h and PickupSpawner.cc. Started work on SpicedAsteroidField.

Location:
code/branches/AsteroidMining_HS17/src/orxonox/worldentities/pawns
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/AsteroidMining_HS17/src/orxonox/worldentities/pawns/Pawn.cc

    r11176 r11609  
    8484        // set damage multiplier to default value 1, meaning nominal damage
    8585        this->damageMultiplier_ = 1;
     86        this->acceptsPickups_ = true;
    8687
    8788        this->spawnparticleduration_ = 3.0f;
  • code/branches/AsteroidMining_HS17/src/orxonox/worldentities/pawns/Pawn.h

    r11176 r11609  
    199199                { return this->damageMultiplier_; }
    200200
     201            // Some pawns can-t harvest pickups (e.g. AsteroidMinables). Checked in PickupSpawner.
     202            inline void setPickupAcceptance(bool b)
     203                { this->acceptsPickups_ = b; }
     204            inline bool doesAcceptPickups()
     205                { return this->acceptsPickups_;}
    201206
    202207            virtual void startLocalHumanControl() override;
     
    218223                { return this->weaponSystem_; }
    219224
    220             static void consoleCommand_debugDrawWeapons(bool bDraw);
     225            static void consoleCommand_debugDrawWeapons(bool bDraw);
     226
     227
    221228
    222229        protected:
     
    256263
    257264            float damageMultiplier_; ///< Used by the Damage Boost Pickup.
     265            bool acceptsPickups_; // Added for the asteroidMinable class, avoid that they attempt to grab the resources
    258266
    259267            WeakPtr<Pawn> lastHitOriginator_;
Note: See TracChangeset for help on using the changeset viewer.