Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FUNCTION pFloodSimple()
- repeat
- water_count = 0
- for i = 1 to 12*16 step 1
- if arr_pipe(i).texture <> 8 and arr_pipe(i).active = 1
- arr_pipe(i).texture = 7
- if arr_pipe(i + 16).texture = 8 then arr_pipe(i).texture = 8
- if arr_pipe(i - 1).texture = 8 then arr_pipe(i).texture = 8
- if arr_pipe(i - 16).texture = 8 then arr_pipe(i).texture = 8
- if arr_pipe(i + 1).texture = 8 then arr_pipe(i).texture = 8
- texture object arr_pipe(i).number, arr_pipe(i).texture
- if arr_pipe(i).texture = 8 then water_count = 1
- ENDIF
- NEXT i
- UNTIL water_count = 0
- ENDFUNCTION
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement