MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / updateDoAnimateAllShapes

Method updateDoAnimateAllShapes

Engine/source/T3D/shapeImage.cpp:1503–1532  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1501}
1502
1503void ShapeBase::MountedImage::updateDoAnimateAllShapes(const ShapeBase* owner)
1504{
1505 doAnimateAllShapes = false;
1506 if (!dataBlock)
1507 return;
1508
1509 // According to ShapeBase::isFirstPerson() the server is always in first person mode.
1510 // Therefore we don't need to animate any other shapes but the one that will be
1511 // used for first person.
1512
1513 // Sometimes this is forced externally, so honour it.
1514 if (forceAnimateAllShapes)
1515 {
1516 doAnimateAllShapes = true;
1517 return;
1518 }
1519
1520 if (owner->isClientObject())
1521 {
1522 // If this client object doesn't have a controlling client, then according to
1523 // ShapeBase::isFirstPerson() it cannot ever be in first person mode. So no need
1524 // to animate any shapes beyond the current one.
1525 if (!owner->getControllingClient())
1526 {
1527 return;
1528 }
1529
1530 doAnimateAllShapes = dataBlock->animateAllShapes;
1531 }
1532}
1533
1534//----------------------------------------------------------------------------
1535//----------------------------------------------------------------------------

Callers 2

setControllingClientMethod · 0.80
setImageMethod · 0.80

Calls 2

isClientObjectMethod · 0.80
getControllingClientMethod · 0.45

Tested by

no test coverage detected