;VODDATA Latitude Longitude Not_used Scale Rotation Not_used Not_used Not_used Not_used Visibility Not_used Scenery_complexity(0-4) Not_used Not_used 
;MACRODESC Metal Fence By Paul Emsley

; Macro generated using VOD v3.0

; Author : Scenery made By Paul Emsley

; %1  = Latitude
; %2  = Longitude
; %3  = Not used
; %4  = Scale
; %5  = Rotation
; %6  = Not used
; %7  = Not used
; %8  = Not used
; %9  = Not used
; %10 = Visibility range
; %11 = Not used
; %12 = Scenery complexity
;

; Metal Fence By Paul Emsley

Area( 5 %1 %2 22 )
IfVarRange( : 346 %12 4 )
     PerspectiveCall( :m_fence_pc01 )
     Jump( : )
:m_fence_pc01
Perspective
RefPoint( 7 :m_fence_SubEnd  %4 %1 %2 v1= %10 )
RotatedCall( :m_fence_b1 0 0 %5 )
:m_fence_SubEnd
    Return
:m_fence_b1
    ShadowCall( :m_fence_b2 )
:m_fence_b2
Monitor3D( :m_fence_nocrash -20 20 0 15 -0 0 )
Setvar( 284 14 )
:m_fence_nocrash
    VectorJump( :m_fence_West  32767 0     0  0 )
    VectorJump( :m_fence_SouthEast  0    0   32767  0 )
:m_fence_NorthEast
    Call( :m_fence_module01 )   ; fence
Return
:m_fence_SouthEast
    Call( :m_fence_module01 )   ; fence
Return
:m_fence_West
    VectorJump( :m_fence_SouthWest 0   0    32767  0 )
:m_fence_NorthWest
    Call( :m_fence_module01 )   ; fence
Return
:m_fence_SouthWest
    Call( :m_fence_module01 )   ; fence
Return
;
; Module description: fence
;
:m_fence_module01
Points( 0
    -20 0 0                            ; 0
    20 0 0                             ; 1
    20 0 0                             ; 2
    -20 0 0                            ; 3
    -20 15 0                           ; 4
    20 15 0                            ; 5
    20 15 0                            ; 6
    -20 15 0                           ; 7
)
Bitmap( FENCE_2.PAT 0 0 0 0 )
ConcavePoly
BitmapMode( 1 )
Inst_7D
TexPoly(   a   ; External Front
    0   0  248
    4   0  145
    5   255  145
    1   255  248
      )
BitmapMode( 0 )
ConcavePoly
BitmapMode( 1 )
Inst_7D
TexPoly(   a   ; External Back
    2   0  248
    6   0  145
    7   255  145
    3   255  248
      )
BitmapMode( 0 )
Return
EndA
