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:
Dylan Smith 2005-11-08 21:48:25 +00:00
parent 6003b0fe54
commit 8bbb1db7ff
6 changed files with 38 additions and 37 deletions

View File

@ -272,9 +272,9 @@
}
}
[gui setSelectedRow: highlightRowOnPage];
// show the first ship, this will be the selected row
[self showCommanderShip: highlightIdx];
highlightIdx = (highlightRowOnPage - STARTROW) + (currentPage * NUMROWS);
// show the first ship, this will be the selected row
[self showCommanderShip: highlightIdx];
}
@ -531,7 +531,7 @@
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];
@ -540,7 +540,7 @@
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];

View File

@ -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_RANGE_LIMIT 1000000000.0
#define LASER_FLASH_SIZE 1.0
#define LASER_FLASH_SIZE 1.0 + 2.0 * randf()
@class Entity;

View File

@ -635,6 +635,7 @@ static Vector circleVertex[65]; // holds vector coordinates for a unit circle
return self;
}
// used exclusively for explosion flashes
- (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);
//
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;
duration = 0.4;
@ -674,6 +677,7 @@ static Vector circleVertex[65]; // holds vector coordinates for a unit circle
return self;
}
// used for laser flashes
- (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
//
time_counter = 0.0;
duration = 0.4;
duration = 0.3;
position = fragPos;
//
[self setColor:flashColor];

View File

@ -129,7 +129,7 @@
<key>alloy</key>
<dict>
<key>ai_type</key>
<string>nullAI.plist</string>
<string>dumbAI.plist</string>
<key>bounty</key>
<integer>1</integer>
<key>cargo_type</key>
@ -600,12 +600,6 @@
<real>0.0</real>
<key>forward_weapon_type</key>
<string>WEAPON_NONE</string>
<key>has_ecm</key>
<false/>
<key>has_escape_pod</key>
<false/>
<key>has_scoop</key>
<false/>
<key>likely_cargo</key>
<integer>0</integer>
<key>max_cargo</key>
@ -3007,7 +3001,7 @@
<key>scarred-alloy</key>
<dict>
<key>ai_type</key>
<string>nullAI.plist</string>
<string>dumbAI.plist</string>
<key>bounty</key>
<integer>1</integer>
<key>cargo_type</key>

View File

@ -1905,7 +1905,7 @@ BOOL ship_canCollide (ShipEntity* ship)
{
ShipEntity* leadShip = (ShipEntity *)[universe entityForUniversalID:owner];
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;
else
desired_speed = max_flight_speed;
@ -5327,34 +5327,37 @@ Vector randomPositionInBoundingBox(BoundingBox bb)
{
ent = [(Entity *)[collidingEntities objectAtIndex:0] retain];
[collidingEntities removeObjectAtIndex:0];
if (ent->isShip)
if (ent)
{
other_ship = (ShipEntity *)ent;
[self collideWithShip:other_ship];
}
if (ent->isPlanet)
{
if (isPlayer)
if (ent->isShip)
{
[(PlayerEntity *)self getDestroyed];
return;
other_ship = (ShipEntity *)ent;
[self collideWithShip:other_ship];
}
[self becomeExplosion];
}
if (ent->isWormhole)
{
WormholeEntity* whole = (WormholeEntity*)ent;
if (isPlayer)
if (ent->isPlanet)
{
[(PlayerEntity*)self enterWormhole: whole];
return;
if (isPlayer)
{
[(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];
}
}

View File

@ -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);
break;
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;
}
return 1;