| 167 | } |
| 168 | |
| 169 | List<DamageSource> ActiveItem::damageSources() const { |
| 170 | List<DamageSource> damageSources = m_damageSources.get(); |
| 171 | for (auto ds : m_itemDamageSources.get()) { |
| 172 | if (ds.damageArea.is<PolyF>()) { |
| 173 | auto& poly = ds.damageArea.get<PolyF>(); |
| 174 | poly.rotate(m_armAngle.get()); |
| 175 | if (owner()->facingDirection() == Direction::Left) |
| 176 | poly.flipHorizontal(0.0f); |
| 177 | poly.translate(handPosition(Vec2F())); |
| 178 | } else if (ds.damageArea.is<Line2F>()) { |
| 179 | auto& line = ds.damageArea.get<Line2F>(); |
| 180 | line.rotate(m_armAngle.get()); |
| 181 | if (owner()->facingDirection() == Direction::Left) |
| 182 | line.flipHorizontal(0.0f); |
| 183 | line.translate(handPosition(Vec2F())); |
| 184 | } |
| 185 | damageSources.append(std::move(ds)); |
| 186 | } |
| 187 | return damageSources; |
| 188 | } |
| 189 | |
| 190 | List<PolyF> ActiveItem::shieldPolys() const { |
| 191 | List<PolyF> shieldPolys = m_shieldPolys.get(); |
nothing calls this directly
no test coverage detected