| 90 | } |
| 91 | |
| 92 | static void zEntHangable_UpdateFX(zEntHangable* ent) |
| 93 | { |
| 94 | // Points of a (wobbly) circle in 3D space. |
| 95 | xVec3 offset_rlii0006[8] = |
| 96 | { |
| 97 | { 0.0, 0.561, 0.613 }, |
| 98 | { 0.43345639, 0.432, 0.43345639 }, |
| 99 | { 0.613, 0.543, 0.0 }, |
| 100 | { 0.43345639, 0.526, -0.43345639 }, |
| 101 | { 0.0, 0.526, -0.613 }, |
| 102 | { -0.43345639, 0.505, -0.43345639 }, |
| 103 | { -0.613, 0.543, 0.0 }, |
| 104 | { -0.43345639, 0.48, 0.43345639 } |
| 105 | }; |
| 106 | |
| 107 | xVec3* local_offset; |
| 108 | xParEmitterCustomSettings info; |
| 109 | zParEmitter* emitter; |
| 110 | |
| 111 | if ((ent->flags & 1) && (ent->asset->modelInfoID == sChandelierHash)) |
| 112 | { |
| 113 | local_offset = &offset_rlii0006[0]; |
| 114 | |
| 115 | // Missing unreachable branches here. |
| 116 | if (ent->candle_state == 2) |
| 117 | { |
| 118 | return; |
| 119 | } |
| 120 | |
| 121 | info.custom_flags = 0x100; |
| 122 | |
| 123 | if (ent->candle_state == 0) |
| 124 | { |
| 125 | emitter = sCandleEmitter; |
| 126 | } |
| 127 | else |
| 128 | { |
| 129 | emitter = sCandleSmokeEmitter; |
| 130 | } |
| 131 | |
| 132 | for (S32 i = 0; i < (S32)(sizeof(offset_rlii0006) / sizeof(xVec3)); i++) |
| 133 | { |
| 134 | xVec3 mul; |
| 135 | xMat3x3RMulVec(&mul, xEntGetFrame(ent), &local_offset[i]); |
| 136 | xVec3Add(&info.pos, &mul, xEntGetPos(ent)); |
| 137 | xParEmitterEmitCustom(emitter, (1.0f / 30.0f), &info); |
| 138 | } |
| 139 | } |
| 140 | } |
| 141 | |
| 142 | void zEntHangable_Update(zEntHangable* ent, xScene*, F32 dt) |
| 143 | { |
no test coverage detected