aboutsummaryrefslogtreecommitdiff
path: root/universe.c
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2023-05-23 15:45:13 +0000
committerrodri <rgl@antares-labs.eu>2023-05-23 15:45:13 +0000
commit29c02c33749f9ca21ffa1c22cc2cc37f58584467 (patch)
tree8b3a096c858f7f8ae48b99009740b62de5a38b29 /universe.c
parent5a725b7c6a1c22800656f218e46b5b16b0d21884 (diff)
downloadmusw-29c02c33749f9ca21ffa1c22cc2cc37f58584467.tar.gz
musw-29c02c33749f9ca21ffa1c22cc2cc37f58584467.tar.bz2
musw-29c02c33749f9ca21ffa1c22cc2cc37f58584467.zip
integrated cmixer for sound and sfx.
fixed the vfx drawing procedure so that it treats p as the center when rendering the sprite.
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);
}