| 157 | } |
| 158 | |
| 159 | void xParCmdOrbitPoint_Update(xParCmd* c, xParGroup* ps, F32 dt) |
| 160 | { |
| 161 | xPar* p = ps->m_root; |
| 162 | xParCmdOrbitPoint* cmd = (xParCmdOrbitPoint*)c->tasset; |
| 163 | F32 mdt = cmd->gravity * dt; |
| 164 | |
| 165 | while (p) |
| 166 | { |
| 167 | xVec3 var_38; |
| 168 | |
| 169 | xVec3Sub(&var_38, &cmd->center, &p->m_pos); |
| 170 | |
| 171 | F32 f31 = xVec3Length2(&var_38); |
| 172 | |
| 173 | if (f31 < cmd->maxRadiusSqr) |
| 174 | { |
| 175 | F32 f1 = xVec3LengthFast(var_38.x, var_38.y, var_38.z); |
| 176 | |
| 177 | F32 force = mdt / (f1 + (f31 + cmd->epsilon)); |
| 178 | |
| 179 | p->m_vel.x += var_38.x * force; |
| 180 | p->m_vel.y += var_38.y * force; |
| 181 | p->m_vel.z += var_38.z * force; |
| 182 | } |
| 183 | |
| 184 | p = p->m_next; |
| 185 | } |
| 186 | } |
| 187 | |
| 188 | void xParCmdOrbitLine_Update(xParCmd* c, xParGroup* ps, F32 dt) |
| 189 | { |
nothing calls this directly
no test coverage detected