| 1506 | } |
| 1507 | |
| 1508 | void ExplodeProjectile(ItemInfo& item, const Vector3i& prevPos) |
| 1509 | { |
| 1510 | if (TestEnvironment(ENV_FLAG_WATER, item.RoomNumber)) |
| 1511 | { |
| 1512 | TriggerUnderwaterExplosion(&item, true); |
| 1513 | } |
| 1514 | else |
| 1515 | { |
| 1516 | TriggerShockwave(&item.Pose, 48, 304, 96, 128, 96, 0, 24, EulerAngles::Identity, 0, true, false, false, (int)ShockwaveStyle::Normal); |
| 1517 | item.Pose.Position.y += CLICK(1.0f / 2); |
| 1518 | TriggerExplosionSparks(prevPos.x, prevPos.y, prevPos.z, 3, -2, 0, item.RoomNumber); |
| 1519 | |
| 1520 | for (int j = 0; j < 2; j++) |
| 1521 | TriggerExplosionSparks(prevPos.x, prevPos.y, prevPos.z, 3, -1, 0, item.RoomNumber); |
| 1522 | } |
| 1523 | |
| 1524 | AlertNearbyGuards(&item); |
| 1525 | |
| 1526 | SoundEffect(SFX_TR4_EXPLOSION1, &item.Pose, SoundEnvironment::Land, 0.7f, 0.5f); |
| 1527 | SoundEffect(SFX_TR4_EXPLOSION2, &item.Pose); |
| 1528 | |
| 1529 | auto decalPos = Vector3i::Lerp(prevPos, item.Pose.Position, 0.5f); |
| 1530 | SpawnDecal(decalPos.ToVector3(), item.RoomNumber, DecalType::Explosion); |
| 1531 | } |
| 1532 | |
| 1533 | void HandleProjectile(ItemInfo& projectile, ItemInfo& emitter, const Vector3i& prevPos, ProjectileType type, int damage) |
| 1534 | { |
no test coverage detected