diff --git a/src/actor.h b/src/actor.h index 833cd2c0ab..6f5ba46a32 100644 --- a/src/actor.h +++ b/src/actor.h @@ -1419,6 +1419,10 @@ public: }; +VMEXPORT_NATIVES_START(AActor, DThinker) + VMEXPORT_NATIVES_FUNC(DropInventory) +VMEXPORT_NATIVES_END(AActor) + class FActorIterator { public: diff --git a/src/dobject.h b/src/dobject.h index 24ba4997c1..183d17dd24 100644 --- a/src/dobject.h +++ b/src/dobject.h @@ -608,6 +608,8 @@ protected: } }; +class AInventory;// + template class DVMObject : public T { @@ -638,6 +640,23 @@ private: { new((EInPlace *)mem) DVMObject; } + +public: + void Destroy() + { + Printf("Destroy\n"); + ExportedNatives::Get()->Destroy(this); + } + void Tick() + { + Printf("Tick\n"); + ExportedNatives::Get()->Tick(this); + } + AInventory *DropInventory(AInventory *item) + { + Printf("DropInventory\n"); + return ExportedNatives::Get()->DropInventory(this, item); + } }; template @@ -655,6 +674,17 @@ ClassReg DVMObject::RegistrationInfo = }; template _DECLARE_TI(DVMObject) +//Initial list +VMEXPORTED_NATIVES_START + VMEXPORTED_NATIVES_FUNC(Destroy) + VMEXPORTED_NATIVES_FUNC(Tick) + VMEXPORTED_NATIVES_FUNC(DropInventory) +VMEXPORTED_NATIVES_END + +VMEXPORT_NATIVES_START(DObject, void) + VMEXPORT_NATIVES_FUNC(Destroy) +VMEXPORT_NATIVES_END(DObject) + // When you write to a pointer to an Object, you must call this for // proper bookkeeping in case the Object holding this pointer has // already been processed by the GC. diff --git a/src/dthinker.cpp b/src/dthinker.cpp index 9c87c46b45..912b5642ef 100644 --- a/src/dthinker.cpp +++ b/src/dthinker.cpp @@ -47,7 +47,7 @@ extern cycle_t BotSupportCycles; extern cycle_t ActionCycles; extern int BotWTG; -IMPLEMENT_CLASS(DThinker, false, false, false, false) +IMPLEMENT_CLASS(DThinker, false, false, false, true) DThinker *NextToThink; diff --git a/src/dthinker.h b/src/dthinker.h index 95985c2fb4..e1020544cf 100644 --- a/src/dthinker.h +++ b/src/dthinker.h @@ -108,6 +108,10 @@ private: DThinker *NextThinker, *PrevThinker; }; +VMEXPORT_NATIVES_START(DThinker, DObject) + VMEXPORT_NATIVES_FUNC(Tick) +VMEXPORT_NATIVES_END(DThinker) + class FThinkerIterator { protected: diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 0fb8794cf3..7c973351fa 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -131,7 +131,7 @@ CVAR (Int, cl_bloodtype, 0, CVAR_ARCHIVE); // CODE -------------------------------------------------------------------- -IMPLEMENT_CLASS(AActor, false, true, true, false) +IMPLEMENT_CLASS(AActor, false, true, true, true) IMPLEMENT_POINTERS_START(AActor) IMPLEMENT_POINTER(target) diff --git a/src/p_user.cpp b/src/p_user.cpp index 0b7d9c3545..f4e52ac2f8 100644 --- a/src/p_user.cpp +++ b/src/p_user.cpp @@ -622,7 +622,7 @@ void player_t::SendPitchLimits() const // //=========================================================================== -IMPLEMENT_CLASS(APlayerPawn, false, true, false, false) +IMPLEMENT_CLASS(APlayerPawn, false, true, false, true) IMPLEMENT_POINTERS_START(APlayerPawn) IMPLEMENT_POINTER(InvFirst)