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:
parent
e03c467967
commit
0096f5f12b
@ -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(); }
|
||||
|
@ -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())) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user