- revert changes in backend code which will not sync properly with raze

This is a combination of 2 commits.

Revert "New API for assigning unique network ids to objects"

This reverts commit e37c19b5b4.

 This is the commit message #2:

Revert "Fix for Morph virtual"

This reverts commit 0ef042562e.
This commit is contained in:
Rachael Alexanderson 2024-04-17 14:12:13 -04:00
commit ef10467ff8
No known key found for this signature in database
GPG key ID: 26A8ACCE97115EE0
14 changed files with 2 additions and 250 deletions

View file

@ -218,8 +218,6 @@ CCMD (dumpclasses)
//
//==========================================================================
#include "d_net.h"
void DObject::InPlaceConstructor (void *mem)
{
new ((EInPlace *)mem) DObject;
@ -319,8 +317,6 @@ void DObject::Release()
void DObject::Destroy ()
{
NetworkEntityManager::RemoveNetworkEntity(this);
// We cannot call the VM during shutdown because all the needed data has been or is in the process of being deleted.
if (PClass::bVMOperational)
{
@ -573,15 +569,8 @@ void DObject::Serialize(FSerializer &arc)
SerializeFlag("justspawned", OF_JustSpawned);
SerializeFlag("spawned", OF_Spawned);
SerializeFlag("networked", OF_Networked);
ObjectFlags |= OF_SerialSuccess;
if (arc.isReading() && (ObjectFlags & OF_Networked))
{
ClearNetworkID();
EnableNetworking(true);
}
ObjectFlags |= OF_SerialSuccess;
}
void DObject::CheckIfSerialized () const
@ -596,73 +585,6 @@ void DObject::CheckIfSerialized () const
}
}
//==========================================================================
//
//
//
//==========================================================================
void DObject::SetNetworkID(const uint32_t id)
{
if (!IsNetworked())
{
ObjectFlags |= OF_Networked;
_networkID = id;
}
}
void DObject::ClearNetworkID()
{
ObjectFlags &= ~OF_Networked;
_networkID = NetworkEntityManager::WorldNetID;
}
void DObject::EnableNetworking(const bool enable)
{
if (enable)
NetworkEntityManager::AddNetworkEntity(this);
else
NetworkEntityManager::RemoveNetworkEntity(this);
}
static unsigned int GetNetworkID(DObject* const self)
{
return self->GetNetworkID();
}
DEFINE_ACTION_FUNCTION_NATIVE(DObject, GetNetworkID, GetNetworkID)
{
PARAM_SELF_PROLOGUE(DObject);
ACTION_RETURN_INT(self->GetNetworkID());
}
static void EnableNetworking(DObject* const self, const bool enable)
{
self->EnableNetworking(enable);
}
DEFINE_ACTION_FUNCTION_NATIVE(DObject, EnableNetworking, EnableNetworking)
{
PARAM_SELF_PROLOGUE(DObject);
PARAM_BOOL(enable);
self->EnableNetworking(enable);
return 0;
}
static DObject* GetNetworkEntity(const unsigned int id)
{
return NetworkEntityManager::GetNetworkEntity(id);
}
DEFINE_ACTION_FUNCTION_NATIVE(DObject, GetNetworkEntity, GetNetworkEntity)
{
PARAM_PROLOGUE;
PARAM_UINT(id);
ACTION_RETURN_OBJECT(NetworkEntityManager::GetNetworkEntity(id));
}
DEFINE_ACTION_FUNCTION(DObject, MSTime)
{