1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-23 01:59:43 +01:00

Allow calling flipgravity() on duplicate player entities

This is a followup to b7cf6855b0 and
10ed0058fd.

In 2.2, if you had a duplicate player entity, there'd be no way to get
rid of it. Except for the recently-discovered Arbitrary Entity
Manipulation glitch, where you set `i` to the indice of the entity and
call flipgravity() on it, turning its rule to 7 and making it no longer
a player entity.

However, I patched this useful mechanic out when I made it so that you'd
no longer be able to convert entities with rule 0 to rule 6
(10ed0058fd, upheld in
b7cf6855b0), because doing so would mean
being able to softlock the game by not having any player entity.

So, in this patch, I'm making it so that you CAN convert duplicate
player entities to crewmates (and thus basically destroy them), but you
can't do that to the TRUE player entity (i.e. the first entity indice
that has rule 0, which is basically always indice 0).
This commit is contained in:
Misa 2020-09-17 20:02:29 -07:00 committed by Ethan Lee
parent 42010f8f42
commit 5b9a8e5f08

View file

@ -1006,7 +1006,7 @@ void scriptclass::run()
obj.entities[i].rule = 7;
obj.entities[i].tile = 6;
}
else if (obj.entities[i].rule != 0) // Don't destroy player entity (rule 0)
else if (obj.getplayer() != i) // Don't destroy player entity
{
obj.entities[i].rule = 6;
obj.entities[i].tile = 0;