aboutsummaryrefslogtreecommitdiff
path: root/src/physics.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/physics.c')
-rw-r--r--src/physics.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/physics.c b/src/physics.c
index 1e64bda..00879e7 100644
--- a/src/physics.c
+++ b/src/physics.c
@@ -200,16 +200,16 @@ static int physics_check_collide(ModelInstance *obj, ModelInstance *other, doubl
int found = 0;
/* Check all the vertices in the moving object... */
- for ( i=0; i<obj->model->num_primitives; i++ ) {
+ for ( i=0; i<obj->model->num_coll_primitives; i++ ) {
int j;
- for ( j=0; j<obj->model->primitives[i]->num_vertices; j++ ) {
+ for ( j=0; j<obj->model->coll_primitives[i]->num_vertices; j++ ) {
int a;
- const double stx = obj->model->primitives[i]->vertices[3*j+0];
- const double sty = obj->model->primitives[i]->vertices[3*j+1];
+ const double stx = obj->model->coll_primitives[i]->vertices[3*j+0];
+ const double sty = obj->model->coll_primitives[i]->vertices[3*j+1];
const double sx = stx*cos(obj->yaw) + sty*sin(obj->yaw);
const double sy = -stx*sin(obj->yaw) + sty*cos(obj->yaw);
- const double sz = obj->model->primitives[i]->vertices[3*j+2];
+ const double sz = obj->model->coll_primitives[i]->vertices[3*j+2];
/* ...against all primitives in the static object */
for ( a=0; a<other->model->num_primitives; a++ ) {