simplified fovcompat code
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3865 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -433,7 +433,7 @@ VARP(spectfov, 5, 110, 120);
|
||||
void fovcompat(int oldfov)
|
||||
{
|
||||
extern float aspect;
|
||||
setfvar("fov", atan(tan((PI/180.0f)/2.0f*(float)oldfov/aspect)*aspect)*2.0f*180.0f/PI, true);
|
||||
setfvar("fov", atan(tan(RAD/2.0f*oldfov/aspect)*aspect)*2.0f/RAD, true);
|
||||
}
|
||||
|
||||
COMMAND(fovcompat, ARG_1INT);
|
||||
|
||||
Reference in New Issue
Block a user