--- bzmap-map-olympic--main--2.0--patch-2/olympic.py 2005-01-28 15:17:26.000000000 +0000 +++ olympic/olympic.py 2005-01-29 20:30:50.386913000 +0000 @@ -488,6 +488,157 @@ p.rotate( 45. ) u.add( repeatRotate90( p ) ) +class ObservingTower : + def __init__( self ) : + self.union = Union() + + obs1h = 95 + obs2h = 295 + obs3h = 495 + obsHeight = 60 + obsTop = 600 + radius = 300 + holeRadius = 170 + obsWidth = radius - holeRadius + obsDivisions = 32 + glass = Color( 0.6 , 0.6 , 0.8 , 0.3 ) + obsWindows = 9 + wRotation = int( 360 / obsWindows + 1 ) + holeWindows = 5 + hRotation = int( 360 / holeWindows + 1 ) + wMargin = 0.5 + + for height in [ obs1h , obs2h , obs3h ] : + p1 = Point( -radius + wMargin , height , -radius + wMargin ) + p2 = Point( radius - wMargin , height + obsHeight , radius - wMargin) + self.union.add( Arc( p1 , p2 , width = 0.25 , divisions = obsDivisions ).withColor( glass ) ) + for rotation in range( 0 , 359 , wRotation ) : # window separators + self.union.add( Arc( p1 , p2 , width = 1 , divisions = 1 , angle = 2 ).rotate( rotation ) ) + + p1 = Point( -holeRadius - wMargin , height , -holeRadius - wMargin ) + p2 = Point( holeRadius + wMargin , height + obsHeight , holeRadius + wMargin ) + self.union.add( Arc( p1 , p2 , width = 0.25 , divisions = obsDivisions ).withColor( glass ) ) + for rotation in range( 0 , 359 , hRotation ) : # window separators + self.union.add( Arc( p1 , p2 , width = 1 , divisions = 1 , angle = 2 ).rotate( rotation ) ) + + + pHeight = 20 + + p1 = Point( -radius , pHeight , -radius ) #space for passages to the pool + p2 = Point( radius , obs1h , radius ) + self.union.add( Arc( p1 , p2 , width = obsWidth , divisions = obsDivisions ) ) + + p1 = Point( -radius , obs1h + obsHeight , -radius ) + p2 = Point( radius , obs2h , radius ) + self.union.add( Arc( p1 , p2 , width = obsWidth , divisions = obsDivisions ) ) + + p1 = Point( -radius , obs2h + obsHeight , -radius ) + p2 = Point( radius , obs3h , radius ) + self.union.add( Arc( p1 , p2 , width = obsWidth , divisions = obsDivisions ) ) + + p1 = Point( -radius , obs3h + obsHeight , -radius ) + p2 = Point( radius , obsTop , radius ) + self.union.add( Arc( p1 , p2 , width = obsWidth , divisions = obsDivisions ) ) + + #safety border + safeHeight = 2 + p1 = Point( -radius , obsTop + safeHeight , -radius ) + p2 = Point( radius , obsTop + safeHeight + 1 , radius ) + self.union.add( Arc( p1 , p2 , width = 1 , divisions = obsDivisions ) ) + + poles = obsDivisions - 1 + pRotation = int( 360 / poles + 1 ) + p1 = Point( -radius + 1 , obsTop , -radius + 1 ) + p2 = Point( radius - 1 , obsTop + safeHeight , radius - 1 ) + + for rotation in range( 0 , 359 , pRotation ) : # poles to support border + self.union.add( Arc( p1 , p2 , width = 0.5 , divisions = 1 , angle = 1 ).rotate( rotation ) ) + + + #pool passages + pAngle = 10 + pRotation = 90 + pDivisions = int( ( obsDivisions / 360 ) * ( pRotation - pAngle ) ) + + p1 = Point( -radius , 0 , -radius ) + p2 = Point( radius , pHeight , radius ) + + + for rotation in range( 0 , 359 , pRotation ) : + self.union.add( Arc( p1 , p2 , width = obsWidth , divisions = pDivisions , angle = ( pRotation - pAngle ) ).rotate( rotation ) ) + + + #teleports + + class obsTele : + def __init__( self , inverted = False ) : + self.union = Union() + width=20 + height=10 + + p1 = Point( -width / 2 , 0 , 0.25 ) + p2 = Point( width / 2 , height , -0.25 ) + + self.teleporter = Teleporter( p1 , p2 , 'N' , True ) + self.union.add( self.teleporter ) + + p1 = Point( -width / 2 , height + 5 , 0.25 ) + p2 = Point( width / 2 , height , -0.25 ) + + self.union.add( Pyramid( p1 , p2 , inverted = inverted) ) + + p = Point( holeRadius + 15 , obs1h , 0 ) + t1d = obsTele( True ) #level 1 down tele + self.union.add( t1d.union.at( p ) ) + + p = Point( - holeRadius - 15 , obs1h , 0 ) + t1u = obsTele( False ) + self.union.add( t1u.union.at( p ) ) + + + p = Point( holeRadius + 15 , obs2h , 0 ) + t2d = obsTele( True ) + self.union.add( t2d.union.at( p ) ) + + p = Point( - holeRadius - 15 , obs2h , 0 ) + t2u = obsTele( False ) + self.union.add( t2u.union.at( p ) ) + + p = Point( holeRadius + 15 , obs3h , 0 ) + t3d = obsTele( True ) + self.union.add( t3d.union.at( p ) ) + + p = Point( - holeRadius - 15 , obs3h , 0 ) + t3u = obsTele( False ) + self.union.add( t3u.union.at( p ) ) + + p = Point( holeRadius + 15 , obsTop , 0 ) + t4d = obsTele( True ) + self.union.add( t4d.union.at( p ) ) + + p = Point( 0 , -0.01 , radius + 15 ) #floor teles + for rotation in [ 45 , 135 , 225 , 315 ] : + t = obsTele( False ) + self.union.add( t.union.at( p ).rotate( rotation ) ) + self.union.add( Link( AllSides( t.teleporter ) , FrontSide( t1u.teleporter ) ) ) + self.union.add( Link( AllSides( t1d.teleporter ) , FrontSide( t.teleporter ) ) ) + + p = Point( 0 , -0.01 , holeRadius - 15 ) #quick teles for divers + for rotation in [ 45 , 135 , 225 , 315 ] : + t = obsTele( False ) + self.union.add( t.union.at( p ).rotate( rotation ) ) + self.union.add( Link( AllSides( t.teleporter ) , FrontSide( t4d.teleporter ) ) ) + + self.union.add( Link( AllSides( t3u.teleporter ) , FrontSide( t4d.teleporter ) ) ) + self.union.add( Link( AllSides( t4d.teleporter ) , FrontSide( t3d.teleporter ) ) ) + self.union.add( Link( AllSides( t2u.teleporter ) , FrontSide( t3u.teleporter ) ) ) + self.union.add( Link( AllSides( t3d.teleporter ) , FrontSide( t2d.teleporter ) ) ) + self.union.add( Link( AllSides( t1u.teleporter ) , FrontSide( t2u.teleporter ) ) ) + self.union.add( Link( AllSides( t2d.teleporter ) , FrontSide( t1d.teleporter ) ) ) + + + + class Trampoline : def __init__( self, trampTension = 1) : self.union = Union() @@ -756,11 +907,8 @@ o Obstacle Course Racing Competition (/help race, /help racer) o Endurance Racing Competition (/help erace, /help eracer) o Diving Competition (/help diving) - o Duelling Competition (/help duel) o Rock Climbing Competition (/help rock) o Fireworks (/help fire) - o Trampoline (/help tramp) - o Free-For-All tank battles on the floor and up on the space station. Please use /REPORT for suggestions, complaints, etc.""" ) @@ -830,13 +978,6 @@ by the level of the diving board (1, 2, or 3). The formula is: (landing zone + 1.5 bonus for spinning) * diving board level.""" ) - serverHelp.with( 'duel' , """---=== DUELLING ===--- -Duelling takes place in one of the three duelling cages on the floor. -Tanks must be on different teams (no team-killing). -Tanks start with a flag facing each other and far apart. -Either tank shoots to start the duel. The tank that leaves the cage or dies -loses the match.""" ) - serverHelp.with( 'rock' , """---=== ROCK CLIMBING ===--- There is a large rock climbing wall at the corner of the map that starts on the ground. The wall is double sided (the back side is a mirror image of the @@ -856,18 +997,6 @@ The quickest way to the level 3 spectator platform is by jumping through the outside of a duelling pen teleporter.""" % fireworksTarget ) - serverHelp.with( 'tramp' , """---=== TRAMPOLINES ===--- -In the center of the map on the floor are 4 trampolines. -These are the large coloured boxes with steps on the side. -The trampoline is on the top. The largest trampoline can be -used for quick access to the top of the second climbing wall -to get a prized GM flag. -To get to the wall climb the tallest trampoline, face the NorthWest corner -of the map, drive as slow as possible forwards and jump to get up on the -trampoline. In the air before you hit do full speed forwards and wait for the -bounce. After the bounce stop tank movement and wait. You should hit the -top of the climbing wall if you did it right.""" ) - serverHelp.with( 'register' , """---=== WHY REGISTER? ===--- Registering your callsign allows you to participate in polls on the server as well as removing ghost players that are using your callsign. @@ -948,20 +1077,6 @@ ice = Raw( 'physics\nname ice\nslide 1\nend' ) u.add( ice ) - # Trampoline physics settings. - trampolineL1 = Raw ( 'physics\nname trampolineL1\nlinear 0 0 50\nend' ) - trampolineL2 = Raw ( 'physics\nname trampolineL2\nlinear 0 0 90\nend' ) - trampolineL3 = Raw ( 'physics\nname trampolineL3\nlinear 0 0 150\nend' ) - trampolineHUGE = Raw ( 'physics\nname trampolineHUGE\nlinear 0 0 225\nend' ) - u.add ( trampolineL1 ) - u.add ( trampolineL2 ) - u.add ( trampolineL3 ) - u.add ( trampolineHUGE ) - u.add ( Trampoline( 1 ).union.at ( Point( -50, 0, -50 ) ) ) - u.add ( Trampoline( 2 ).union.at ( Point( -50, 0, 50 ) ) ) - u.add ( Trampoline( 3 ).union.at ( Point( 50, 0, -50 ) ) ) - u.add ( Trampoline( 4 ).union.at ( Point( 50, 0, 50 ) ) ) - # # Create all of the obstacle and corner obstacle positions # and shuffle the list so we randomly select stuff when building @@ -1174,139 +1289,25 @@ # # A platform for spectators # - wid = 40 - p1 = Point( -0.5 , 0 , -10 ) - p2 = Point( 0.5 , 14 , 10 ) - tn = [ Teleporter( p1 , p2 , 'E' , True ) ] - u.add( tn[ 0 ] ) - idx = 0 - for context in [ level_1 , level_2 , level_3 ] : - height = context.trackHeight + 23 - p1 = Point( -wid , 0 , -wid ) - p2 = Point( wid , 1 , wid ) - p = Point( 0 , height - 1 , 0 ) - u.add( Box( p1 , p2 ).at( p ) ) - p = Point( y = height ) - u.add( SquareRing( wid , wid - 1 , .1 ).at( p ) ) - p1 = Point( -0.5 , 0 , -10 ) - p2 = Point( 0.5 , 14 , 10 ) - p = Point( y = height ) - tn.append( Teleporter( p1 , p2 , 'E' , True ).at( p ) ) - t1 = tn[ idx ] - t2 = tn[ idx + 1 ] - u.add( t2 , Link( AllSides( t1 ) , BackSide( t2 ) ) ) - # - # The Diving Board - # - p1 = Point( -2.5 , 0 , 0 ) - p2 = Point( 2.5 , 0.2 , 80 ) - p = Point( 0 , height + 13.9 , -6.5 ) - u.add( Box( p1 , p2 ).at( p ) ) - idx += 1 - t1 = tn[ idx ] - t2 = tn[ 0 ] - u.add( Link( AllSides( t1 ) , BackSide( t2 ) ) ) - p1 = Point( -10 , 0 , -0.5 ) - p2 = Point( 10 , 14 , 0.5 ) - p = Point( 0 , 0 , world.MW * 0.75 ) - tp = Teleporter( p1 , p2 , 'N' , True ).at( p ) - u.add( tp , Link( AllSides( tp ) , BackSide( tn[ 1 ] ) ) ) - # - # Add extra pads on 3rd level spectator platform - if treeLevel <> 0 : - height = treeLevel + 23 - else : - height = 0 - p1 = Point( -1 , 0 , -1 ) - p2 = Point( 1 , 48 + 13.9 , 1 ) - p = Point( 0 , height , -20 ) - u.add( Box( p1 , p2 ).at( p ) ) - p1 = Point( -10 , 0 , -10 ) - p2 = Point( 10 , 0.1 , 10 ) - p = Point( 0 , height + 13.9 + 16 , -20 ) - u.add( Box( p1 , p2 ).at( p ) ) - p1 = Point( -7 , 0 , -7 ) - p2 = Point( 7 , 0.1 , 7 ) - p = Point( 0 , height + 13.9 + 32 , -20 ) - u.add( Box( p1 , p2 ).at( p ) ) - p1 = Point( -3 , 0 , -3 ) - p2 = Point( 3 , 0.1 , 3 ) - p = Point( 0 , height + 13.9 + 48 , -20 ) - u.add( Box( p1 , p2 ).at( p ) ) - # and turn it in to a tree for Smidge204... - p1 = Point( -13 , 0 , -13 ) - p2 = Point( 13 , 20 , 13 ) - p = Point( 0 , height + 13.9 + 16 - 4 , -20 ) - c = Color( 0 , 5. , .2 , 1 ) - u.add( MeshPyramid( p1 , p2 ).withColor( c ).setFlag( 'drivethrough' ).at( p ) ) - p1 = Point( -10 , 0 , -10 ) - p2 = Point( 10 , 20 , 10 ) - p = Point( 0 , height + 13.9 + 32 - 4 , -20 ) - u.add( MeshPyramid( p1 , p2 ).withColor( c ).setFlag( 'drivethrough' ).at( p ) ) - p1 = Point( -6 , 0 , -6 ) - p2 = Point( 6 , 20 , 6 ) - p = Point( 0 , height + 13.9 + 48 - 4 , -20 ) - u.add( MeshPyramid( p1 , p2 ).withColor( c ).setFlag( 'drivethrough' ).at( p ) ) - - # - # The pool for olympiad (why not..) - # - p = Point( 0 , 0 , 200 ) - u.add( DivingPool().union.at( p ) ) - - # - # Tank Dueling Rings - # - # East - size = context.MW / 3 - 20 - location = world.MW - size - p = Point( x = location ) - d = DuellingRing( context , size , specTeleport = tn[ 3 ] , flags = floorFlags ) - u.add( d.union.at( p ) ) - - # West dueling ring with rotated boxes for ricochet - p = Point( x = -location ) - d = DuellingRing( context , size , specTeleport = tn[ 3 ] , flags = floorFlags ) - u.add( d.union.at( p ) ) - numObstacles = rand( 20 ) + 20 - for i in range( numObstacles ) : - height = 19 - width = rand( 10 ) + 2 - length = rand( 10 ) + 2 - rotation = rand( 9 ) * 11.25 - 45 - x = rand( int( size * 2 ) ) - int( size ) - z = rand( int( size * 2 ) ) - int( size ) - p1 = Point( -width / 2 , 0 , -length / 2 ) - p2 = Point( width / 2 , height , length / 2 ) - p = Point( x - location , 0 , z ) - u.add( Box( p1 , p2 ).rotate( rotation).at( p ) ) - - # South dueling ring with pyramid obstacles and roof - p = Point( z = -location ) - d = DuellingRing( context , size , specTeleport = tn[ 3 ] , roof = True , flags = floorFlags ) - u.add( d.union.at( p ) ) - numObstacles = rand( 20 ) + 20 - for i in range( numObstacles ) : - height = rand( 40 ) / 10 + 3 - width = rand( 10 ) + 2 - length = rand( 10 ) + 2 - x = rand( int( size * 2 ) ) - int( size ) - z = rand( int( size * 2 ) ) - int( size ) - p1 = Point( -width / 2 , 0 , -length / 2 ) - p2 = Point( width / 2 , height , length / 2 ) - p = Point( x , 0 , z - location ) - u.add( Pyramid( p1 , p2 ).at( p ) ) + + obstower = ObservingTower() + u.add( obstower.union ) + + pool = DivingPool() + u.add( pool.union ) + + # # Zone for spawning new tanks # - limit = 200 - p1 = Point( -limit , 0 , -limit ) - p2 = Point( limit , 1 , limit ) - z = Zone( p1, p2 ) - for t in [ Team.Rogue , Team.Red , Team.Blue , Team.Green , Team.Purple ] : - z.withTeam( t ) - u.add( z ) +# +# p1 = Point( -limit , 0 , -limit ) +# p2 = Point( limit , 1 , limit ) +# z = Zone( p1, p2 ) +# for t in [ Team.Rogue , Team.Red , Team.Blue , Team.Green , Team.Purple ] : +# z.withTeam( t ) +# u.add( z ) # # Add a huge rock climbing wall on the floor @@ -1332,25 +1333,6 @@ u.add( World( size = world.MW + 150 ) ) - # - # Add the space station - # - p = Point( 0, 3100, 0 ) - u.add( SpaceStation().union.at( p ) ) - - # - # Teleporters to the space station - # - p = Point( 0, 0, 75 ) - t1 = Teleporter( Point( -5, 0, -2) , Point ( 5, 10, 2 ) , 'N' , True - ).at( p ) - p = Point( 46, 3102, 0 ) - t2 = Teleporter( Point( -2, 0, 5) , Point ( 2, 10, -5 ) , 'E' , - True ).at( p ) - u.add( t1 ) - u.add( t2 ) - u.add( Link ( AllSides( t1 ), BackSide( t2 ) ) ) - u.add( Link ( AllSides( t2 ), BackSide( t1 ) ) ) # # Obstacle Report for this generation of the race track...