| 1329 | } |
| 1330 | |
| 1331 | bool WorldEntityCallbacks::entityCanDamage(World* world, EntityId sourceId, EntityId targetId) { |
| 1332 | auto source = world->entity(sourceId); |
| 1333 | auto target = world->entity(targetId); |
| 1334 | |
| 1335 | if (!source || !target || !source->getTeam().canDamage(target->getTeam(), false)) |
| 1336 | return false; |
| 1337 | |
| 1338 | return true; |
| 1339 | } |
| 1340 | |
| 1341 | Json WorldEntityCallbacks::entityDamageTeam(World* world, EntityId entityId) { |
| 1342 | if (auto entity = world->entity(entityId)) |