aboutsummaryrefslogtreecommitdiff
path: root/universe.c
diff options
context:
space:
mode:
Diffstat (limited to 'universe.c')
-rw-r--r--universe.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/universe.c b/universe.c
index 0278493..c146a73 100644
--- a/universe.c
+++ b/universe.c
@@ -99,7 +99,7 @@ warp(Particle *p)
static void
universe_collide(Universe *u)
{
- Ship *s;
+ Ship *s, *enemy;
Bullet *b;
for(s = u->ships; s < u->ships+nelem(u->ships); s++){
@@ -110,7 +110,15 @@ universe_collide(Universe *u)
continue;
}
warp(b);
-
+
+ enemy = &u->ships[(s - u->ships + 1) % nelem(u->ships)];
+ /*
+ * TODO: fix it
+ *
+ * of course it fails, the server doesn't load VModels!
+ */
+// if(ptinpoly(b->p, enemy->mdl->pts, enemy->mdl->npts))
+// fprint(2, "enemy hit\n");
}
warp(s);
}