- scriptified PowerFlight and PowerWeaponLevel2.

This commit is contained in:
Christoph Oelckers 2017-01-15 23:21:38 +01:00
commit d2d6e5d486
25 changed files with 369 additions and 306 deletions

View file

@ -56,6 +56,7 @@
#include "r_utility.h"
#include "cmdlib.h"
#include "g_levellocals.h"
#include "virtual.h"
#include "../version.h"
@ -1529,13 +1530,22 @@ void DBaseStatusBar::DrawPowerups ()
+ (ST_IsLatencyVisible() ? yshift : 0);
for (item = CPlayer->mo->Inventory; item != NULL; item = item->Inventory)
{
if (item->DrawPowerup (x, y))
IFVIRTUALPTR(item, AInventory, DrawPowerup)
{
x -= POWERUPICONSIZE;
if (x < -POWERUPICONSIZE*5)
VMValue params[3] = { item, x, y };
VMReturn ret;
int retv;
ret.IntAt(&retv);
GlobalVMStack.Call(func, params, 3, &ret, 1);
if (retv)
{
x = -20;
y += POWERUPICONSIZE*2;
x -= POWERUPICONSIZE;
if (x < -POWERUPICONSIZE * 5)
{
x = -20;
y += POWERUPICONSIZE * 2;
}
}
}
}