1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-18 10:38:31 +02:00

Fix rescuable crewmates not warping

The game excluded every entity whose `type` was 50 or higher. The `type`
of rescuable crewmates is 55.

Could some levels be broken by this behavior? Unlikely; without warping,
the crewmates would end up falling out of the room and would become
unrescuable. So this is more likely to fix than to break.

But more importantly, *no one knows that rescuable crewmates don't
warp*. If anyone would know, it would be me, because I've been in the
custom levels community for over 7 years - and yet, during that time, I
have not seen anyone run into this corner case. If they did, I would
remember! This implies that people simply have never thought about
putting rescuable crewmates in places where they would warp - or they
have, ran into this issue, and worked around it.

With those two reasons, I'm comfortable fixing this inconsistency.
This commit is contained in:
Misa 2021-04-22 15:41:09 -07:00 committed by Ethan Lee
parent 0e167a27d1
commit 78c319c34d

View File

@ -961,7 +961,8 @@ void gamelogic(void)
size_t i;
for (i = 0; i < obj.entities.size(); ++i)
{
if (obj.entities[i].type >= 50 /* Don't warp warp lines */
if ((obj.entities[i].type >= 51
&& obj.entities[i].type <= 54) /* Don't warp warp lines */
|| obj.entities[i].size >= 12) /* Don't warp gravitron squares */
{
continue;
@ -1018,7 +1019,8 @@ void gamelogic(void)
size_t i;
for (i = 0; i < obj.entities.size(); ++i)
{
if (obj.entities[i].type >= 50) /* Don't warp warp lines */
if (obj.entities[i].type >= 51
&& obj.entities[i].type <= 54) /* Don't warp warp lines */
{
continue;
}
@ -1049,7 +1051,8 @@ void gamelogic(void)
size_t i;
for (i = 0; i < obj.entities.size(); ++i)
{
if (obj.entities[i].type >= 50 /* Don't warp warp lines */
if ((obj.entities[i].type >= 51
&& obj.entities[i].type <= 54) /* Don't warp warp lines */
|| obj.entities[i].rule == 0) /* Don't warp the player */
{
continue;