| 2180 | { |
| 2181 | continue; |
| 2182 | } |
| 2183 | |
| 2184 | det = xsqrt(det); |
| 2185 | |
| 2186 | t[0] = (-b + det) / (2.0f * a); |
| 2187 | t[1] = (-b - det) / (2.0f * a); |
| 2188 | |
| 2189 | for (j = 0; j < 2; j++) |
| 2190 | { |
| 2191 | if (t[j] >= path->minTime && t[j] < path->maxTime && t[j] < colls->dist) |
| 2192 | { |
| 2193 | xParabolaEvalPos(path, &pos, t[j]); |
| 2194 | xVec3Sub(&disp, &pos, &mat->pos); |
| 2195 | |
| 2196 | F32 dispX = xVec3Length2((xVec3*)&mat->right); |
| 2197 | F32 dispZ = xVec3Length2((xVec3*)&mat->at); |
| 2198 | |
| 2199 | dispX = xVec3Dot(&disp, (xVec3*)&mat->right) / dispX; |
| 2200 | dispZ = xVec3Dot(&disp, (xVec3*)&mat->at) / dispZ; |
| 2201 | |
| 2202 | if (dispX > lower->x && dispX < upper->x && dispZ > lower->z && dispZ < upper->z) |
| 2203 | { |
| 2204 | colls->flags |= 1; |
| 2205 | xVec3Copy(&colls->tohit, &pos); |
| 2206 | colls->dist = t[j]; |
| 2207 | colls->optr = this->conveyorBelt[i]; |
| 2208 | } |
| 2209 | } |
nothing calls this directly
no test coverage detected