OS X r1116
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@192 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
parent
6003b0fe54
commit
8bbb1db7ff
10
LoadSave.m
10
LoadSave.m
@ -272,9 +272,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
[gui setSelectedRow: highlightRowOnPage];
|
[gui setSelectedRow: highlightRowOnPage];
|
||||||
|
highlightIdx = (highlightRowOnPage - STARTROW) + (currentPage * NUMROWS);
|
||||||
// show the first ship, this will be the selected row
|
// show the first ship, this will be the selected row
|
||||||
[self showCommanderShip: highlightIdx];
|
[self showCommanderShip: highlightIdx];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -531,7 +531,7 @@
|
|||||||
|
|
||||||
if ([cdr objectForKey:@"isFolder"])
|
if ([cdr objectForKey:@"isFolder"])
|
||||||
{
|
{
|
||||||
NSString *folderDesc=[NSString stringWithFormat: @"Hold Ctrl and press return to open folder: %@", [(NSString *)[cdr objectForKey:@"saved_game_path"] lastPathComponent]];
|
NSString *folderDesc=[NSString stringWithFormat: @"Hold command and press return to open folder: %@", [(NSString *)[cdr objectForKey:@"saved_game_path"] lastPathComponent]];
|
||||||
|
|
||||||
[gui addLongText: folderDesc startingAtRow: CDRDESCROW align: GUI_ALIGN_LEFT];
|
[gui addLongText: folderDesc startingAtRow: CDRDESCROW align: GUI_ALIGN_LEFT];
|
||||||
|
|
||||||
@ -540,7 +540,7 @@
|
|||||||
|
|
||||||
if ([cdr objectForKey:@"isParentFolder"])
|
if ([cdr objectForKey:@"isParentFolder"])
|
||||||
{
|
{
|
||||||
NSString *folderDesc=[NSString stringWithFormat: @"Hold Ctrl and press return to open parent folder: %@", [(NSString *)[cdr objectForKey:@"saved_game_path"] lastPathComponent]];
|
NSString *folderDesc=[NSString stringWithFormat: @"Hold command and press return to open parent folder: %@", [(NSString *)[cdr objectForKey:@"saved_game_path"] lastPathComponent]];
|
||||||
|
|
||||||
[gui addLongText: folderDesc startingAtRow: CDRDESCROW align: GUI_ALIGN_LEFT];
|
[gui addLongText: folderDesc startingAtRow: CDRDESCROW align: GUI_ALIGN_LEFT];
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ Your fair use and other rights are in no way affected by the above.
|
|||||||
#define PARTICLE_LASER_LENGTH 10000.0
|
#define PARTICLE_LASER_LENGTH 10000.0
|
||||||
#define PARTICLE_LASER_RANGE_LIMIT 1000000000.0
|
#define PARTICLE_LASER_RANGE_LIMIT 1000000000.0
|
||||||
|
|
||||||
#define LASER_FLASH_SIZE 1.0
|
#define LASER_FLASH_SIZE 1.0 + 2.0 * randf()
|
||||||
|
|
||||||
@class Entity;
|
@class Entity;
|
||||||
|
|
||||||
|
@ -635,6 +635,7 @@ static Vector circleVertex[65]; // holds vector coordinates for a unit circle
|
|||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// used exclusively for explosion flashes
|
||||||
- (id) initFlashSize:(GLfloat) flashSize FromPosition:(Vector) fragPos
|
- (id) initFlashSize:(GLfloat) flashSize FromPosition:(Vector) fragPos
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
@ -648,6 +649,8 @@ static Vector circleVertex[65]; // holds vector coordinates for a unit circle
|
|||||||
size = NSMakeSize( flashSize, flashSize);
|
size = NSMakeSize( flashSize, flashSize);
|
||||||
//
|
//
|
||||||
growth_rate = 150.0 * flashSize; // if average flashSize is 80 then this is 12000
|
growth_rate = 150.0 * flashSize; // if average flashSize is 80 then this is 12000
|
||||||
|
if (growth_rate < 6000.0)
|
||||||
|
growth_rate = 6000.0; // put a minimum size on it
|
||||||
//
|
//
|
||||||
time_counter = 0.0;
|
time_counter = 0.0;
|
||||||
duration = 0.4;
|
duration = 0.4;
|
||||||
@ -674,6 +677,7 @@ static Vector circleVertex[65]; // holds vector coordinates for a unit circle
|
|||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// used for laser flashes
|
||||||
- (id) initFlashSize:(GLfloat) flashSize FromPosition:(Vector) fragPos Color:(NSColor*) flashColor
|
- (id) initFlashSize:(GLfloat) flashSize FromPosition:(Vector) fragPos Color:(NSColor*) flashColor
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
@ -689,7 +693,7 @@ static Vector circleVertex[65]; // holds vector coordinates for a unit circle
|
|||||||
growth_rate = 150.0 * flashSize; // if average flashSize is 80 then this is 12000
|
growth_rate = 150.0 * flashSize; // if average flashSize is 80 then this is 12000
|
||||||
//
|
//
|
||||||
time_counter = 0.0;
|
time_counter = 0.0;
|
||||||
duration = 0.4;
|
duration = 0.3;
|
||||||
position = fragPos;
|
position = fragPos;
|
||||||
//
|
//
|
||||||
[self setColor:flashColor];
|
[self setColor:flashColor];
|
||||||
|
@ -129,7 +129,7 @@
|
|||||||
<key>alloy</key>
|
<key>alloy</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>ai_type</key>
|
<key>ai_type</key>
|
||||||
<string>nullAI.plist</string>
|
<string>dumbAI.plist</string>
|
||||||
<key>bounty</key>
|
<key>bounty</key>
|
||||||
<integer>1</integer>
|
<integer>1</integer>
|
||||||
<key>cargo_type</key>
|
<key>cargo_type</key>
|
||||||
@ -600,12 +600,6 @@
|
|||||||
<real>0.0</real>
|
<real>0.0</real>
|
||||||
<key>forward_weapon_type</key>
|
<key>forward_weapon_type</key>
|
||||||
<string>WEAPON_NONE</string>
|
<string>WEAPON_NONE</string>
|
||||||
<key>has_ecm</key>
|
|
||||||
<false/>
|
|
||||||
<key>has_escape_pod</key>
|
|
||||||
<false/>
|
|
||||||
<key>has_scoop</key>
|
|
||||||
<false/>
|
|
||||||
<key>likely_cargo</key>
|
<key>likely_cargo</key>
|
||||||
<integer>0</integer>
|
<integer>0</integer>
|
||||||
<key>max_cargo</key>
|
<key>max_cargo</key>
|
||||||
@ -3007,7 +3001,7 @@
|
|||||||
<key>scarred-alloy</key>
|
<key>scarred-alloy</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>ai_type</key>
|
<key>ai_type</key>
|
||||||
<string>nullAI.plist</string>
|
<string>dumbAI.plist</string>
|
||||||
<key>bounty</key>
|
<key>bounty</key>
|
||||||
<integer>1</integer>
|
<integer>1</integer>
|
||||||
<key>cargo_type</key>
|
<key>cargo_type</key>
|
||||||
|
45
ShipEntity.m
45
ShipEntity.m
@ -1905,7 +1905,7 @@ BOOL ship_canCollide (ShipEntity* ship)
|
|||||||
{
|
{
|
||||||
ShipEntity* leadShip = (ShipEntity *)[universe entityForUniversalID:owner];
|
ShipEntity* leadShip = (ShipEntity *)[universe entityForUniversalID:owner];
|
||||||
double eta = (distance - desired_range) / flight_speed;
|
double eta = (distance - desired_range) / flight_speed;
|
||||||
if ((eta < 5.0)&&(leadShip->isShip))
|
if ((eta < 5.0)&&(leadShip)&&(leadShip->isShip))
|
||||||
desired_speed = [leadShip flight_speed] * 1.25;
|
desired_speed = [leadShip flight_speed] * 1.25;
|
||||||
else
|
else
|
||||||
desired_speed = max_flight_speed;
|
desired_speed = max_flight_speed;
|
||||||
@ -5327,34 +5327,37 @@ Vector randomPositionInBoundingBox(BoundingBox bb)
|
|||||||
{
|
{
|
||||||
ent = [(Entity *)[collidingEntities objectAtIndex:0] retain];
|
ent = [(Entity *)[collidingEntities objectAtIndex:0] retain];
|
||||||
[collidingEntities removeObjectAtIndex:0];
|
[collidingEntities removeObjectAtIndex:0];
|
||||||
if (ent->isShip)
|
if (ent)
|
||||||
{
|
{
|
||||||
other_ship = (ShipEntity *)ent;
|
if (ent->isShip)
|
||||||
[self collideWithShip:other_ship];
|
|
||||||
}
|
|
||||||
if (ent->isPlanet)
|
|
||||||
{
|
|
||||||
if (isPlayer)
|
|
||||||
{
|
{
|
||||||
[(PlayerEntity *)self getDestroyed];
|
other_ship = (ShipEntity *)ent;
|
||||||
return;
|
[self collideWithShip:other_ship];
|
||||||
}
|
}
|
||||||
[self becomeExplosion];
|
if (ent->isPlanet)
|
||||||
}
|
|
||||||
if (ent->isWormhole)
|
|
||||||
{
|
|
||||||
WormholeEntity* whole = (WormholeEntity*)ent;
|
|
||||||
if (isPlayer)
|
|
||||||
{
|
{
|
||||||
[(PlayerEntity*)self enterWormhole: whole];
|
if (isPlayer)
|
||||||
return;
|
{
|
||||||
|
[(PlayerEntity *)self getDestroyed];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
[self becomeExplosion];
|
||||||
}
|
}
|
||||||
else
|
if (ent->isWormhole)
|
||||||
{
|
{
|
||||||
[whole suckInShip: self];
|
WormholeEntity* whole = (WormholeEntity*)ent;
|
||||||
|
if (isPlayer)
|
||||||
|
{
|
||||||
|
[(PlayerEntity*)self enterWormhole: whole];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[whole suckInShip: self];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
[ent release];
|
||||||
}
|
}
|
||||||
[ent release];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3103,7 +3103,7 @@ Your fair use and other rights are in no way affected by the above.
|
|||||||
return 1 + (ranrot_rand() % 6) + (ranrot_rand() % 6) + (ranrot_rand() % 6);
|
return 1 + (ranrot_rand() % 6) + (ranrot_rand() % 6) + (ranrot_rand() % 6);
|
||||||
break;
|
break;
|
||||||
case 2 : // GRAMS
|
case 2 : // GRAMS
|
||||||
return 1 + (ranrot_rand() % 6) + (ranrot_rand() % 6);
|
return 4 + 3 * (ranrot_rand() % 6) + 2 * (ranrot_rand() % 6) + (ranrot_rand() % 6);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user