Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.73 KB | None | 0 0
  1. FUNCTION pFloodSimple()
  2.     repeat
  3.     water_count = 0
  4.         for i = 1 to 12*16 step 1
  5.             if arr_pipe(i).texture <> 8 and arr_pipe(i).active = 1
  6.                 arr_pipe(i).texture = 7
  7.  
  8.                 if arr_pipe(i + 16).texture = 8 then arr_pipe(i).texture = 8
  9.                 if arr_pipe(i - 1).texture = 8 then arr_pipe(i).texture = 8
  10.                 if arr_pipe(i - 16).texture = 8 then arr_pipe(i).texture = 8
  11.                 if arr_pipe(i + 1).texture = 8 then arr_pipe(i).texture = 8  
  12.                
  13.                 texture object arr_pipe(i).number, arr_pipe(i).texture
  14.                
  15.         if arr_pipe(i).texture = 8 then water_count = 1
  16.             ENDIF
  17.         NEXT i
  18.     UNTIL water_count = 0
  19. ENDFUNCTION
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement