| 132 | } |
| 133 | |
| 134 | void xParCmdFollow_Update(xParCmd* c, xParGroup* ps, F32 dt) |
| 135 | { |
| 136 | xPar* p = ps->m_root; |
| 137 | xParCmdFollow* cmd = (xParCmdFollow*)c->tasset; |
| 138 | F32 mdt = cmd->gravity * dt; |
| 139 | |
| 140 | while (p && p->m_next) |
| 141 | { |
| 142 | xVec3 var_38; |
| 143 | |
| 144 | xVec3Sub(&var_38, &p->m_next->m_pos, &p->m_pos); |
| 145 | |
| 146 | F32 f31 = xVec3Length2(&var_38); |
| 147 | F32 f1 = xVec3LengthFast(var_38.x, var_38.y, var_38.z); |
| 148 | |
| 149 | F32 force = mdt / (f1 * (f31 + cmd->epsilon)); |
| 150 | |
| 151 | p->m_vel.x += var_38.x * force; |
| 152 | p->m_vel.y += var_38.y * force; |
| 153 | p->m_vel.z += var_38.z * force; |
| 154 | |
| 155 | p = p->m_next; |
| 156 | } |
| 157 | } |
| 158 | |
| 159 | void xParCmdOrbitPoint_Update(xParCmd* c, xParGroup* ps, F32 dt) |
| 160 | { |
nothing calls this directly
no test coverage detected