diff options
Diffstat (limited to 'do.php')
-rw-r--r-- | do.php | 17 |
1 files changed, 10 insertions, 7 deletions
@@ -173,8 +173,12 @@ if ($_GET['r'] == 'getpath') { $encoded = json_encode($json);
die($encoded);
}
-
-
+ //TODO: !! tutorial complete hackery!
+ if ($mapID == 5 && $moves == 75 && $accepted == false) {
+ $_SESSION['preCompletedTutorial'] = true;
+ $_SESSION['preCompletedTutorialNotified'] = false;
+ }
+
if ($_GET['isChallenge'] == 'true') {
if (isChallengeMap($mapID)) {
// $firephp->log('Calling challenges');
@@ -183,9 +187,9 @@ if ($_GET['r'] == 'getpath') { // $firephp->log('Challenges called!');
die(json_encode($json));
}
- exit;
+ die(json_encode($json));
}
-
+
//Get current score data. - to see if a pertinent score was beat.
$sql = "SELECT `moves` as bestmoves, `displayName`, IFNULL(q1.mymoves, 0)
FROM `solutions`, `users`
@@ -211,7 +215,6 @@ if ($_GET['r'] == 'getpath') { $json['best'] = 0;
$json['bestby'] = 'no one';
}
-
// --------- ------------------------------ ---------
// --------- RUSH THE PATH BACK TO THE USER ---------
// --------- ------------------------------ ---------
@@ -225,6 +228,7 @@ if ($_GET['r'] == 'getpath') { flush();
//The connection is now closed, no further communication to the client can be done!
}
+
// --------- CONTINUE EXECUTION ---------
//TODO: !! Close the session with session_write_close(); as soon as possible.
@@ -293,8 +297,7 @@ if ($_GET['r'] == 'getpath') { // --------- USER LOGGED IN
//Is the map still valid to score on?
- if (!isCurrentMap($mapID))
- return;
+ if (!isCurrentMap($mapID)) return;
// --------- UPDATE SCORES
$json['error'][] = 'map is current';
|