#NEWLINE# def advance( self , t ) : #NEWLINE# #INDENT# if self . world . physics_on : #NEWLINE# #INDENT# self . vel += ( ( ( self . uy * self . world . gravity ) * t ) / 1000.0 ) #NEWLINE# ( nx , ny , nz ) = ( self . x , self . y , self . z ) #NEWLINE# nx += ( ( self . vel [ 0 ] * t ) / 1000.0 ) #NEWLINE# ny += ( ( self . vel [ 1 ] * t ) / 1000.0 ) #NEWLINE# nz += ( ( self . vel [ 2 ] * t ) / 1000.0 ) #NEWLINE# ( self . x , self . y , self . z ) = self . world . legal_move ( self , nx , ny , nz ) #NEWLINE# if ( self . x != nx ) : #NEWLINE# #INDENT# self . vel [ 0 ] = 0.0 #NEWLINE# #UNINDENT# if ( self . y != ny ) : #NEWLINE# #INDENT# self . vel [ 1 ] = 0.0 #NEWLINE# self . supported = True #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . supported = False #NEWLINE# #UNINDENT# if ( self . z != nz ) : #NEWLINE# #INDENT# self . vel [ 2 ] = 0.0