| 1501 | } |
| 1502 | |
| 1503 | void 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 | //---------------------------------------------------------------------------- |
no test coverage detected