mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 01:48:15 +03:00
Set script attribute of custom level script boxes
To avoid going through gamestates, we'll need to carry the name of the script on the script box itself. And to do that, we'll need to set the 'script' attribute of script boxes when translating edentities into real entities in custom levels.
This commit is contained in:
@@ -770,7 +770,7 @@ void entityclass::generateswnwave( int t )
|
||||
}
|
||||
}
|
||||
|
||||
void entityclass::createblock( int t, int xp, int yp, int w, int h, int trig /*= 0*/ )
|
||||
void entityclass::createblock( int t, int xp, int yp, int w, int h, int trig /*= 0*/, const std::string& script /*= ""*/ )
|
||||
{
|
||||
k = blocks.size();
|
||||
|
||||
@@ -793,6 +793,7 @@ void entityclass::createblock( int t, int xp, int yp, int w, int h, int trig /*=
|
||||
block.hp = h;
|
||||
block.rectset(xp, yp, w, h);
|
||||
block.trigger = trig;
|
||||
block.script = script;
|
||||
break;
|
||||
case DAMAGE: //Damage
|
||||
block.type = DAMAGE;
|
||||
|
||||
Reference in New Issue
Block a user