mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2026-01-02 02:19:02 +00:00
ru:: snake reverse-on-hit fixed
This commit is contained in:
@@ -528,6 +528,7 @@ void snake::act() {
|
||||
|
||||
void snake::attacked(int dmg) {
|
||||
enemy::attacked(dmg);
|
||||
dir *= -1;
|
||||
if(where.x < m.where.x) vel.x = -abs(vel.x);
|
||||
if(where.x > m.where.x) vel.x = +abs(vel.x);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user