mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 01:59:43 +01:00
Add entityclass::nocollisionat()
This function will disable a block instead of removing it entirely, mimicking the previous `active` system of 2.2.
This commit is contained in:
parent
b3b1a0696b
commit
d8cee4866e
2 changed files with 17 additions and 0 deletions
|
@ -1081,6 +1081,21 @@ void entityclass::removeblockat( int x, int y )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void entityclass::nocollisionat(int x, int y)
|
||||||
|
{
|
||||||
|
for (size_t i = 0; i < blocks.size(); i++)
|
||||||
|
{
|
||||||
|
if (blocks[i].xp == x && blocks[i].yp == y)
|
||||||
|
{
|
||||||
|
blocks[i].wp = 0;
|
||||||
|
blocks[i].hp = 0;
|
||||||
|
|
||||||
|
blocks[i].rect.w = blocks[i].wp;
|
||||||
|
blocks[i].rect.h = blocks[i].hp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void entityclass::removetrigger( int t )
|
void entityclass::removetrigger( int t )
|
||||||
{
|
{
|
||||||
for(size_t i=0; i<blocks.size(); i++)
|
for(size_t i=0; i<blocks.size(); i++)
|
||||||
|
|
|
@ -79,6 +79,8 @@ public:
|
||||||
|
|
||||||
void removeblockat(int x, int y);
|
void removeblockat(int x, int y);
|
||||||
|
|
||||||
|
void nocollisionat(int x, int y);
|
||||||
|
|
||||||
void removetrigger(int t);
|
void removetrigger(int t);
|
||||||
|
|
||||||
void copylinecross(int t);
|
void copylinecross(int t);
|
||||||
|
|
Loading…
Reference in a new issue