mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
display the item to be spawned
given a valid datablock name, use that meshes shape to display the spawnsphere mesh, rather than the default one
This commit is contained in:
parent
3e39347167
commit
ed33c70a23
|
|
@ -433,7 +433,23 @@ void SpawnSphere::unpackUpdate(NetConnection * con, BitStream * stream)
|
|||
mSpawnTransform = stream->readFlag();
|
||||
|
||||
stream->read(&mSpawnClass);
|
||||
|
||||
String oldSDB = mSpawnDataBlock;
|
||||
stream->read(&mSpawnDataBlock);
|
||||
if (oldSDB != mSpawnDataBlock)
|
||||
{
|
||||
ShapeBaseData *spawnedDatablock = dynamic_cast<ShapeBaseData *>(Sim::findObject(mSpawnDataBlock.c_str()));
|
||||
if (spawnedDatablock)
|
||||
{
|
||||
delete mShapeInstance;
|
||||
mShapeInstance = new TSShapeInstance(spawnedDatablock->mShape);
|
||||
}
|
||||
else
|
||||
{
|
||||
delete mShapeInstance;
|
||||
mShapeInstance = new TSShapeInstance(mDataBlock->mShape);
|
||||
}
|
||||
}
|
||||
stream->read(&mSpawnName);
|
||||
stream->read(&mSpawnProperties);
|
||||
stream->read(&mSpawnScript);
|
||||
|
|
|
|||
Loading…
Reference in a new issue