mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
packet-size-checking -- Methods for querying packet-size settings. Used for detecting when spells or effects overrun the packet buffer from networked dynamic field usage.
scope-tracking -- changes related to the tracking of AFX constraint objects as they move in and out of scope.
This commit is contained in:
parent
eb5d3cc749
commit
b17b45edbb
6 changed files with 93 additions and 4 deletions
|
|
@ -20,6 +20,11 @@
|
|||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
|
||||
// Arcane-FX for MIT Licensed Open Source version of Torque 3D from GarageGames
|
||||
// Copyright (C) 2015 Faust Logic, Inc.
|
||||
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
|
||||
|
||||
#include "platform/platform.h"
|
||||
#include "console/simBase.h"
|
||||
#include "core/dnet.h"
|
||||
|
|
@ -28,6 +33,8 @@
|
|||
#include "console/consoleTypes.h"
|
||||
#include "console/engineAPI.h"
|
||||
|
||||
#include "afx/arcaneFX.h"
|
||||
|
||||
IMPLEMENT_CONOBJECT(NetObject);
|
||||
|
||||
// More information can be found in the Torque Manual (CHM)
|
||||
|
|
@ -46,6 +53,9 @@ NetObject::NetObject()
|
|||
mPrevDirtyList = NULL;
|
||||
mNextDirtyList = NULL;
|
||||
mDirtyMaskBits = 0;
|
||||
scope_id = 0;
|
||||
scope_refs = 0;
|
||||
scope_registered = false;
|
||||
}
|
||||
|
||||
NetObject::~NetObject()
|
||||
|
|
@ -460,3 +470,26 @@ DefineEngineMethod( NetObject, isServerObject, bool, (),,
|
|||
//{
|
||||
// return object->isServerObject();
|
||||
//}
|
||||
U16 NetObject::addScopeRef()
|
||||
{
|
||||
if (scope_refs == 0)
|
||||
{
|
||||
scope_id = arcaneFX::generateScopeId();
|
||||
onScopeIdChange();
|
||||
}
|
||||
scope_refs++;
|
||||
return scope_id;
|
||||
}
|
||||
|
||||
void NetObject::removeScopeRef()
|
||||
{
|
||||
if (scope_refs == 0)
|
||||
return;
|
||||
scope_refs--;
|
||||
if (scope_refs == 0)
|
||||
{
|
||||
scope_id = 0;
|
||||
onScopeIdChange();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue