diff options
author | Snap <snapwilliam@gmail.com> | 2015-05-02 20:39:43 -0700 |
---|---|---|
committer | Snap <snapwilliam@gmail.com> | 2015-05-02 20:39:43 -0700 |
commit | c21481d9806ea5e7350b60134e0360fe392fc78d (patch) | |
tree | 6531fe98fa2396236216f0dc6b29e1a085b5a53b /pages | |
parent | 01cb30b61739780e680b501e7719fb23749ecaeb (diff) | |
download | pathery-c21481d9806ea5e7350b60134e0360fe392fc78d.tar.xz |
Progress continues for the Matches! Hoorah
Diffstat (limited to 'pages')
-rw-r--r-- | pages/games.php | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/pages/games.php b/pages/games.php index bee6cd3..b68a530 100644 --- a/pages/games.php +++ b/pages/games.php @@ -9,6 +9,12 @@ htmlHeader(array(), 'Game Lobby', 'Game Lobby'); echo soundManager2();
topbar($headerLinks);
+
+if (is_int($_GET['ID'])) {
+ $matchID = $_GET['ID'];
+}
+
+
?>
@@ -35,11 +41,10 @@ function matchUpdateTimer() { }
-
-
function pollMatchStatus() {
var dataString = 'requestUpdate=1';
- dataString = '&playerIsReady='+playerIsReady;
+ dataString += '&matchID=<? echo $matchID; ?>';
+ dataString += '&playerIsReady='+playerIsReady;
$.ajax({
//type: "POST",
@@ -62,9 +67,13 @@ function pollMatchStatusDone(data) { if (json.gameStarted == true) {
// Show the game if it's ready
- if (isInt(json.mapID) && matchMapReceived == false) {
+ if (json.mapReady == true && matchMapReceived == false) {
+ console.log("match countdown start!");
displayMap(json.mapID, "mapDisplay", 600);
matchMapReceived = true;
+
+ displayCountDownToGame(json.secondsTillGameExpires);
+
}
//This will be a negative number if the game is going.
|