fixed dynfov culling bug

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2177 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2008-06-28 12:17:17 +00:00
parent c033db4973
commit 7363a42bf2
5 changed files with 11 additions and 12 deletions
+2 -2
View File
@@ -16,14 +16,14 @@ COMMAND(toggleocull, ARG_NONE);
// constructs occlusion map: cast rays in all directions on the 2d plane and record distance.
// done exactly once per frame.
void computeraytable(float vx, float vy)
void computeraytable(float vx, float vy, float fov)
{
if(!ocull) return;
odist = getvar("fog")*1.5f;
float apitch = (float)fabs(camera1->pitch);
float af = getvar("fov")/2+apitch/1.5f+3;
float af = fov/2+apitch/1.5f+3;
float byaw = (camera1->yaw-90+af)/360*PI2;
float syaw = (camera1->yaw-90-af)/360*PI2;