mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 19:53:48 +00:00
Updates to component classes -
Shift from ghosted components to entity-managed for networking Initial implementation of Systems through the Mesh Component
This commit is contained in:
parent
4341428d53
commit
8eb442490a
15 changed files with 706 additions and 312 deletions
|
|
@ -79,6 +79,7 @@ CameraComponent::CameraComponent() : Component()
|
|||
mTargetNode = "";
|
||||
|
||||
mUseParentTransform = true;
|
||||
mNetworked = true;
|
||||
|
||||
mFriendlyName = "Camera(Component)";
|
||||
}
|
||||
|
|
@ -202,7 +203,7 @@ void CameraComponent::setCameraFov(F32 fov)
|
|||
void CameraComponent::onCameraScopeQuery(NetConnection *cr, CameraScopeQuery * query)
|
||||
{
|
||||
// update the camera query
|
||||
query->camera = this;
|
||||
query->camera = mOwner;//this;
|
||||
|
||||
if(GameConnection * con = dynamic_cast<GameConnection*>(cr))
|
||||
{
|
||||
|
|
@ -357,7 +358,8 @@ U32 CameraComponent::packUpdate(NetConnection *con, U32 mask, BitStream *stream)
|
|||
mTargetNodeIdx = nodeIndex;
|
||||
}
|
||||
|
||||
stream->writeInt(mTargetNodeIdx, 32);
|
||||
if(stream->writeFlag(mTargetNodeIdx > -1))
|
||||
stream->writeInt(mTargetNodeIdx, 32);
|
||||
//send offsets here
|
||||
|
||||
stream->writeCompressedPoint(mPosOffset);
|
||||
|
|
@ -382,7 +384,10 @@ void CameraComponent::unpackUpdate(NetConnection *con, BitStream *stream)
|
|||
|
||||
if(stream->readFlag())
|
||||
{
|
||||
mTargetNodeIdx = stream->readInt(32);
|
||||
if (stream->readFlag())
|
||||
mTargetNodeIdx = stream->readInt(32);
|
||||
else
|
||||
mTargetNodeIdx = -1;
|
||||
|
||||
stream->readCompressedPoint(&mPosOffset);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue