- added the ability to attach a constructor or destructor to an internally defined struct.
There are a few which require explicit native construction or destruction that need to be exported to the VM, e.g. FCheckPosition. The VM cannot handle this directly, it needs two special functions to be attached to handle such elements.
This commit is contained in:
parent
ca2ac4e4fd
commit
5ef9429ae4
10 changed files with 132 additions and 13 deletions
|
|
@ -84,6 +84,28 @@ TArray<spechit_t> spechit;
|
|||
TArray<spechit_t> portalhit;
|
||||
|
||||
|
||||
// FCheckPosition requires explicit contstruction and destruction when used in the VM
|
||||
DEFINE_ACTION_FUNCTION(_FCheckPosition, _Constructor)
|
||||
{
|
||||
PARAM_SELF_STRUCT_PROLOGUE(FCheckPosition);
|
||||
new(self) FCheckPosition;
|
||||
return 0;
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(_FCheckPosition, _Destructor)
|
||||
{
|
||||
PARAM_SELF_STRUCT_PROLOGUE(FCheckPosition);
|
||||
self->~FCheckPosition();
|
||||
return 0;
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(_FCheckPosition, ClearLastRipped)
|
||||
{
|
||||
PARAM_SELF_STRUCT_PROLOGUE(FCheckPosition);
|
||||
self->LastRipped.Clear();
|
||||
return 0;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// CanCollideWith
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue