git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2564
d7cf8633-e32d-0410-b094-
e92efae38249
int i;
float a, b, c;
i = row * (EXPLOSIONGRID + 1) + column;
- a = row * M_PI * 2 / EXPLOSIONGRID;
- b = column * M_PI * 2 / EXPLOSIONGRID;
+ a = ((double) row / EXPLOSIONGRID) * M_PI * 2;
+ b = (((double) column / EXPLOSIONGRID) + 0.5) * M_PI;
c = cos(b);
explosionpoint[i][0] = cos(a) * c;
explosionpoint[i][1] = sin(a) * c;
for (i = 0;i <= skygridx;i++)
{
b = i * skygridxrecip;
- x = cos(b * M_PI * 2);
+ x = cos((b + 0.5) * M_PI);
v[0] = ax*x * dx;
v[1] = ay*x * dy;
- v[2] = -sin(b * M_PI * 2) * dz;
+ v[2] = -sin((b + 0.5) * M_PI) * dz;
length = 3.0f / sqrt(v[0]*v[0]+v[1]*v[1]+(v[2]*v[2]*9));
*texcoord++ = v[0] * length;
*texcoord++ = v[1] * length;