mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-06-04 19:10:59 +00:00
- scriptified APowerInvisibility.
- changed AlterWeaponSprite so that it doesn't expose renderer internals to the script code.
This commit is contained in:
parent
a5edd421bd
commit
d3ab691afb
12 changed files with 339 additions and 349 deletions
|
@ -3629,6 +3629,25 @@ int AActor::AbsorbDamage(int damage, FName dmgtype)
|
|||
return damage;
|
||||
}
|
||||
|
||||
void AActor::AlterWeaponSprite(visstyle_t *vis)
|
||||
{
|
||||
int changed = 0;
|
||||
TArray<AInventory *> items;
|
||||
// This needs to go backwards through the items but the list has no backlinks.
|
||||
for (AInventory *item = Inventory; item != nullptr; item = item->Inventory)
|
||||
{
|
||||
items.Push(item);
|
||||
}
|
||||
for(int i=items.Size()-1;i>=0;i--)
|
||||
{
|
||||
IFVIRTUALPTR(items[i], AInventory, AlterWeaponSprite)
|
||||
{
|
||||
VMValue params[3] = { items[i], vis, &changed };
|
||||
GlobalVMStack.Call(func, params, 3, nullptr, 0, nullptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void AActor::PlayActiveSound ()
|
||||
{
|
||||
if (ActiveSound && !S_IsActorPlayingSomething (this, CHAN_VOICE, -1))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue