move.txt 464 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. dead state flag for no user input
  2. floor = under feet test
  3. onground?
  4. feet = wading test
  5. waist = swimming test
  6. head = submerged test
  7. if ( floor == solid)
  8. if (head == water)
  9. friction = 0.8;
  10. else if (waist == water)
  11. friction =
  12. else if (feet == water)
  13. friction =
  14. else
  15. friction =
  16. walk code
  17. return;
  18. if (floor == water)
  19. if (head == water)
  20. total underwater
  21. if (waist == water)
  22. treading water
  23. drifting down
  24. if (floor == air)
  25. falling