| 1474 | } |
| 1475 | |
| 1476 | void ShapeBase::MountedImage::updateDoAnimateAllShapes(const ShapeBase* owner) |
| 1477 | { |
| 1478 | doAnimateAllShapes = false; |
| 1479 | if (!dataBlock) |
| 1480 | return; |
| 1481 | |
| 1482 | // According to ShapeBase::isFirstPerson() the server is always in first person mode. |
| 1483 | // Therefore we don't need to animate any other shapes but the one that will be |
| 1484 | // used for first person. |
| 1485 | |
| 1486 | // Sometimes this is forced externally, so honour it. |
| 1487 | if (forceAnimateAllShapes) |
| 1488 | { |
| 1489 | doAnimateAllShapes = true; |
| 1490 | return; |
| 1491 | } |
| 1492 | |
| 1493 | if (owner->isClientObject()) |
| 1494 | { |
| 1495 | // If this client object doesn't have a controlling client, then according to |
| 1496 | // ShapeBase::isFirstPerson() it cannot ever be in first person mode. So no need |
| 1497 | // to animate any shapes beyond the current one. |
| 1498 | if (!owner->getControllingClient()) |
| 1499 | { |
| 1500 | return; |
| 1501 | } |
| 1502 | |
| 1503 | doAnimateAllShapes = dataBlock->animateAllShapes; |
| 1504 | } |
| 1505 | } |
| 1506 | |
| 1507 | //---------------------------------------------------------------------------- |
| 1508 | //---------------------------------------------------------------------------- |
no test coverage detected