summaryrefslogtreecommitdiffstats
path: root/pages/games.php
diff options
context:
space:
mode:
authorSnap <snapwilliam@gmail.com>2015-05-02 20:39:43 -0700
committerSnap <snapwilliam@gmail.com>2015-05-02 20:39:43 -0700
commitc21481d9806ea5e7350b60134e0360fe392fc78d (patch)
tree6531fe98fa2396236216f0dc6b29e1a085b5a53b /pages/games.php
parent01cb30b61739780e680b501e7719fb23749ecaeb (diff)
downloadpathery-c21481d9806ea5e7350b60134e0360fe392fc78d.tar.xz
Progress continues for the Matches! Hoorah
Diffstat (limited to 'pages/games.php')
-rw-r--r--pages/games.php17
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.