1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-06-07 08:54:07 +00:00
2025-04-19 22:12:26 +02:00

37 lines
688 B
C++

namespace rogue_unlike {
void handle_powers(data& d);
void man::act() {
kino();
data dat;
dat.d = get_scale();
dat.modv = 60. / game_fps;
dat.moda = dat.modv * dat.modv;
dat.dx = 0;
coyote_time = next_coyote_time; next_coyote_time = 0;
jump_control = next_jump_control; next_jump_control = 0;
if(on_floor) on_floor_when = gframeid;
fallthru = false;
handle_powers(dat);
if((on_floor || jump_control || wallhug) && !on_ice) {
vel_x = dat.dx * dat.d * dat.modv * 2.5;
}
if(on_bounce) {
vel_x += dat.dx * dat.d * dat.modv * 0.02;
}
if(dat.dx) facing = dat.dx;
current_room->fov_from(where_x / block_x, where_y / block_y);
}
}