- fixed damage handling in A_BetaSkullAttack. For unknown reasons this completely bypassed the normal damage function semantics and even multiplied that with a random value.
- made some tests about calling script code from native functions. * scriptified A_SkullAttack to have something to test * changed the A_SkullAttack call in A_PainShootSkull. * use a macro to declare the function pointer. Using local static variable init directly results in hideous code for the need of being thread-safe (which, even if the engine was made multithreaded is not needed here.) * Importsnt node here: Apparently passing an actor pointer to the VMValue constructor results in the void * version being called, not the DObject * version.
This commit is contained in:
parent
dbde0971ef
commit
062574b726
12 changed files with 97 additions and 98 deletions
|
|
@ -6445,6 +6445,12 @@ FName AActor::GetSpecies()
|
|||
return Species = thistype->TypeName; // [GZ] Speeds up future calls.
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(AActor, GetSpecies)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(AActor);
|
||||
ACTION_RETURN_INT(self->GetSpecies());
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// AActor :: IsFriend
|
||||
|
|
@ -6850,6 +6856,14 @@ DEFINE_ACTION_FUNCTION(AActor, VelFromAngle)
|
|||
return 0;
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(AActor, DistanceBySpeed)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(AActor);
|
||||
PARAM_OBJECT(targ, AActor);
|
||||
PARAM_FLOAT(speed);
|
||||
ACTION_RETURN_FLOAT(self->DistanceBySpeed(targ, speed));
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(AActor, SetXYZ)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(AActor);
|
||||
|
|
@ -6879,6 +6893,7 @@ DEFINE_ACTION_FUNCTION(AActor, Vec2OffsetZ)
|
|||
PARAM_BOOL_DEF(absolute);
|
||||
ACTION_RETURN_VEC3(self->Vec2OffsetZ(x, y, z, absolute));
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
// DropItem handling
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue