| 920 | VARP(specthudgun, 0, 1, 1); |
| 921 | |
| 922 | void setperspective(float fovy, float aspect, float nearplane, float farplane) |
| 923 | { |
| 924 | GLdouble ydist = nearplane * tan(fovy/2*RAD), xdist = ydist * aspect; |
| 925 | if(player1->isspectating() && player1->spectatemode == SM_OVERVIEW) |
| 926 | { |
| 927 | int gdim = max(clmapdims.xspan, clmapdims.yspan); |
| 928 | if(!gdim) gdim = ssize/2; |
| 929 | int orthd = 2 + gdim/2; |
| 930 | glOrtho(-orthd, orthd, -orthd, orthd, 0, (clmapdims.maxceil - clmapdims.minfloor) + 2); // depth of map +2 covered |
| 931 | } |
| 932 | else |
| 933 | { |
| 934 | glFrustum(-xdist, xdist, -ydist, ydist, nearplane, farplane); |
| 935 | } |
| 936 | } |
| 937 | |
| 938 | void sethudgunperspective(bool on) |
| 939 | { |
no test coverage detected