Skip to content

Instantly share code, notes, and snippets.

@PilzAdam
Created December 12, 2014 15:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PilzAdam/c2d1c3258d2b9dfac2a1 to your computer and use it in GitHub Desktop.
Save PilzAdam/c2d1c3258d2b9dfac2a1 to your computer and use it in GitHub Desktop.
bool walking = movement_XZ && player->touching_ground;
bool swimming = (movement_XZ || movement_Y) && player->in_liquid);
const bool climbing = movement_Y && player->is_climbing;
if ((walking || swimming || climbing) &&
m_cache_view_bobbing &&
(!g_settings->getBool("free_move") || !m_gamedef->checkLocalPrivilege("fly")))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment