Merge branch 'master' of github.com:OoliteProject/oolite into steady-state-ecosystem
This commit is contained in:
commit
d7b187db22
2
.gitignore
vendored
2
.gitignore
vendored
@ -22,7 +22,9 @@ deps/Cocoa-deps/sparkle
|
||||
build/
|
||||
oolite.app
|
||||
obj.spk
|
||||
obj.win.spk
|
||||
obj.spk.dbg
|
||||
obj.win.spk.dbg
|
||||
DebugOXP/requires.plist
|
||||
AddOns/
|
||||
|
||||
|
@ -85,7 +85,7 @@ The entire source code of the library can be downloaded from ftp://anonymous@ftp
|
||||
4. eSpeak v1.43.03 (Windows)
|
||||
|
||||
- The libespeak.dll has been custom-built for the Windows port of Oolite to enable asynchronous playback and to also default the eSpeak data files folder to Resources/espeak-data. The source files that need to be changed for this to happen can be found inside deps/Windows-x86-deps/OOeSpeakWin32DLLBuild. The instructions for building this library, for those interested, are as follows:
|
||||
- You will need to have OoliteDevelopmentEnvironment - Light Edition installed, downloadable from http://terrastorage.ath.cx/Marmagka/c0a11a8fe8b5124823a91ff1d90065ff/OoliteDevelopmentEnvironment_LE_20110212.zip. Instructions for setting it up can be found at http://www.aegidian.org/bb/viewtopic.php?t=5943.
|
||||
- You will need to have OoliteDevelopmentEnvironment - Light Edition installed, downloadable from http://terrastorage.dyndns.info/Marmagka/c0a11a8fe8b5124823a91ff1d90065ff/OoliteDevelopmentEnvironment_LE_20110212.zip. Instructions for setting it up can be found at http://www.aegidian.org/bb/viewtopic.php?t=5943.
|
||||
- Download espeak-1.43.03-source.zip from http://espeak.sourceforge.net/download.html
|
||||
- Unzip the file to a folder of choice, maintaining the directory structure. We'll refer to this folder as <espeakSourceFolder>.
|
||||
- Copy the files
|
||||
|
@ -20,9 +20,9 @@ ifeq ($(GNUSTEP_HOST_OS),mingw32)
|
||||
endif
|
||||
ADDITIONAL_INCLUDE_DIRS = -Ideps/Windows-x86-deps/include -I$(JS_INC_DIR) -Isrc/SDL -Isrc/Core -Isrc/BSDCompat -Isrc/Core/Scripting -Isrc/Core/Materials -Isrc/Core/Entities -Isrc/Core/OXPVerifier -Isrc/Core/Debug -Isrc/Core/Tables
|
||||
ADDITIONAL_OBJC_LIBS = -lglu32 -lopengl32 -lpng14.dll -lmingw32 -lSDLmain -lSDL -lSDL_mixer -lgnustep-base -l$(JS_IMPORT_LIBRARY) -lwinmm -mwindows
|
||||
ADDITIONAL_CFLAGS = -DWIN32 -DNEED_STRLCPY `sdl-config --cflags`
|
||||
ADDITIONAL_CFLAGS = -DWIN32 -DNEED_STRLCPY `sdl-config --cflags` -mtune=generic
|
||||
# note the vpath stuff above isn't working for me, so adding src/SDL and src/Core explicitly
|
||||
ADDITIONAL_OBJCFLAGS = -DLOADSAVEGUI -DWIN32 -DXP_WIN -Wno-import -std=gnu99 `sdl-config --cflags`
|
||||
ADDITIONAL_OBJCFLAGS = -DLOADSAVEGUI -DWIN32 -DXP_WIN -Wno-import -std=gnu99 `sdl-config --cflags` -mtune=generic
|
||||
ADDITIONAL_LDFLAGS += -Wl,--large-address-aware
|
||||
oolite_LIB_DIRS += -L$(GNUSTEP_LOCAL_ROOT)/lib -Ldeps/Windows-x86-deps/lib -L$(JS_LIB_DIR)
|
||||
ifeq ($(ESPEAK),yes)
|
||||
|
12
Makefile
12
Makefile
@ -7,7 +7,14 @@ VER_MIN := $(shell echo "${VERSION}" | cut -d '.' -f 2)
|
||||
VER_REV := $(shell echo "${VERSION}" | cut -d '.' -f 3)
|
||||
VER_REV := $(if ${VER_REV},${VER_REV},0)
|
||||
VER_DATE := $(shell date +%y%m%d)
|
||||
VER := $(shell echo "${VER_MAJ}.${VER_MIN}.${VER_REV}-${VER_DATE}")
|
||||
# VER_GITREV: Make sure git is in the command path
|
||||
# VER_GITREV is the count of commits since the establishment of the repository on github. Used
|
||||
# as replacement for SVN incremental revision number, since we require the version number to be
|
||||
# of format X.X.X.X.
|
||||
# VER_GITHASH are the first ten digits of the actual hash of the commit being built.
|
||||
VER_GITREV := $(shell git rev-list --count HEAD)
|
||||
VER_GITHASH := $(shell git rev-parse --short=10 HEAD)
|
||||
VER := $(shell echo "${VER_MAJ}.${VER_MIN}.${VER_REV}.${VER_GITREV}-${VER_DATE}")
|
||||
BUILDTIME := $(shell date "+%Y.%m.%d %H:%M")
|
||||
DEB_BUILDTIME := $(shell date "+%a, %d %b %Y %H:%M:%S %z")
|
||||
ifeq (${VER_REV},0)
|
||||
@ -189,7 +196,8 @@ ${NSISVERSIONS}:
|
||||
@echo "!define VER_MAJ ${VER_MAJ}" >> $@
|
||||
@echo "!define VER_MIN ${VER_MIN}" >> $@
|
||||
@echo "!define VER_REV ${VER_REV}" >> $@
|
||||
@echo "!define SVNREV ${SVNREVISION}" >> $@
|
||||
@echo "!define VER_GITREV ${VER_GITREV}" >> $@
|
||||
@echo "!define VER_GITHASH ${VER_GITHASH}" >> $@
|
||||
@echo "!define VERSION ${VER}" >> $@
|
||||
@echo "!define BUILDTIME \"${BUILDTIME}\"" >> $@
|
||||
|
||||
|
@ -130,8 +130,6 @@
|
||||
display.mode.unknown = $error;
|
||||
display.initGL = no;
|
||||
|
||||
display.macLegacy = no; // TEMP
|
||||
|
||||
effectData.load.progress = no;
|
||||
effectData.load.done = no;
|
||||
|
||||
|
@ -42,6 +42,15 @@
|
||||
*/
|
||||
//shield_charge_energybank_threshold = 0.75;
|
||||
|
||||
/* The sun colour affects the lighting on the start up ship
|
||||
* parade. Therefore, give the initial system a neutral lighting
|
||||
* colour. */
|
||||
"0 7" =
|
||||
{
|
||||
// Lave
|
||||
sun_color = "1.0 1.0 1.0";
|
||||
};
|
||||
|
||||
/* Worlds with "pink oceans" or "vast oceans" according to system
|
||||
description. "Unusual oceans" are ignored.
|
||||
In theory, oceans could also be "ancient", "great", "funny", "weird",
|
||||
|
@ -40,12 +40,15 @@ this.version = "1.79";
|
||||
|
||||
this.startUp = this.shipWillExitWitchspace = function()
|
||||
{
|
||||
system.mainStation.setInterface("oolite-registership",{
|
||||
title: expandMissionText("oolite-registership-interface-title"),
|
||||
category: expandMissionText("oolite-registership-interface-category"),
|
||||
summary: expandMissionText("oolite-registership-interface-summary"),
|
||||
callback: this._registerShip.bind(this)
|
||||
});
|
||||
if (system.mainStation)
|
||||
{
|
||||
system.mainStation.setInterface("oolite-registership",{
|
||||
title: expandMissionText("oolite-registership-interface-title"),
|
||||
category: expandMissionText("oolite-registership-interface-category"),
|
||||
summary: expandMissionText("oolite-registership-interface-summary"),
|
||||
callback: this._registerShip.bind(this)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
2
deps/Linux-deps
vendored
2
deps/Linux-deps
vendored
@ -1 +1 @@
|
||||
Subproject commit 04e01b3eccb9e174e6821c8f7cbb0d08e9304466
|
||||
Subproject commit e741062d81dd799c19b8b168d87aaa45f591a9dd
|
@ -10,9 +10,9 @@
|
||||
; and it's too much work to try to dynamically edit this file
|
||||
!include /NONFATAL "OoliteVersions.nsh"
|
||||
|
||||
!ifndef SVNREV
|
||||
!warning "No SVN Revision supplied"
|
||||
!define SVNREV 0
|
||||
!ifndef VER_GITREV
|
||||
!warning "No GIT Revision supplied"
|
||||
!define VER_GITREV 0
|
||||
!endif
|
||||
!ifndef VERSION
|
||||
!warning "No Version information supplied"
|
||||
@ -49,10 +49,10 @@ SetCompress auto
|
||||
SetCompressor LZMA
|
||||
SetCompressorDictSize 32
|
||||
SetDatablockOptimize on
|
||||
OutFile "${OUTDIR}\OoliteInstall-${VER}${EXTVER}.exe"
|
||||
OutFile "${OUTDIR}\OoliteInstall-${VER_MAJ}.${VER_MIN}.${VER_REV}.${VER_GITHASH}${EXTVER}.exe"
|
||||
BrandingText "(C) 2003-2013 Giles Williams, Jens Ayton and contributors"
|
||||
Name "Oolite"
|
||||
Caption "Oolite ${VER}${EXTVER} Setup"
|
||||
Caption "Oolite ${VER}${EXTVER} (git ${VER_GITHASH}) Setup"
|
||||
SubCaption 0 " "
|
||||
SubCaption 1 " "
|
||||
SubCaption 2 " "
|
||||
@ -68,18 +68,20 @@ InstProgressFlags smooth
|
||||
AutoCloseWindow false
|
||||
SetOverwrite on
|
||||
|
||||
|
||||
VIAddVersionKey "ProductName" "Oolite"
|
||||
VIAddVersionKey "FileDescription" "A space combat/trading game, inspired by Elite."
|
||||
VIAddVersionKey "LegalCopyright" "© 2003-2013 Giles Williams, Jens Ayton and contributors"
|
||||
VIAddVersionKey "FileVersion" "${VER}"
|
||||
!ifdef SNAPSHOT
|
||||
VIAddVersionKey "SVN Revision" "${SVNREV}"
|
||||
VIAddVersionKey "GIT Revision" "${VER_GITHASH}"
|
||||
!endif
|
||||
!ifdef BUILDTIME
|
||||
VIAddVersionKey "Build Time" "${BUILDTIME}"
|
||||
!endif
|
||||
VIProductVersion "${VER}"
|
||||
|
||||
|
||||
!define MUI_HEADERIMAGE
|
||||
!define MUI_HEADERIMAGE_BITMAP ".\OoliteInstallerHeaderBitmap_ModernUI.bmp"
|
||||
!define MUI_HEADERIMAGE_UNBITMAP ".\OoliteInstallerHeaderBitmap_ModernUI.bmp"
|
||||
|
@ -713,11 +713,14 @@ MA 02110-1301, USA.
|
||||
{
|
||||
if ([ship status] != STATUS_LAUNCHING && !allow_docking_thisship)
|
||||
{ // launch-only dock: will collide!
|
||||
[ship takeScrapeDamage: 5 * [UNIVERSE getTimeDelta]*[ship flightSpeed] from:station];
|
||||
// and bounce
|
||||
HPVector rel = HPvector_subtract([ship position],port_pos);
|
||||
rel = HPvector_multiply_scalar(HPvector_normal(rel),[ship flightSpeed]*0.4);
|
||||
[ship adjustVelocity:HPVectorToVector(rel)];
|
||||
if (arbb.min.z < dd)
|
||||
{
|
||||
[ship takeScrapeDamage: 5 * [UNIVERSE getTimeDelta]*[ship flightSpeed] from:station];
|
||||
// and bounce
|
||||
HPVector rel = HPvector_subtract([ship position],port_pos);
|
||||
rel = HPvector_multiply_scalar(HPvector_normal(rel),[ship flightSpeed]*0.4);
|
||||
[ship adjustVelocity:HPVectorToVector(rel)];
|
||||
}
|
||||
|
||||
if (arbb.max.z < 0.0)
|
||||
{ // give some warning before exploding...
|
||||
|
@ -126,7 +126,7 @@ MA 02110-1301, USA.
|
||||
scanClass = CLASS_NO_DRAW;
|
||||
|
||||
[self setSunColor:sun_color];
|
||||
|
||||
|
||||
corona_blending=OOClamp_0_1_f([dict oo_floatForKey:@"corona_hues" defaultValue:1.0f]);
|
||||
corona_speed_factor=[dict oo_floatForKey:@"corona_shimmer" defaultValue:-1.0];
|
||||
if(corona_speed_factor<0)
|
||||
|
@ -492,6 +492,7 @@ typedef enum
|
||||
// trumbles
|
||||
NSUInteger trumbleCount;
|
||||
OOTrumble *trumble[PLAYER_MAX_TRUMBLES];
|
||||
float _trumbleAppetiteAccumulator;
|
||||
|
||||
// smart zoom
|
||||
GLfloat scanner_zoom_rate;
|
||||
@ -838,7 +839,10 @@ typedef enum
|
||||
- (NSUInteger) trumbleCount;
|
||||
// loading and saving trumbleCount
|
||||
- (id) trumbleValue;
|
||||
- (void) setTrumbleValueFrom:(NSObject*) trumbleValue;
|
||||
- (void) setTrumbleValueFrom:(NSObject *)trumbleValue;
|
||||
|
||||
- (float) trumbleAppetiteAccumulator;
|
||||
- (void) setTrumbleAppetiteAccumulator:(float)value;
|
||||
|
||||
- (void) mungChecksumWithNSString:(NSString *)str;
|
||||
|
||||
|
@ -9127,7 +9127,7 @@ static NSString *last_outfitting_key=nil;
|
||||
|
||||
- (void) setUpTrumbles
|
||||
{
|
||||
NSMutableString* trumbleDigrams = [NSMutableString stringWithCapacity:256];
|
||||
NSMutableString *trumbleDigrams = [NSMutableString stringWithCapacity:256];
|
||||
unichar xchar = (unichar)0;
|
||||
unichar digramchars[2];
|
||||
|
||||
@ -9156,7 +9156,7 @@ static NSString *last_outfitting_key=nil;
|
||||
|
||||
trumbleCount = 0;
|
||||
|
||||
trumbleAppetiteAccumulator = 0.0f;
|
||||
[self setTrumbleAppetiteAccumulator:0.0f];
|
||||
}
|
||||
|
||||
|
||||
@ -9335,6 +9335,18 @@ static NSString *last_outfitting_key=nil;
|
||||
}
|
||||
|
||||
|
||||
- (float) trumbleAppetiteAccumulator
|
||||
{
|
||||
return _trumbleAppetiteAccumulator;
|
||||
}
|
||||
|
||||
|
||||
- (void) setTrumbleAppetiteAccumulator:(float)value
|
||||
{
|
||||
_trumbleAppetiteAccumulator = value;
|
||||
}
|
||||
|
||||
|
||||
- (void) mungChecksumWithNSString:(NSString *)str
|
||||
{
|
||||
if (str == nil) return;
|
||||
|
@ -826,7 +826,7 @@ static ShipEntity *doOctreesCollide(ShipEntity *prime, ShipEntity *other);
|
||||
}
|
||||
else
|
||||
{
|
||||
subentity = [UNIVERSE newShipWithName:subentKey];
|
||||
subentity = [UNIVERSE newSubentityWithName:subentKey];
|
||||
}
|
||||
if (subentity == nil) {
|
||||
OOLog(@"setup.ship.badEntry.subentities",@"Failed to set up entity %@",subentKey);
|
||||
|
@ -348,9 +348,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
// -memberArray creates a new collection, which is needed because the group might be mutated by the members' AIs.
|
||||
NSArray *groupMembers = [[self group] memberArray];
|
||||
for (shipEnum = [groupMembers objectEnumerator]; (ship = [shipEnum nextObject]); )
|
||||
for (shipEnum = [[self group] mutationSafeEnumerator]; (ship = [shipEnum nextObject]); )
|
||||
{
|
||||
[ship setFoundTarget:target];
|
||||
[ship reactToAIMessage:@"GROUP_ATTACK_TARGET" context:@"groupAttackTarget"];
|
||||
|
@ -758,8 +758,21 @@ NSDictionary *OOMakeDockingInstructions(StationEntity *station, HPVector coords,
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
// and now check for docks
|
||||
|
||||
NSEnumerator *subEnum = nil;
|
||||
|
||||
#ifndef NDEBUG
|
||||
ShipEntity *subEntity = nil;
|
||||
for (subEnum = [self shipSubEntityEnumerator]; (subEntity = [subEnum nextObject]); )
|
||||
{
|
||||
if ([subEntity isStation])
|
||||
{
|
||||
OOLog(@"setup.ship.badType.subentities",@"Subentity %@ (%@) of station %@ is itself a StationEntity. This is an internal error - please report it. ",subEntity,[subEntity shipDataKey],[self displayName]);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// and now check for docks
|
||||
DockEntity *sub = nil;
|
||||
for (subEnum = [self dockSubEntityEnumerator]; (sub = [subEnum nextObject]); )
|
||||
{
|
||||
@ -1141,7 +1154,7 @@ NSDictionary *OOMakeDockingInstructions(StationEntity *station, HPVector coords,
|
||||
}
|
||||
|
||||
OOLog(@"station.launchShip.failed", @"Cancelled launch for a %@ with role %@, as it is too large for the docking port of the %@.",
|
||||
[ship displayName], [ship primaryRole], [self displayName]);
|
||||
[ship displayName], [ship primaryRole], self);
|
||||
return NO;
|
||||
}
|
||||
|
||||
|
@ -55,13 +55,11 @@ MA 02110-1301, USA.
|
||||
if ([OOMacSystemStandardFullScreenController shouldUseSystemStandardFullScreenController])
|
||||
{
|
||||
fullScreenController = [[OOMacSystemStandardFullScreenController alloc] initWithGameView:gameView];
|
||||
if (fullScreenController != nil) OOLog(@"display.fullScreen.temp", @"Selecting modern full-screen controller.");
|
||||
}
|
||||
#endif
|
||||
|
||||
if (fullScreenController == nil)
|
||||
{
|
||||
OOLog(@"display.fullScreen.temp", @"Selecting Snow Leopard full-screen controller.");
|
||||
fullScreenController = [[OOMacSnowLeopardFullScreenController alloc] initWithGameView:gameView];
|
||||
}
|
||||
#endif
|
||||
|
@ -66,9 +66,8 @@ enum trumble_mouth
|
||||
TRUMBLE_MOUTH_NORMAL
|
||||
};
|
||||
|
||||
float trumbleAppetiteAccumulator;
|
||||
|
||||
@interface OOTrumble : NSObject
|
||||
@interface OOTrumble: NSObject
|
||||
{
|
||||
@private
|
||||
PlayerEntity *player; // owning entity (not retained)
|
||||
@ -115,12 +114,12 @@ float trumbleAppetiteAccumulator;
|
||||
BOOL readyToSpawn;
|
||||
}
|
||||
|
||||
- (id) initForPlayer:(PlayerEntity*) p1;
|
||||
- (id) initForPlayer:(PlayerEntity*) p1 digram:(NSString*) digramString;
|
||||
- (id) initForPlayer:(PlayerEntity *)p1;
|
||||
- (id) initForPlayer:(PlayerEntity *)p1 digram:(NSString*) digramString;
|
||||
|
||||
- (void) setupForPlayer:(PlayerEntity*) p1 digram:(NSString*) digramString;
|
||||
- (void) setupForPlayer:(PlayerEntity *)p1 digram:(NSString*) digramString;
|
||||
|
||||
- (void) spawnFrom:(OOTrumble*) parentTrumble;
|
||||
- (void) spawnFrom:(OOTrumble *)parentTrumble;
|
||||
|
||||
- (void) calcGrowthRate;
|
||||
|
||||
@ -159,7 +158,7 @@ float trumbleAppetiteAccumulator;
|
||||
- (void) updateSleep:(double) delta_t;
|
||||
- (void) updateSpawn:(double) delta_t;
|
||||
|
||||
- (NSDictionary*) dictionary;
|
||||
- (void) setFromDictionary:(NSDictionary*) dict;
|
||||
- (NSDictionary *)dictionary;
|
||||
- (void) setFromDictionary:(NSDictionary *)dict;
|
||||
|
||||
@end
|
||||
|
@ -601,6 +601,8 @@ static void PlayTrumbleSqueal(void);
|
||||
if (selectedCargopod)
|
||||
{
|
||||
// feed
|
||||
float trumbleAppetiteAccumulator = [player trumbleAppetiteAccumulator];
|
||||
|
||||
trumbleAppetiteAccumulator += hunger;
|
||||
hunger = 0.0;
|
||||
discomfort -= mostYummy * 0.5;
|
||||
@ -621,6 +623,8 @@ static void PlayTrumbleSqueal(void);
|
||||
{
|
||||
readyToSpawn = YES;
|
||||
}
|
||||
|
||||
[player setTrumbleAppetiteAccumulator:trumbleAppetiteAccumulator];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -434,9 +434,11 @@ enum
|
||||
- (NSString *) randomShipKeyForRoleRespectingConditions:(NSString *)role;
|
||||
- (ShipEntity *) newShipWithRole:(NSString *)role OO_RETURNS_RETAINED; // Selects ship using role weights, applies auto_ai, respects conditions
|
||||
- (ShipEntity *) newShipWithName:(NSString *)shipKey OO_RETURNS_RETAINED; // Does not apply auto_ai or respect conditions
|
||||
- (ShipEntity *) newSubentityWithName:(NSString *)shipKey OO_RETURNS_RETAINED; // Does not apply auto_ai or respect conditions
|
||||
- (OOVisualEffectEntity *) newVisualEffectWithName:(NSString *)effectKey OO_RETURNS_RETAINED;
|
||||
- (DockEntity *) newDockWithName:(NSString *)shipKey OO_RETURNS_RETAINED; // Does not apply auto_ai or respect conditions
|
||||
- (ShipEntity *) newShipWithName:(NSString *)shipKey usePlayerProxy:(BOOL)usePlayerProxy OO_RETURNS_RETAINED; // If usePlayerProxy, non-carriers are instantiated as ProxyPlayerEntity.
|
||||
- (ShipEntity *) newShipWithName:(NSString *)shipKey usePlayerProxy:(BOOL)usePlayerProxy isSubentity:(BOOL)isSubentity OO_RETURNS_RETAINED;
|
||||
|
||||
- (Class) shipClassForShipDictionary:(NSDictionary *)dict;
|
||||
|
||||
|
@ -905,6 +905,7 @@ GLfloat docked_light_specular[4] = { DOCKED_ILLUM_LEVEL, DOCKED_ILLUM_LEVEL, DOC
|
||||
HPVector stationPos;
|
||||
|
||||
Vector vf;
|
||||
id dict_object;
|
||||
|
||||
NSDictionary *systeminfo = [self generateSystemData:system_seed useCache:NO];
|
||||
unsigned techlevel = [systeminfo oo_unsignedIntForKey:KEY_TECHLEVEL];
|
||||
@ -950,7 +951,16 @@ GLfloat docked_light_specular[4] = { DOCKED_ILLUM_LEVEL, DOCKED_ILLUM_LEVEL, DOC
|
||||
}
|
||||
// pick a main sequence colour
|
||||
|
||||
bgcolor = [OOColor colorWithHue:h1 saturation:0.75*randf() brightness:0.65+randf()/5.0 alpha:1.0];
|
||||
dict_object=[systeminfo objectForKey:@"sun_color"];
|
||||
if (dict_object!=nil)
|
||||
{
|
||||
bgcolor = [OOColor colorWithDescription:dict_object];
|
||||
}
|
||||
else
|
||||
{
|
||||
bgcolor = [OOColor colorWithHue:h1 saturation:0.75*randf() brightness:0.65+randf()/5.0 alpha:1.0];
|
||||
}
|
||||
|
||||
pale_bgcolor = [bgcolor blendedColorWithFraction:0.5 ofColor:[OOColor whiteColor]];
|
||||
[thing release];
|
||||
/*--*/
|
||||
@ -984,7 +994,6 @@ GLfloat docked_light_specular[4] = { DOCKED_ILLUM_LEVEL, DOCKED_ILLUM_LEVEL, DOC
|
||||
double sunDistanceModifier;
|
||||
double safeDistance;
|
||||
int posIterator=0;
|
||||
id dict_object;
|
||||
Quaternion q_sun;
|
||||
HPVector sunPos;
|
||||
|
||||
@ -2759,7 +2768,7 @@ static BOOL IsFriendlyStationPredicate(Entity *entity, void *parameter)
|
||||
}
|
||||
|
||||
|
||||
- (StationEntity *) stationWithRole:(NSString *)role andPosition:(HPVector)position;
|
||||
- (StationEntity *) stationWithRole:(NSString *)role andPosition:(HPVector)position
|
||||
{
|
||||
if ([role isEqualToString:@""])
|
||||
{
|
||||
@ -3140,7 +3149,19 @@ static BOOL IsFriendlyStationPredicate(Entity *entity, void *parameter)
|
||||
}
|
||||
|
||||
|
||||
- (ShipEntity *) newSubentityWithName:(NSString *)shipKey
|
||||
{
|
||||
return [self newShipWithName:shipKey usePlayerProxy:NO isSubentity:YES];
|
||||
}
|
||||
|
||||
|
||||
- (ShipEntity *) newShipWithName:(NSString *)shipKey usePlayerProxy:(BOOL)usePlayerProxy
|
||||
{
|
||||
return [self newShipWithName:shipKey usePlayerProxy:usePlayerProxy isSubentity:NO];
|
||||
}
|
||||
|
||||
|
||||
- (ShipEntity *) newShipWithName:(NSString *)shipKey usePlayerProxy:(BOOL)usePlayerProxy isSubentity:(BOOL)isSubentity
|
||||
{
|
||||
OOJS_PROFILE_ENTER
|
||||
|
||||
@ -3150,10 +3171,18 @@ static BOOL IsFriendlyStationPredicate(Entity *entity, void *parameter)
|
||||
shipDict = [[OOShipRegistry sharedRegistry] shipInfoForKey:shipKey];
|
||||
if (shipDict == nil) return nil;
|
||||
|
||||
volatile Class shipClass = [self shipClassForShipDictionary:shipDict];
|
||||
if (usePlayerProxy && shipClass == [ShipEntity class])
|
||||
volatile Class shipClass = nil;
|
||||
if (isSubentity)
|
||||
{
|
||||
shipClass = [ProxyPlayerEntity class];
|
||||
shipClass = [ShipEntity class];
|
||||
}
|
||||
else
|
||||
{
|
||||
shipClass = [self shipClassForShipDictionary:shipDict];
|
||||
if (usePlayerProxy && shipClass == [ShipEntity class])
|
||||
{
|
||||
shipClass = [ProxyPlayerEntity class];
|
||||
}
|
||||
}
|
||||
|
||||
@try
|
||||
|
Loading…
x
Reference in New Issue
Block a user