mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01:00
Fix the flipgravity() internal command (#78)
There are two main problems with flipgravity(): 1. It doesn't work for an already-flipped crewmate. 2. It doesn't work on the player. This commit addresses both of those issues.
This commit is contained in:
parent
6a0ee21082
commit
10ed0058fd
1 changed files with 37 additions and 26 deletions
|
@ -927,35 +927,46 @@ void scriptclass::run( KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map,
|
||||||
//not something I'll use a lot, I think. Doesn't need to be very robust!
|
//not something I'll use a lot, I think. Doesn't need to be very robust!
|
||||||
if (words[1] == "player")
|
if (words[1] == "player")
|
||||||
{
|
{
|
||||||
i=obj.getplayer();
|
game.gravitycontrol = !game.gravitycontrol;
|
||||||
}
|
}
|
||||||
else if (words[1] == "cyan")
|
else
|
||||||
{
|
{
|
||||||
i=obj.getcrewman(0);
|
if (words[1] == "cyan")
|
||||||
}
|
{
|
||||||
else if (words[1] == "red")
|
i=obj.getcrewman(0);
|
||||||
{
|
}
|
||||||
i=obj.getcrewman(3);
|
else if (words[1] == "red")
|
||||||
}
|
{
|
||||||
else if (words[1] == "green")
|
i=obj.getcrewman(3);
|
||||||
{
|
}
|
||||||
i=obj.getcrewman(4);
|
else if (words[1] == "green")
|
||||||
}
|
{
|
||||||
else if (words[1] == "yellow")
|
i=obj.getcrewman(4);
|
||||||
{
|
}
|
||||||
i=obj.getcrewman(2);
|
else if (words[1] == "yellow")
|
||||||
}
|
{
|
||||||
else if (words[1] == "blue")
|
i=obj.getcrewman(2);
|
||||||
{
|
}
|
||||||
i=obj.getcrewman(5);
|
else if (words[1] == "blue")
|
||||||
}
|
{
|
||||||
else if (words[1] == "purple")
|
i=obj.getcrewman(5);
|
||||||
{
|
}
|
||||||
i=obj.getcrewman(1);
|
else if (words[1] == "purple")
|
||||||
}
|
{
|
||||||
|
i=obj.getcrewman(1);
|
||||||
|
}
|
||||||
|
|
||||||
obj.entities[i].rule =7;
|
if (obj.entities[i].rule == 6)
|
||||||
obj.entities[i].tile = 6;
|
{
|
||||||
|
obj.entities[i].rule = 7;
|
||||||
|
obj.entities[i].tile = 6;
|
||||||
|
}
|
||||||
|
else if (obj.entities[i].rule == 7)
|
||||||
|
{
|
||||||
|
obj.entities[i].rule = 6;
|
||||||
|
obj.entities[i].tile = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (words[0] == "changegravity")
|
else if (words[0] == "changegravity")
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue