improved showmap and checkarea replacment candidate

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5244 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
flowtron
2010-06-27 17:18:53 +00:00
parent 15a11c1126
commit 54a9870223
4 changed files with 52 additions and 7 deletions
+5 -2
View File
@@ -394,8 +394,11 @@ vec getradarpos()
void drawradar(playerent *p, int w, int h)
{
vec center = showmap ? vec(ssize/2, ssize/2, 0) : p->o;
int res = showmap ? ssize : radarres;
// vec center = showmap ? vec(ssize/2, ssize/2, 0) : p->o; int res = showmap ? ssize : radarres;
// improved center (for maps that don't use all worldspace)
int gdim = max(mapdims[4], mapdims[5]);
vec center = showmap ? vec(mapdims[0] + mapdims[4]/2, mapdims[1] + mapdims[5]/2, 0) : p->o;
int res = showmap ? gdim : radarres;
float worldsize = (float)ssize;
float radarviewsize = showmap ? VIRTH : VIRTH/6;