mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 10:09:43 +01:00
Don't remove non-player entities in scriptclass::hardreset()
When I moved duplicate player entity removal to scriptclass::hardreset(), I also inadvertently made it so all non-player entities got removed as well, even though this wasn't my intent. And thus, pressing Enter to restart a time trial removes every entity except the player, since it calls script.hardreset(). The time trial script.hardreset() is bad for other reasons (see #367), however it's still a good idea to reset only what's needed in script.hardreset().
This commit is contained in:
parent
199a8f45d6
commit
582aaa587e
1 changed files with 1 additions and 1 deletions
|
@ -3713,7 +3713,7 @@ void scriptclass::hardreset()
|
|||
// Remove duplicate player entities
|
||||
for (int i = 0; i < (int) obj.entities.size(); i++)
|
||||
{
|
||||
if (i != theplayer)
|
||||
if (obj.entities[i].rule == 0 && i != theplayer)
|
||||
{
|
||||
removeentity_iter(i);
|
||||
theplayer--; // just in case indice of player is not 0
|
||||
|
|
Loading…
Reference in a new issue