Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- current_chunk = {
- x : floor(player_x / chunk_size),
- y : floor(player_y / chunk_size)
- }
- if (chunk.x != current_chunk.x or chunk.y != current_chunk.y) {
- show_debug_message(current_chunk)
- switch_chunk(current_chunk, chunk)
- chunk = current_chunk
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement