diff options
Diffstat (limited to 'js/mapspecs.js')
-rw-r--r-- | js/mapspecs.js | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/js/mapspecs.js b/js/mapspecs.js index ecc5c9d..6ab7286 100644 --- a/js/mapspecs.js +++ b/js/mapspecs.js @@ -92,12 +92,6 @@ function grid_click(obj) { y = tmp[1];
x = tmp[2];
-
- if(typeof(mapdata[mapid]) == 'Object' && mapdata[mapid].editMap == true) {
- mapClick(obj);
- return;
- }
-
//The users solution - prepare it if it's not started
if (solution[mapid] == undefined) {
getmapdata(mapid);
@@ -591,14 +585,14 @@ function doanimate(x, y, p, c, mapid, pathNumber) { rs = 84;
//How fast should we be going?
selectbox = document.getElementById(mapid+',speed');
- selected = selectbox.options[selectbox.selectedIndex].value;
- switch (selected) {
+ var selectedSpeed = selectbox.options[selectbox.selectedIndex].value;
+ switch (selectedSpeed) {
case '1':
- rs =160;
+ rs =180;
break;
case '2':
- rs =84;
+ rs =94;
break;
case '3':
@@ -637,7 +631,8 @@ function doanimate(x, y, p, c, mapid, pathNumber) { case 'a': case 'b': case 'c':
case 'd': case 'e': case 'f':
- rs = rs + 410;
+ rs = rs + 410;
+ if (selectedSpeed <= 2) rs = rs + 200;
mapdata[mapid].pathColor[pathNumber] = targetColor(t);
break;
@@ -880,7 +875,10 @@ function mapAsHTML(map, targetWidth, mapEditor) { //var idHandle = map.ID+','+x+','+y;
//oldy is used for Position too... for now
- if (type == 'o' || mapEditor == true) {
+ if (mapEditor == true) {
+ mapgrid += "<div style='float:left; width:"+tileWidth+"px; height:"+tileWidth+"px; ' class='mapcell "+type+value+"' title='Position: "+x+","+oldy+"' id='"+idHandle+"' onMouseOver='mapEditOver(this)' onMouseDown='mapEditClick(this)' >";
+ mapgrid += "<div id='child_"+idHandle+"' class='child'></div></div>";
+ } else if (type == 'o') {
mapgrid += "<div style='float:left; width:"+tileWidth+"px; height:"+tileWidth+"px; ' class='mapcell "+type+value+"' title='Position: "+x+","+oldy+"' id='"+idHandle+"' onClick='grid_click(this)' >";
mapgrid += "<div id='child_"+idHandle+"' class='child'></div></div>";
} else {
|