mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 01:59:43 +01:00
Don't duplicate activity zone handling code in playtesting
This change makes it so that in in-editor playtesting, the code to handle pressing ENTER on activity zones is the same code to handle pressing ENTER on activity zones in custommodeforreal. This removes the need to copy-paste code and adapt it to in-editor playtesting. And thus, this fixes an editor artifact where you can press ENTER on activity zones while doing the death animation, even though you can't do that when you're playing custom levels normally.
This commit is contained in:
parent
610768658e
commit
e69cc964ab
1 changed files with 2 additions and 7 deletions
|
@ -1527,17 +1527,12 @@ void gameinput()
|
||||||
#if !defined(NO_CUSTOM_LEVELS)
|
#if !defined(NO_CUSTOM_LEVELS)
|
||||||
if(map.custommode && !map.custommodeforreal){
|
if(map.custommode && !map.custommodeforreal){
|
||||||
if ((game.press_map || key.isDown(27)) && !game.mapheld){
|
if ((game.press_map || key.isDown(27)) && !game.mapheld){
|
||||||
game.mapheld = true;
|
|
||||||
//Return to level editor
|
//Return to level editor
|
||||||
if (game.activeactivity > -1 && game.press_map){
|
if (game.activeactivity > -1 && game.press_map){
|
||||||
if((int(std::abs(obj.entities[obj.getplayer()].vx))<=1) && (int(obj.entities[obj.getplayer()].vy) == 0) )
|
//pass, let code block below handle it
|
||||||
{
|
|
||||||
script.load(obj.blocks[game.activeactivity].script);
|
|
||||||
obj.removeblock(game.activeactivity);
|
|
||||||
game.activeactivity = -1;
|
|
||||||
}
|
|
||||||
}else{
|
}else{
|
||||||
game.shouldreturntoeditor = true;
|
game.shouldreturntoeditor = true;
|
||||||
|
game.mapheld = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue