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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/AsteroidMining_HS17/src/modules/pickup/PickupSpawner.cc

    r11103 r11609  
    158158            for(Pawn* pawn : ObjectList<Pawn>())
    159159            {
    160                 if(spawner == nullptr) // Stop if the PickupSpawner has been deleted (e.g. because it has run out of pickups to distribute).
     160                // Stop if the PickupSpawner has been deleted (e.g. because it has run out of pickups to distribute). 2nd condition prevents a possible error in isTarget(...) below.
     161                if(spawner == nullptr || this->pickup_ == nullptr)
    161162                    break;
     163
     164                if(!(pawn->doesAcceptPickups())){continue;} // skip those pawns, e.g. AsteroidMinables.
    162165
    163166                Vector3 distance = pawn->getWorldPosition() - this->getWorldPosition();
Note: See TracChangeset for help on using the changeset viewer.