#ifndef PEOPLE_CLIMB_H #define PEOPLE_CLIMB_H /* * Pulling up onto something (a ledge, a wall, over the top of a ladder): * anybody, the player or the others. Climb_start sets the move up (in the * person's climb_move), Climb_update plays it: up, the hands on the edge, * the feet against the face, a knee over, standing on top. */ #include "world/world.h" #define CLIMB_EASY 1.35f /* ledges up to this high (scaled) are climbed with a hand on them */ #define CLIMB_REACH 2.05f /* the hands reach this high over the feet, arms up (scaled): anything up there can be climbed */ enum { CLIMB_EASY_UP, CLIMB_HARD, CLIMB_NO_HANDS, CLIMB_NO_STRENGTH, CLIMB_NO_GRIP }; /* What's in front at climbing distance and could be climbed: its top (the edge), or -1e9. */ float Climb_ledgeAhead(const World *world, const Object *p, Vec3 *probe_out); /* Where the feet are as a climb starts (it eases on from there). */ void Climb_noteFeet(Object *p); /* Where the body will stand up there (the highest point under its footprint). */ float Climb_standHeight(const World *world, const Object *p, Vec3 to, float s); /* Starts pulling up onto the edge at top (probe: where it was found). CLIMB_EASY_UP / CLIMB_HARD: started; else why not. */ int Climb_start(const World *world, Object *p, float top, Vec3 probe); /* From the top of a leaning ladder over its edge onto what it leans on: false if there's nothing to stand on. */ bool Climb_overLadderTop(const World *world, Object *p, const Object *ladder); /* Plays the pull up; true when it's done (standing on top). */ bool Climb_update(const World *world, Object *p, float dt); #endif /* PEOPLE_CLIMB_H */