mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Move onground/onroof/animateentities logic to start of gamelogic()
For some reason, it was put near the start of gamerender(), even though since it handles edge-flipping it seems like it should be in the logic function already. This makes sure entity animations don't animate as fast as possible, and also fixes edge-flipping on normal surfaces.
This commit is contained in:
@@ -119,6 +119,34 @@ void gamecompletelogic2()
|
||||
|
||||
void gamelogic()
|
||||
{
|
||||
if (!game.blackout && !game.completestop)
|
||||
{
|
||||
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;
|
||||
}
|
||||
else
|
||||
{
|
||||
obj.entities[i].onground--;
|
||||
}
|
||||
|
||||
if (obj.entitycollideroof(i))
|
||||
{
|
||||
obj.entities[i].onroof = 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
obj.entities[i].onroof--;
|
||||
}
|
||||
|
||||
//Animate the entities
|
||||
obj.animateentities(i);
|
||||
}
|
||||
}
|
||||
|
||||
//Misc
|
||||
if (map.towermode)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user