| 440 | } |
| 441 | |
| 442 | U8 can_damage(xEnt* ent) |
| 443 | { |
| 444 | if (ent == NULL) |
| 445 | { |
| 446 | return false; |
| 447 | } |
| 448 | if (!(ent->moreFlags & 0x10)) |
| 449 | { |
| 450 | return false; |
| 451 | } |
| 452 | if (ent->baseType == eBaseTypeDestructObj && |
| 453 | zEntDestructObj_isDestroyed((zEntDestructObj*)ent) != NULL) |
| 454 | { |
| 455 | return false; |
| 456 | } |
| 457 | if (ent->baseType == eBaseTypeNPC && !((zNPCCommon*)ent)->IsHealthy()) |
| 458 | { |
| 459 | return false; |
| 460 | } |
| 461 | |
| 462 | return true; |
| 463 | } |
| 464 | |
| 465 | U8 was_damaged(xEnt* ent) |
| 466 | { |
no test coverage detected