| 47 | } |
| 48 | |
| 49 | void UpdateUnderwaterBloodParticles() |
| 50 | { |
| 51 | constexpr auto UW_BLOOD_SIZE_MAX = BLOCK(0.25f); |
| 52 | |
| 53 | if (UnderwaterBloodParticles.empty()) |
| 54 | return; |
| 55 | |
| 56 | for (auto& uwBlood : UnderwaterBloodParticles) |
| 57 | { |
| 58 | if (uwBlood.Life <= 0.0f) |
| 59 | continue; |
| 60 | |
| 61 | uwBlood.StoreInterpolationData(); |
| 62 | |
| 63 | // Update size. |
| 64 | if (uwBlood.Size < UW_BLOOD_SIZE_MAX) |
| 65 | uwBlood.Size += 4.0f; |
| 66 | |
| 67 | // Update life. |
| 68 | if (uwBlood.Init == 0.0f) |
| 69 | { |
| 70 | uwBlood.Life -= 3.0f; |
| 71 | } |
| 72 | else if (uwBlood.Init < uwBlood.Life) |
| 73 | { |
| 74 | uwBlood.Init += 4.0f; |
| 75 | |
| 76 | if (uwBlood.Init >= uwBlood.Life) |
| 77 | uwBlood.Init = 0.0f; |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | ClearInactiveEffects(UnderwaterBloodParticles); |
| 82 | } |
| 83 | |
| 84 | void ClearUnderwaterBloodParticles() |
| 85 | { |
no test coverage detected