mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 08:34:40 +00:00
WaypointTeam never worked and if you look at the code you can see its not very clean.
This commit is contained in:
parent
378a933894
commit
fbc9660bc3
2 changed files with 0 additions and 52 deletions
|
|
@ -223,12 +223,6 @@ ConsoleDocClass( WayPoint,
|
||||||
"@ingroup enviroMisc\n"
|
"@ingroup enviroMisc\n"
|
||||||
);
|
);
|
||||||
|
|
||||||
WayPointTeam::WayPointTeam()
|
|
||||||
{
|
|
||||||
mTeamId = 0;
|
|
||||||
mWayPoint = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
WayPoint::WayPoint()
|
WayPoint::WayPoint()
|
||||||
{
|
{
|
||||||
mName = StringTable->insert("");
|
mName = StringTable->insert("");
|
||||||
|
|
@ -252,7 +246,6 @@ bool WayPoint::onAdd()
|
||||||
Sim::getWayPointSet()->addObject(this);
|
Sim::getWayPointSet()->addObject(this);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mTeam.mWayPoint = this;
|
|
||||||
setMaskBits(UpdateNameMask|UpdateTeamMask);
|
setMaskBits(UpdateNameMask|UpdateTeamMask);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -272,8 +265,6 @@ U32 WayPoint::packUpdate(NetConnection * con, U32 mask, BitStream * stream)
|
||||||
U32 retMask = Parent::packUpdate(con, mask, stream);
|
U32 retMask = Parent::packUpdate(con, mask, stream);
|
||||||
if(stream->writeFlag(mask & UpdateNameMask))
|
if(stream->writeFlag(mask & UpdateNameMask))
|
||||||
stream->writeString(mName);
|
stream->writeString(mName);
|
||||||
if(stream->writeFlag(mask & UpdateTeamMask))
|
|
||||||
stream->write(mTeam.mTeamId);
|
|
||||||
if(stream->writeFlag(mask & UpdateHiddenMask))
|
if(stream->writeFlag(mask & UpdateHiddenMask))
|
||||||
stream->writeFlag(isHidden());
|
stream->writeFlag(isHidden());
|
||||||
return(retMask);
|
return(retMask);
|
||||||
|
|
@ -284,48 +275,17 @@ void WayPoint::unpackUpdate(NetConnection * con, BitStream * stream)
|
||||||
Parent::unpackUpdate(con, stream);
|
Parent::unpackUpdate(con, stream);
|
||||||
if(stream->readFlag())
|
if(stream->readFlag())
|
||||||
mName = stream->readSTString(true);
|
mName = stream->readSTString(true);
|
||||||
if(stream->readFlag())
|
|
||||||
stream->read(&mTeam.mTeamId);
|
|
||||||
if(stream->readFlag())
|
if(stream->readFlag())
|
||||||
setHidden(stream->readFlag());
|
setHidden(stream->readFlag());
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
// TypeWayPointTeam
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
IMPLEMENT_STRUCT( WayPointTeam, WayPointTeam,,
|
|
||||||
"" )
|
|
||||||
END_IMPLEMENT_STRUCT;
|
|
||||||
|
|
||||||
//FIXME: this should work but does not; need to check the stripping down to base types within TYPE
|
|
||||||
//ConsoleType( WayPointTeam, TypeWayPointTeam, WayPointTeam* )
|
|
||||||
ConsoleType( WayPointTeam, TypeWayPointTeam, WayPointTeam )
|
|
||||||
|
|
||||||
ConsoleGetType( TypeWayPointTeam )
|
|
||||||
{
|
|
||||||
static const U32 bufSize = 32;
|
|
||||||
char * buf = Con::getReturnBuffer(bufSize);
|
|
||||||
dSprintf(buf, bufSize, "%d", ((WayPointTeam*)dptr)->mTeamId);
|
|
||||||
return(buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
ConsoleSetType( TypeWayPointTeam )
|
|
||||||
{
|
|
||||||
WayPointTeam * pTeam = (WayPointTeam*)dptr;
|
|
||||||
pTeam->mTeamId = dAtoi(argv[0]);
|
|
||||||
|
|
||||||
if(pTeam->mWayPoint && pTeam->mWayPoint->isServerObject())
|
|
||||||
pTeam->mWayPoint->setMaskBits(WayPoint::UpdateTeamMask);
|
|
||||||
}
|
|
||||||
|
|
||||||
void WayPoint::initPersistFields()
|
void WayPoint::initPersistFields()
|
||||||
{
|
{
|
||||||
addGroup("Misc");
|
addGroup("Misc");
|
||||||
addField("markerName", TypeCaseString, Offset(mName, WayPoint), "Unique name representing this waypoint");
|
addField("markerName", TypeCaseString, Offset(mName, WayPoint), "Unique name representing this waypoint");
|
||||||
addField("team", TypeWayPointTeam, Offset(mTeam, WayPoint), "Unique numerical ID assigned to this waypoint, or set of waypoints");
|
|
||||||
endGroup("Misc");
|
endGroup("Misc");
|
||||||
|
|
||||||
Parent::initPersistFields();
|
Parent::initPersistFields();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -92,17 +92,6 @@ class MissionMarker : public ShapeBase
|
||||||
// Class: WayPoint
|
// Class: WayPoint
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
class WayPoint;
|
class WayPoint;
|
||||||
class WayPointTeam
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
WayPointTeam();
|
|
||||||
|
|
||||||
S32 mTeamId;
|
|
||||||
WayPoint * mWayPoint;
|
|
||||||
};
|
|
||||||
|
|
||||||
DECLARE_STRUCT( WayPointTeam );
|
|
||||||
DefineConsoleType( TypeWayPointTeam, WayPointTeam * );
|
|
||||||
|
|
||||||
class WayPoint : public MissionMarker
|
class WayPoint : public MissionMarker
|
||||||
{
|
{
|
||||||
|
|
@ -132,7 +121,6 @@ class WayPoint : public MissionMarker
|
||||||
|
|
||||||
// field data
|
// field data
|
||||||
StringTableEntry mName;
|
StringTableEntry mName;
|
||||||
WayPointTeam mTeam;
|
|
||||||
|
|
||||||
static void initPersistFields();
|
static void initPersistFields();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue