| 265 | } |
| 266 | |
| 267 | List<LightSource> ActiveItem::lights() const { |
| 268 | // Same as pullNewAudios, we translate and flip ourselves. |
| 269 | List<LightSource> result; |
| 270 | for (auto& light : m_itemAnimator.lightSources()) { |
| 271 | light.position = owner()->position() + handPosition(light.position); |
| 272 | light.beamAngle += m_armAngle.get(); |
| 273 | if (owner()->facingDirection() == Direction::Left) { |
| 274 | if (light.beamAngle > 0) |
| 275 | light.beamAngle = Constants::pi / 2 + constrainAngle(Constants::pi / 2 - light.beamAngle); |
| 276 | else |
| 277 | light.beamAngle = -Constants::pi / 2 - constrainAngle(light.beamAngle + Constants::pi / 2); |
| 278 | } |
| 279 | result.append(std::move(light)); |
| 280 | } |
| 281 | result.appendAll(m_scriptedAnimator.lightSources()); |
| 282 | return result; |
| 283 | } |
| 284 | |
| 285 | List<AudioInstancePtr> ActiveItem::pullNewAudios() { |
| 286 | // Because the item animator is in hand-space, and Humanoid does all the |
no test coverage detected