Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 7, 2015, 4:06:37 PM (8 years ago)
Author:
gania
Message:

fix for sigsegv?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/campaignHS15/src/orxonox/controllers/CommonController.h

    r10885 r10946  
    3131
    3232
    33 #include "controllers/Controller.h"
    34 #include <limits>
     33#include "controllers/Controller.h"                 //that's what I inherit from
    3534
    36 #include "worldentities/ControllableEntity.h"
    37 #include "worldentities/pawns/Pawn.h"
     35#include <limits>                                   //I use limits pretty much in every class, so might as well include it in the parent class
     36
     37#include "worldentities/ControllableEntity.h"       //same for ControllableEntity
     38#include "worldentities/pawns/Pawn.h"               //and Pawn
    3839
    3940
     
    4445
    4546        public:
    46             static const float ACTION_INTERVAL = 1.0f;
    47 
    48             static const float hardcoded_projectile_speed = 750;
     47            static const float hardcoded_projectile_speed = 750;        //<! FightingController uses it to predict enemy position
    4948
    5049            CommonController(Context* context);
     
    5251
    5352            static float randomInRange(float a, float b);
    54             static float distance(ControllableEntity* entity1, ControllableEntity* entity2);
     53            static float distance(const ControllableEntity* entity1, const ControllableEntity* entity2);
    5554            static bool sameTeam (ControllableEntity* entity1, ControllableEntity* entity2, Gametype* gt);
    56             static bool isLooking( ControllableEntity* entityThatLooks, ControllableEntity* entityBeingLookedAt, float angle ) ;
    57             static std::string getName( Pawn* entity ) ;           
     55            static bool isLooking(const ControllableEntity* entityThatLooks, const ControllableEntity* entityBeingLookedAt, float angle ) ;
     56            static std::string getName(const Pawn* entity ) ;           
    5857    };
    5958}
Note: See TracChangeset for help on using the changeset viewer.