mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-01-09 10:29:45 +01:00
Wrap around enemy type when switching enemy types
Whoops. Forgot to do this earlier when adding the Shift+F3 hotkey. Otherwise the enemy type would become invalid and just turn into the default square.
This commit is contained in:
parent
fb8cb705da
commit
af89c52813
1 changed files with 8 additions and 2 deletions
|
@ -1686,15 +1686,21 @@ void editorclass::switch_enemy(const bool reversed /*= false*/)
|
|||
}
|
||||
edlevelclass& room = level[roomnum];
|
||||
|
||||
int enemy = room.enemytype;
|
||||
|
||||
if (reversed)
|
||||
{
|
||||
room.enemytype--;
|
||||
enemy--;
|
||||
}
|
||||
else
|
||||
{
|
||||
room.enemytype++;
|
||||
enemy++;
|
||||
}
|
||||
|
||||
const int modulus = 10;
|
||||
enemy = (enemy % modulus + modulus) % modulus;
|
||||
room.enemytype = enemy;
|
||||
|
||||
note = "Enemy Type Changed";
|
||||
notedelay = 45;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue