Non functional changes to float and double (and a few other types) to make it clearer what is going on with casts and coercion. Most ship entity math is done with floats, so prefer floats over doubles

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1664 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
cmdrjames 2008-05-31 11:25:06 +00:00
parent 189e8e7eaa
commit 1c5949869a
2 changed files with 18 additions and 17 deletions

View File

@ -38,41 +38,41 @@ MA 02110-1301, USA.
#define RAIDER_MAX_CARGO 5 #define RAIDER_MAX_CARGO 5
#define MERCHANTMAN_MAX_CARGO 125 #define MERCHANTMAN_MAX_CARGO 125
#define LAUNCH_DELAY 2.0 #define LAUNCH_DELAY 2.0f
#define PIRATES_PREFER_PLAYER YES #define PIRATES_PREFER_PLAYER YES
#define TURRET_MINIMUM_COS 0.20 #define TURRET_MINIMUM_COS 0.20f
#define AFTERBURNER_BURNRATE 0.25 #define AFTERBURNER_BURNRATE 0.25f
#define AFTERBURNER_NPC_BURNRATE 1.0 #define AFTERBURNER_NPC_BURNRATE 1.0f
#define AFTERBURNER_TIME_PER_FUEL 4.0 #define AFTERBURNER_TIME_PER_FUEL 4.0f
#define CLOAKING_DEVICE_ENERGY_RATE 12.8 #define CLOAKING_DEVICE_ENERGY_RATE 12.8f
#define CLOAKING_DEVICE_MIN_ENERGY 128 #define CLOAKING_DEVICE_MIN_ENERGY 128
#define CLOAKING_DEVICE_START_ENERGY 0.75 #define CLOAKING_DEVICE_START_ENERGY 0.75f
#define MILITARY_JAMMER_ENERGY_RATE 3 #define MILITARY_JAMMER_ENERGY_RATE 3
#define MILITARY_JAMMER_MIN_ENERGY 128 #define MILITARY_JAMMER_MIN_ENERGY 128
#define COMBAT_IN_RANGE_FACTOR 0.035 #define COMBAT_IN_RANGE_FACTOR 0.035f
#define COMBAT_OUT_RANGE_FACTOR 0.500 #define COMBAT_OUT_RANGE_FACTOR 0.500f
#define COMBAT_WEAPON_RANGE_FACTOR 1.200 #define COMBAT_WEAPON_RANGE_FACTOR 1.200f
#define SHIP_COOLING_FACTOR 1.0 #define SHIP_COOLING_FACTOR 1.0f
#define SHIP_INSULATION_FACTOR 0.00175 #define SHIP_INSULATION_FACTOR 0.00175f
#define SHIP_MAX_CABIN_TEMP 256.0 #define SHIP_MAX_CABIN_TEMP 256.0f
#define SHIP_MIN_CABIN_TEMP 60.0 #define SHIP_MIN_CABIN_TEMP 60.0f
#define EJECTA_TEMP_FACTOR 0.85 // Ejected items have 85% of parent's temperature #define EJECTA_TEMP_FACTOR 0.85f // Ejected items have 85% of parent's temperature
#define SUN_TEMPERATURE 1250.0 #define SUN_TEMPERATURE 1250.0f
#define MAX_ESCORTS 16 #define MAX_ESCORTS 16
#define ESCORT_SPACING_FACTOR 3.0 #define ESCORT_SPACING_FACTOR 3.0
#define SHIPENTITY_MAX_MISSILES 16 #define SHIPENTITY_MAX_MISSILES 16
#define TURRET_SHOT_SPEED 2000.0 #define TURRET_SHOT_SPEED 2000.0f
#define TRACTOR_FORCE 2500.0f #define TRACTOR_FORCE 2500.0f

View File

@ -3235,6 +3235,7 @@ static GLfloat mascem_color2[4] = { 0.4, 0.1, 0.4, 1.0}; // purple
- (BOOL)isPolice - (BOOL)isPolice
{ {
//bounty hunters have a police role, but are not police, so we must test by scan class, not by role
return [self scanClass] == CLASS_POLICE; return [self scanClass] == CLASS_POLICE;
} }