- disabled the scripted virtual function module after finding out that it only works if each single class that may serve as a parent for scripting is explicitly declared.

Needless to say, this is simply too volatile and would require constant active maintenance, not to mention a huge amount of work up front to get going.
It also hid a nasty problem with the Destroy method. Due to the way the garbage collector works, Destroy cannot be exposed to scripts as-is. It may be called from scripts but it may not be overridden from scripts because the garbage collector can call this function after all data needed for calling a scripted override has already been destroyed because if that data is also being collected there is no guarantee that proper order of destruction is observed. So for now Destroy is just a normal native method to scripted classes
This commit is contained in:
Christoph Oelckers 2016-11-24 21:36:02 +01:00
commit 66d28a24b8
149 changed files with 727 additions and 759 deletions

View file

@ -105,7 +105,7 @@ class DSeqActorNode : public DSeqNode
HAS_OBJECT_POINTERS
public:
DSeqActorNode(AActor *actor, int sequence, int modenum);
void Destroy();
void Destroy() override;
void Serialize(FSerializer &arc);
void MakeSound(int loop, FSoundID id)
{
@ -133,7 +133,7 @@ class DSeqPolyNode : public DSeqNode
DECLARE_CLASS(DSeqPolyNode, DSeqNode)
public:
DSeqPolyNode(FPolyObj *poly, int sequence, int modenum);
void Destroy();
void Destroy() override;
void Serialize(FSerializer &arc);
void MakeSound(int loop, FSoundID id)
{
@ -161,7 +161,7 @@ class DSeqSectorNode : public DSeqNode
DECLARE_CLASS(DSeqSectorNode, DSeqNode)
public:
DSeqSectorNode(sector_t *sec, int chan, int sequence, int modenum);
void Destroy();
void Destroy() override;
void Serialize(FSerializer &arc);
void MakeSound(int loop, FSoundID id)
{
@ -285,7 +285,7 @@ void DSeqNode::SerializeSequences (FSerializer &arc)
arc("sndseqlisthead", SequenceListHead);
}
IMPLEMENT_CLASS(DSeqNode, false, true, false, false)
IMPLEMENT_CLASS(DSeqNode, false, true)
IMPLEMENT_POINTERS_START(DSeqNode)
IMPLEMENT_POINTER(m_ChildSeqNode)
@ -429,7 +429,7 @@ FName DSeqNode::GetSequenceName () const
return Sequences[m_Sequence]->SeqName;
}
IMPLEMENT_CLASS(DSeqActorNode, false, true, false, false)
IMPLEMENT_CLASS(DSeqActorNode, false, true)
IMPLEMENT_POINTERS_START(DSeqActorNode)
IMPLEMENT_POINTER(m_Actor)
@ -441,7 +441,7 @@ void DSeqActorNode::Serialize(FSerializer &arc)
arc("actor", m_Actor);
}
IMPLEMENT_CLASS(DSeqPolyNode, false, false, false, false)
IMPLEMENT_CLASS(DSeqPolyNode, false, false)
void DSeqPolyNode::Serialize(FSerializer &arc)
{
@ -449,7 +449,7 @@ void DSeqPolyNode::Serialize(FSerializer &arc)
arc("poly", m_Poly);
}
IMPLEMENT_CLASS(DSeqSectorNode, false, false, false, false)
IMPLEMENT_CLASS(DSeqSectorNode, false, false)
void DSeqSectorNode::Serialize(FSerializer &arc)
{