First, load up PlayerEntity.h and insert the following around line 826:
Code: Select all
- (void) addStatusModel:(NSString *)shipKey;
[self setShowDemoShips:NO];
): Code: Select all
if (EXPECT_NOT([[NSUserDefaults standardUserDefaults] boolForKey:@"display-status-model"]))
{
[UNIVERSE removeDemoShips];
[self addStatusModel:[self shipDataKey]];
[self setShowDemoShips:YES];
}
else
{
[self setShowDemoShips:NO];
}
Code: Select all
- (void) addStatusModel:(NSString *)shipKey
{
Quaternion q2 = { (GLfloat)M_SQRT1_2, (GLfloat)M_SQRT1_2, (GLfloat)0.0f, (GLfloat)0.0f };
// MKW - retrieve last demo ships' orientation and release it
if( demoShip != nil )
{
q2 = [demoShip orientation];
[demoShip release];
}
NSDictionary *shipData = [[OOShipRegistry sharedRegistry] shipInfoForKey:shipKey];
ShipEntity *ship = [[ProxyPlayerEntity alloc] initWithKey:shipKey definition:shipData];
[ship wasAddedToUniverse];
GLfloat cr = [ship collisionRadius];
[ship setOrientation: q2];
[ship setPositionX:2.5 * cr y:1.7 * cr z:8.0 * cr];
[ship setScanClass: CLASS_NO_DRAW];
[ship setRoll: M_PI/10.0];
[ship setPitch: M_PI/25.0];
if([ship pendingEscortCount] > 0) [ship setPendingEscortCount:0];
[ship setAITo: @"nullAI.plist"];
id subEntStatus = [shipData objectForKey:@"subentities_status"];
// show missing subentities if there's a subentities_status key
if (subEntStatus != nil) [ship deserializeShipSubEntitiesFrom:(NSString *)subEntStatus];
[UNIVERSE addEntity: ship];
// MKW - save demo ship for its rotation
demoShip = [ship retain];
[ship setStatus: STATUS_COCKPIT_DISPLAY];
[ship release];
}
"display-status-model" = YES;
to enable the model on the status screen. And here you are:This would now be a completely optional addition to the game, meaning those who want this have to turn it on in order for it not to work, as it would not appear by default.