X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=dosdemo;a=blobdiff_plain;f=src%2Fhairball.c;h=89c45c348b50f8baec77718316f97aec748f74b8;hp=11e44447576b2c1839b549f45f13cb25ca1c0804;hb=ae96c724e905181ca10441a63b1dfe9c2fc5d2ea;hpb=091586fb9501d613f621fceb70fa21ff97c4898e diff --git a/src/hairball.c b/src/hairball.c index 11e4444..89c45c3 100644 --- a/src/hairball.c +++ b/src/hairball.c @@ -1,6 +1,7 @@ #include #include #include +#include #include "demo.h" #include "3dgfx.h" #include "vmath.h" @@ -74,7 +75,7 @@ struct screen *hairball_screen(void) static int init(void) { - int i; + int i, j, numpt = 0; gen_sphere_mesh(&sphmesh, 1.0f, 12, 6); @@ -87,8 +88,30 @@ static int init(void) return -1; } - for(i=0; i best_dist) { + spawnpos[numpt] = pos; + best_dist = mindist; + } + } + + spawndir[numpt] = spawnpos[numpt]; + ++numpt; } return 0;