22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
-
+
-
-
+
+
|
computeraytable(float vx, float vy)
{
if (!ocull)
return;
odist = getvar(@"fog") * 1.5f;
float apitch = (float)fabs(player1->pitch);
float apitch = (float)fabs(player1.pitch);
float af = getvar(@"fov") / 2 + apitch / 1.5f + 3;
float byaw = (player1->yaw - 90 + af) / 360 * PI2;
float syaw = (player1->yaw - 90 - af) / 360 * PI2;
float byaw = (player1.yaw - 90 + af) / 360 * PI2;
float syaw = (player1.yaw - 90 - af) / 360 * PI2;
loopi(NUMRAYS)
{
float angle = i * PI2 / NUMRAYS;
if ((apitch > 45 // must be bigger if fov>120
|| (angle < byaw && angle > syaw) ||
(angle < byaw - PI2 && angle > syaw - PI2) ||
|