mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
Add EVENT_PREGAME. Now all sprites are processed in the following fashion:
1. EVENT_PREGAME 2. hardcoded stuff 3. EVENT_GAME One potential use is to examine values which are clobbered by commands such as ifhitweapon/ifwasweapon. git-svn-id: https://svn.eduke32.com/eduke32@2973 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
6650f34105
commit
2620738eb9
4 changed files with 31 additions and 1 deletions
|
@ -8061,6 +8061,33 @@ int32_t A_CheckSwitchTile(int32_t i)
|
||||||
|
|
||||||
void G_MoveWorld(void)
|
void G_MoveWorld(void)
|
||||||
{
|
{
|
||||||
|
{
|
||||||
|
int32_t j, k = MAXSTATUS-1, pl;
|
||||||
|
do
|
||||||
|
{
|
||||||
|
int32_t i = headspritestat[k];
|
||||||
|
|
||||||
|
while (i >= 0)
|
||||||
|
{
|
||||||
|
if (!apScriptGameEvent[EVENT_PREGAME] || A_CheckSpriteFlags(i, SPRITE_NOEVENTCODE))
|
||||||
|
{
|
||||||
|
i = nextspritestat[i];
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
j = nextspritestat[i];
|
||||||
|
|
||||||
|
{
|
||||||
|
int32_t p;
|
||||||
|
pl = A_FindPlayer(&sprite[i], &p);
|
||||||
|
VM_OnEvent(EVENT_PREGAME,i, pl, p, 0);
|
||||||
|
}
|
||||||
|
i = j;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
while (k--);
|
||||||
|
}
|
||||||
|
|
||||||
G_MoveZombieActors(); //ST 2
|
G_MoveZombieActors(); //ST 2
|
||||||
G_MoveWeapons(); //ST 4
|
G_MoveWeapons(); //ST 4
|
||||||
G_MoveTransports(); //ST 9
|
G_MoveTransports(); //ST 9
|
||||||
|
|
|
@ -666,7 +666,8 @@ const tokenlist EventNames[MAXEVENTS] =
|
||||||
{ "EVENT_CHECKTOUCHDAMAGE", EVENT_CHECKTOUCHDAMAGE },
|
{ "EVENT_CHECKTOUCHDAMAGE", EVENT_CHECKTOUCHDAMAGE },
|
||||||
{ "EVENT_CHECKFLOORDAMAGE", EVENT_CHECKFLOORDAMAGE },
|
{ "EVENT_CHECKFLOORDAMAGE", EVENT_CHECKFLOORDAMAGE },
|
||||||
{ "EVENT_LOADGAME", EVENT_LOADGAME },
|
{ "EVENT_LOADGAME", EVENT_LOADGAME },
|
||||||
{ "EVENT_SAVEGAME", EVENT_SAVEGAME }
|
{ "EVENT_SAVEGAME", EVENT_SAVEGAME },
|
||||||
|
{ "EVENT_PREGAME", EVENT_PREGAME }
|
||||||
};
|
};
|
||||||
|
|
||||||
const memberlabel_t SectorLabels[]=
|
const memberlabel_t SectorLabels[]=
|
||||||
|
|
|
@ -123,6 +123,7 @@ enum GameEvent_t {
|
||||||
EVENT_CHECKFLOORDAMAGE, // 90
|
EVENT_CHECKFLOORDAMAGE, // 90
|
||||||
EVENT_LOADGAME,
|
EVENT_LOADGAME,
|
||||||
EVENT_SAVEGAME,
|
EVENT_SAVEGAME,
|
||||||
|
EVENT_PREGAME,
|
||||||
MAXEVENTS
|
MAXEVENTS
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -158,6 +158,7 @@ labels =
|
||||||
EVENT_CHECKFLOORDAMAGE = 90,
|
EVENT_CHECKFLOORDAMAGE = 90,
|
||||||
EVENT_LOADGAME = 91,
|
EVENT_LOADGAME = 91,
|
||||||
EVENT_SAVEGAME = 92,
|
EVENT_SAVEGAME = 92,
|
||||||
|
EVENT_PREGAME = 93,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue