- scriptified PowerProtection and PowerDamage.

- made ModifyDamage calls iterative instead of recursive. With going through the VM they'd be too costly otherwise.
- small optimization: Detect empty VM functions right when entering the VM and shortcut them. This is to reduce the overhead of virtual placeholders, which in a few cases (e.g. CanCollideWith and ModifyDamage) can be called quite frequently.
This commit is contained in:
Christoph Oelckers 2017-01-01 23:11:48 +01:00
commit 9948189193
10 changed files with 204 additions and 177 deletions

View file

@ -91,12 +91,6 @@ TArray<spechit_t> portalhit;
//
//==========================================================================
DEFINE_ACTION_FUNCTION(AActor, CanCollideWith)
{
// No need to check the parameters, as they are not even used.
ACTION_RETURN_BOOL(true);
}
bool P_CanCollideWith(AActor *tmthing, AActor *thing)
{
static unsigned VIndex = ~0u;