

Moderators: winston, another_commander, Getafix
That way leads to Health-and-Safety-gone-mad. What if your parking sensor packs up - would you want the car to refuse to allow 2nd gear? You'll be wanting seat belts next. And those heavy double-seal airlocks.Eric Walch wrote:The only thing you could do is always mass_locking without scanner. Somehow that even seems wise. At least I know from car driving that it is not wise to to drive at max speed when visibility is near zero...
Oolite Life is now revealed hereSelezen wrote:Apparently I was having a DaddyHoggy moment.
Code: Select all
- (void) drawDials
{
unsigned i;
BOOL isScannerDrawn = NO;
z1 = [[UNIVERSE gameView] display_z];
for (i = 0; i < [dialArray count]; i++)
{
[self drawHUDItem:[dialArray oo_dictionaryAtIndex:i]];
if ([[[dialArray oo_dictionaryAtIndex:i] oo_stringForKey:@"selector"] isEqualToString:@"drawScanner:"])
{
isScannerDrawn = YES;
}
}
if (EXPECT_NOT(!isScannerDrawn))
{
[self drawScanner:[NSDictionary dictionaryWithObjectsAndKeys: @"0.0", @"alpha",
@"0.0", @"x",
@"60.0", @"y",
@"-1.0", @"y_origin",
@"72.0", @"height",
@"288.0", @"width",
nil]];
}
}
The only alternative I see is not doing this check every time at draw time, but after setting up de dials. If the scanner in not amongst the objects, add your fully transparent version.another_commander wrote:If this is considered a non-too-hackish solution, I can commit it anytime. It seems to be at least simple enough to not cause too much disturbance to the codebase at this time. If there are other ideas out there, I'd be happy to hear them.