CON: Add spawnceilingglass, spawnwallglass, and spawnwallstainedglass commands.

Patch from Striker.

git-svn-id: https://svn.eduke32.com/eduke32@6824 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2018-04-11 03:33:59 +00:00
parent d41f233045
commit 6eeb14a12f
3 changed files with 36 additions and 0 deletions

View file

@ -470,6 +470,9 @@ static tokenmap_t const vm_keywords[] =
{ "soundoncevar", CON_SOUNDONCEVAR },
{ "soundvar", CON_SOUNDVAR },
{ "spawn", CON_SPAWN },
{ "spawnceilingglass", CON_SPAWNCEILINGGLASS },
{ "spawnwallstainedglass", CON_SPAWNWALLSTAINEDGLASS },
{ "spawnwallglass", CON_SPAWNWALLGLASS },
{ "spgethitag", CON_SPGETHITAG },
{ "spgetlotag", CON_SPGETLOTAG },
{ "spriteflags", CON_SPRITEFLAGS },
@ -4257,6 +4260,9 @@ DO_DEFSTATE:
case CON_STARTTRACKSLOT:
case CON_SWAPTRACKSLOT:
case CON_PRELOADTRACKSLOTFORSWAP:
case CON_SPAWNWALLGLASS:
case CON_SPAWNWALLSTAINEDGLASS:
case CON_SPAWNCEILINGGLASS:
C_GetManyVars(2);
continue;

View file

@ -1249,6 +1249,9 @@ enum ScriptKeywords_t
CON_SETTILEDATA, // 428
CON_DAMAGEEVENTTILE, // 429
CON_DAMAGEEVENTTILERANGE, // 430
CON_SPAWNWALLGLASS, // 431
CON_SPAWNWALLSTAINEDGLASS, // 432
CON_SPAWNCEILINGGLASS, // 433
CON_END
};
// KEEPINSYNC with the keyword list in lunatic/con_lang.lua

View file

@ -1847,6 +1847,33 @@ skip_check:
A_SpawnGlass(vm.spriteNum,*insptr++);
continue;
case CON_SPAWNWALLGLASS:
insptr++;
{
int const wallNum = Gv_GetVarX(*insptr++);
int const numShards = Gv_GetVarX(*insptr++);
A_SpawnWallGlass(vm.spriteNum, wallNum, numShards);
}
continue;
case CON_SPAWNWALLSTAINEDGLASS:
insptr++;
{
int const wallNum = Gv_GetVarX(*insptr++);
int const numShards = Gv_GetVarX(*insptr++);
A_SpawnRandomGlass(vm.spriteNum, wallNum, numShards);
}
continue;
case CON_SPAWNCEILINGGLASS:
insptr++;
{
int const sectNum = Gv_GetVarX(*insptr++);
int const numShards = Gv_GetVarX(*insptr++);
A_SpawnCeilingGlass(vm.spriteNum, sectNum, numShards);
}
continue;
case CON_KILLIT:
insptr++;
vm.flags |= VM_KILL;