diff --git a/src/Core/Entities/StationEntity.m b/src/Core/Entities/StationEntity.m index e66ae43d..101d4f2a 100644 --- a/src/Core/Entities/StationEntity.m +++ b/src/Core/Entities/StationEntity.m @@ -1003,6 +1003,13 @@ static NSDictionary* instructions(int station_id, Vector coords, float speed, fl - (void) pullInShipIfPermitted:(ShipEntity *)ship { #if 0 + /* + Experiment: allow station script to deny physical docking capability. + Doesn't work properly because the collision detection for docking ports + isn't designed to support this, and you can fly past the back and + sometimes straight through. + -- Ahruman 2011-01-29 + */ if (EXPECT_NOT(ship == nil)) return; JSContext *context = OOJSAcquireContext(); diff --git a/src/Core/GuiDisplayGen.m b/src/Core/GuiDisplayGen.m index 452945d0..5f23531a 100644 --- a/src/Core/GuiDisplayGen.m +++ b/src/Core/GuiDisplayGen.m @@ -793,38 +793,6 @@ OOINLINE BOOL RowInRange(OOGUIRow row, NSRange range) } -#if 0 -- (BOOL) setBackgroundTexture:(OOTexture *)backgroundTexture -{ - // autorelease instead of release here seems to prevent a crash on SDL builds when pausing and unpausing - // with GUI backgrounds installed. TODO: Apply a proper fix, this smells like hack - Nikos 20100519 - [backgroundSprite autorelease]; - backgroundSprite = nil; - - if (backgroundTexture != nil) - { - backgroundSprite = [[OOTextureSprite alloc] initWithTexture:backgroundTexture]; - } - return (backgroundSprite != nil); -} - - -- (BOOL) setForegroundTexture:(OOTexture *)foregroundTexture -{ - // autorelease instead of release here seems to prevent a crash on SDL builds when pausing and unpausing - // with GUI backgrounds installed. TODO: Apply a proper fix, this smells like hack - Nikos 20100519 - [foregroundSprite autorelease]; - foregroundSprite = nil; - - if (foregroundTexture != nil) - { - foregroundSprite = [[OOTextureSprite alloc] initWithTexture:foregroundTexture]; - } - return (foregroundSprite != nil); -} -#endif - - - (void) clearBackground { [self setBackgroundTextureDescriptor:nil]; diff --git a/src/Core/Materials/OOShaderUniform.m b/src/Core/Materials/OOShaderUniform.m index b3c62276..73f411e5 100644 --- a/src/Core/Materials/OOShaderUniform.m +++ b/src/Core/Materials/OOShaderUniform.m @@ -343,14 +343,6 @@ OOINLINE BOOL ValidBindingType(OOShaderUniformType type) } } - /* Bad optimization - we need to be able to rebind entities when their - owner changes. - -- Ahruman 2008-04-19 - */ -#if 0 - if (EXPECT_NOT([value.binding.object weakRefUnderlyingObject] == [(id)target weakRefUnderlyingObject])) return; -#endif - [value.binding.object release]; value.binding.object = [target weakRetain]; diff --git a/src/Core/OOCharacter.m b/src/Core/OOCharacter.m index ec885dbb..c5b46f0f 100644 --- a/src/Core/OOCharacter.m +++ b/src/Core/OOCharacter.m @@ -190,26 +190,6 @@ MA 02110-1301, USA. [self setLegalStatus: criminal_tendency + criminal_tendency * (gen_rnd_number() & 0x03) + (gen_rnd_number() & gen_rnd_number() & 0x7f)]; legal_index = 0; if (legalStatus) legal_index = (legalStatus <= 50) ? 1 : 2; - -#if 0 - NSString *legalDesc = nil; - // Never used! What was intended? -- Ahruman 2008-11-10 - switch (legal_index) - { - case 0: - legalDesc = @"clean"; - break; - case 1: - legalDesc = @"an offender"; - break; - case 2: - legalDesc = @"a fugitive"; - break; - default: - // never should get here - legalDesc = @"an unperson"; - } -#endif // if clean - determine insurance level (if any) [self setInsuranceCredits:0]; diff --git a/src/Core/OOMesh.m b/src/Core/OOMesh.m index c3b02575..749348d5 100644 --- a/src/Core/OOMesh.m +++ b/src/Core/OOMesh.m @@ -470,20 +470,7 @@ static NSString *NormalModeDescription(OOMeshNormalMode mode) } [materials[ti] apply]; -#if 0 - if (listsReady) - { - OOGL(glCallList(displayList0 + ti)); - } - else - { - OOGL(glNewList(displayList0 + ti, GL_COMPILE_AND_EXECUTE)); - OOGL(glDrawArrays(GL_TRIANGLES, triangle_range[ti].location, triangle_range[ti].length)); - OOGL(glEndList()); - } -#else OOGL(glDrawArrays(GL_TRIANGLES, triangle_range[ti].location, triangle_range[ti].length)); -#endif } listsReady = YES;