mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 01:48:15 +03:00
Fix ZZT centipedes (or ASCII snakes) zipping around
This is because their oldxp wasn't being updated when they move (or rather, teleport) and wrap around the screen. These enemies are ZZT centipedes, but they're referred to as ASCII snakes in comments in the code.
This commit is contained in:
@@ -2376,6 +2376,7 @@ bool entityclass::updateentities( int i )
|
||||
{
|
||||
entities[i].statedelay = 6;
|
||||
entities[i].xp -= int(entities[i].para);
|
||||
entities[i].oldxp -= int(entities[i].para);
|
||||
}
|
||||
break;
|
||||
case 18: //Special for ASCII Snake (right)
|
||||
@@ -2383,6 +2384,7 @@ bool entityclass::updateentities( int i )
|
||||
{
|
||||
entities[i].statedelay = 6;
|
||||
entities[i].xp += int(entities[i].para);
|
||||
entities[i].oldxp += int(entities[i].para);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1022,11 +1022,13 @@ void gamelogic()
|
||||
{
|
||||
if (obj.entities[i].isplatform) obj.removeblockat(obj.entities[i].xp, obj.entities[i].yp);
|
||||
obj.entities[i].xp += 400;
|
||||
obj.entities[i].oldxp += 400;
|
||||
}
|
||||
else if (obj.entities[i].xp > 320)
|
||||
{
|
||||
if (obj.entities[i].isplatform) obj.removeblockat(obj.entities[i].xp, obj.entities[i].yp);
|
||||
obj.entities[i].xp -= 400;
|
||||
obj.entities[i].oldxp -= 400;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user