mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-31 02:14:09 +03:00
Move logical onground/onroof updates to start of gamelogic
This reintroduces 2-frame edge-flipping after the 1-frame input delay got removed. This is because along with processing input and moving Viridian, logical onground/onroof assignments need to processed in the same between-render sequence as well - otherwise Viridian only gets 1 frame of edge-flipping due to frame ordering.
This commit is contained in:
@@ -26,28 +26,24 @@ void gamerenderfixed(void)
|
||||
{
|
||||
for (size_t i = 0; i < obj.entities.size(); i++)
|
||||
{
|
||||
//Is this entity on the ground? (needed for jumping)
|
||||
if (obj.entitycollidefloor(i))
|
||||
{
|
||||
obj.entities[i].onground = 2;
|
||||
obj.entities[i].visualonground = 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
obj.entities[i].onground--;
|
||||
--obj.entities[i].visualonground;
|
||||
}
|
||||
|
||||
if (obj.entitycollideroof(i))
|
||||
{
|
||||
obj.entities[i].onroof = 2;
|
||||
obj.entities[i].visualonroof = 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
obj.entities[i].onroof--;
|
||||
--obj.entities[i].visualonroof;
|
||||
}
|
||||
|
||||
obj.entities[i].visualonground = obj.entities[i].onground;
|
||||
obj.entities[i].visualonroof = obj.entities[i].onroof;
|
||||
|
||||
//Animate the entities
|
||||
obj.animateentities(i);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user