1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-07-27 13:02:49 +00:00

ru:: refactor apply_walls_reflect

This commit is contained in:
Zeno Rogue 2025-05-04 10:23:43 +02:00
parent e03c467967
commit 0096f5f12b
2 changed files with 5 additions and 1 deletions

View File

@ -181,6 +181,7 @@ struct entity {
void kino();
void apply_vel();
void apply_walls();
void apply_walls_reflect();
void apply_grav();
void apply_portal_grav();
virtual void act() { kino(); }

View File

@ -343,7 +343,7 @@ void moving_platform::act() {
where = location_at(gframeid);
}
void kestrel::act() {
void entity::apply_walls_reflect() {
int loopcount = 0;
again:
loopcount++;
@ -383,7 +383,10 @@ void kestrel::act() {
vel.x = -vel.x; goto again;
}
}
}
void kestrel::act() {
apply_walls_reflect();
apply_vel();
if(intersect(get_pixel_bbox(), m.get_pixel_bbox())) {