surv zone now marked on map

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6611 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
sireus
2011-08-23 13:14:42 +00:00
parent 55f5407339
commit f600880f07
2 changed files with 60 additions and 32 deletions
+31 -31
View File
@@ -61,41 +61,41 @@ const startSurvival [
sleep $timeBetChkPts [ gotCheckPoint = 1; increaseDifficulty ]
]
const setzone [ if (> (listlen $arg1) 3) [ zone = ""; loop szl 4 [ add2list zone (at $arg1 $szl) ] ] ]
const setzone [ if (> (listlen $arg1) 3) [ zone = ""; loop szl 4 [ add2list zone (at $arg1 $szl) ] ]; drawzone (at $arg1 0) (at $arg1 1) (at $arg1 2) (at $arg1 3); ]
// Zones consist of two points on a grid. Any area within these points are considered "inner zone".
// The order of the arguments given to setzone are important: setzone "minX maxX minY maxY"
// Hint: Use /whereami to find the two points.
const survOfcZones [
ac_aqueous 159.10 198.90 128.10 142.90
ac_arabian 128.10 196.90 93.10 146.90
ac_arctic 81.10 120.90 137.10 176.90
ac_arid 135.10 155.90 97.10 138.90
ac_complex 105.10 150.90 129.10 181.90
ac_depot 137.10 166.90 205.10 262.90
ac_desert 89.10 102.90 129.10 174.90
ac_desert2 65.10 98.90 149.10 190.90
ac_desert3 25.10 62.90 97.10 134.90
ac_douze 137.10 186.90 121.10 150.90
ac_edifice 33.10 80.90 82.10 120.90
ac_elevation 61.10 102.90 66.10 121.90
ac_gothic 47.10 83.90 41.10 83.90
ac_iceroad 325.10 374.90 244.10 274.90
ac_industrial 319.10 357.90 180.10 244.90
ac_ingress 133.10 181.90 66.10 112.90
ac_keller 66.10 100.90 222.10 244.90
ac_mines 83.10 110.90 117.10 131.90
ac_outpost 61.10 99.90 73.10 98.90
ac_power 155.10 216.90 211.10 244.90
ac_rattrap 145.10 185.90 57.10 102.90
ac_scaffold 62.10 91.90 49.10 63.90
ac_shine 99.10 124.90 79.10 106.90
ac_snow 17.10 54.90 102.10 127.90
ac_stellar 158.90 184.90 49.10 102.90
ac_sunset 148.10 183.90 102.10 127.90
ac_toxic 72.10 114.90 120.10 147.90
ac_urban 135.10 200.90 45.10 90.90
ac_werk 121.10 147.90 110.10 150.90
ac_aqueous 159 198 128 142
ac_arabian 128 196 93 146
ac_arctic 81 120 137 176
ac_arid 135 155 97 138
ac_complex 105 150 129 181
ac_depot 137 166 205 262
ac_desert 89 102 129 174
ac_desert2 65 98 149 190
ac_desert3 25 62 97 134
ac_douze 137 186 121 150
ac_edifice 33 80 82 120
ac_elevation 61 102 66 121
ac_gothic 47 83 41 83
ac_iceroad 325 374 244 274
ac_industrial 319 357 180 244
ac_ingress 133 181 66 112
ac_keller 66 100 222 244
ac_mines 83 110 117 131
ac_outpost 61 99 73 98
ac_power 155 216 211 244
ac_rattrap 145 185 57 102
ac_scaffold 62 91 49 63
ac_shine 99 124 79 106
ac_snow 17 54 102 127
ac_stellar 158 184 49 102
ac_sunset 148 183 102 127
ac_toxic 72 114 120 147
ac_urban 135 200 45 90
ac_werk 121 147 110 150
]
const setOfcZones [
@@ -157,4 +157,4 @@ const endSurvival [
// List of aliases that need to be cleared from saved.cfg on quit:
const survAliases = (concat $survResetAliases "resetSurvAliases genSurvDifStr survival tmpSurvSets curSurvDifficulty survLastKill survTimeBetKills startPreSurvMillis startSurvival startedSurvival setzone survOfcZones setOfcZones survMapIndex tmpSurvZone findCenter midZoneX midZoneY teleportPlayer survTeleported isInZone checkzone startOBCount startedOBCount startOBMillis backInZone tmpSCtr increaseDifficulty lastCheckPoint tmpSurvInt endSurvival tmp_survstr survIsFinished tmpstrlist finalSurvMillis zone survSetsList survDifList survSetDif survResetAliases survAliases")
addListOnQuit $survAliases
addListOnQuit $survAliases
+29 -1
View File
@@ -509,7 +509,7 @@ void recomputecamera()
camera1->pitch = -90;
camera1->yaw = 0;
disableraytable();
disableraytable();
break;
}
case SM_FOLLOW1ST:
@@ -745,6 +745,24 @@ bool minimap = false, minimapdirty = true;
int minimaplastsize = 0;
GLuint minimaptex = 0;
int zonex1 = -1, zoney1 = -1, zonex2 = -1, zoney2 = -1;
void renderzone(float z)
{
glColor4f(0, 1, 0, 0.3f);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glDisable(GL_TEXTURE_2D);
glBegin(GL_QUADS);
glVertex3f(zonex1, zoney1, z);
glVertex3f(zonex2, zoney1, z);
glVertex3f(zonex2, zoney2, z);
glVertex3f(zonex1, zoney2, z);
glEnd();
glDisable(GL_BLEND);
glEnable(GL_TEXTURE_2D);
}
void clearminimap()
{
minimapdirty = true;
@@ -804,6 +822,7 @@ void drawminimap(int w, int h)
renderstrips();
glDepthFunc(GL_LESS);
rendermapmodels();
renderzone(mapdims[7]);
//renderentities();// IMHO better done by radar itself, if at all
resettmu(0);
float hf = hdr.waterlevel-0.3f;
@@ -829,6 +848,15 @@ void cleanupgl()
minimapdirty = true;
}
void drawzone(int x1, int x2, int y1, int y2)
{
zonex1 = x1; zoney1 = y1;
zonex2 = x2; zoney2 = y2;
clearminimap();
}
COMMAND(drawzone, ARG_4INT);
int xtraverts;
VARP(hudgun, 0, 1, 1);