| 159 | } |
| 160 | |
| 161 | void SpawnExplosionSmoke(const Vector3& pos) |
| 162 | { |
| 163 | auto& smoke = *GetFreeParticle(); |
| 164 | |
| 165 | auto sphere = BoundingSphere(pos, BLOCK(1 / 64.0f)); |
| 166 | auto effectPos = Random::GeneratePointInSphere(sphere); |
| 167 | |
| 168 | smoke.on = true; |
| 169 | smoke.blendMode = BlendMode::Additive; |
| 170 | |
| 171 | smoke.x = effectPos.x; |
| 172 | smoke.y = effectPos.y; |
| 173 | smoke.z = effectPos.z; |
| 174 | smoke.xVel = Random::GenerateFloat(BLOCK(0.5f), BLOCK(0.5f)); |
| 175 | smoke.yVel = GetRandomControl() - 128; |
| 176 | smoke.zVel = Random::GenerateFloat(BLOCK(0.5f), BLOCK(0.5f)); |
| 177 | smoke.sR = 75; |
| 178 | smoke.sG = 125; |
| 179 | smoke.sB = 175; |
| 180 | smoke.dR = 25; |
| 181 | smoke.dG = 80; |
| 182 | smoke.dB = 100; |
| 183 | smoke.colFadeSpeed = 8; |
| 184 | smoke.fadeToBlack = 64; |
| 185 | smoke.life = |
| 186 | smoke.sLife = Random::GenerateInt(96, 128); |
| 187 | smoke.friction = 6; |
| 188 | smoke.rotAng = Random::GenerateAngle(); |
| 189 | smoke.rotAdd = Random::GenerateAngle(ANGLE(-0.2f), ANGLE(0.2f)); |
| 190 | |
| 191 | smoke.scalar = 3; |
| 192 | smoke.gravity = Random::GenerateInt(-8, -4); |
| 193 | smoke.maxYvel = Random::GenerateInt(-12, -8); |
| 194 | smoke.dSize = Random::GenerateInt(256, 288); |
| 195 | smoke.sSize = |
| 196 | smoke.size = smoke.dSize / 2; |
| 197 | smoke.flags = SP_SCALE | SP_DEF | SP_ROTATE | SP_EXPDEF; |
| 198 | } |
| 199 | |
| 200 | // NOTE: Actual death occurs when countUntilDeath >= 60. |
| 201 | void ExplodeBoss(ItemInfo& item, int countUntilDeath, const Vector4& color, const Vector4& explosionColor1, const Vector4& explosionColor2, bool allowExplosion) |
no test coverage detected