mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-07-21 02:12:49 +00:00
ru:: refactor apply_walls_reflect
This commit is contained in:
parent
e03c467967
commit
0096f5f12b
@ -181,6 +181,7 @@ struct entity {
|
|||||||
void kino();
|
void kino();
|
||||||
void apply_vel();
|
void apply_vel();
|
||||||
void apply_walls();
|
void apply_walls();
|
||||||
|
void apply_walls_reflect();
|
||||||
void apply_grav();
|
void apply_grav();
|
||||||
void apply_portal_grav();
|
void apply_portal_grav();
|
||||||
virtual void act() { kino(); }
|
virtual void act() { kino(); }
|
||||||
|
@ -343,7 +343,7 @@ void moving_platform::act() {
|
|||||||
where = location_at(gframeid);
|
where = location_at(gframeid);
|
||||||
}
|
}
|
||||||
|
|
||||||
void kestrel::act() {
|
void entity::apply_walls_reflect() {
|
||||||
int loopcount = 0;
|
int loopcount = 0;
|
||||||
again:
|
again:
|
||||||
loopcount++;
|
loopcount++;
|
||||||
@ -383,7 +383,10 @@ void kestrel::act() {
|
|||||||
vel.x = -vel.x; goto again;
|
vel.x = -vel.x; goto again;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void kestrel::act() {
|
||||||
|
apply_walls_reflect();
|
||||||
apply_vel();
|
apply_vel();
|
||||||
|
|
||||||
if(intersect(get_pixel_bbox(), m.get_pixel_bbox())) {
|
if(intersect(get_pixel_bbox(), m.get_pixel_bbox())) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user