Skip to content

Commit

Permalink
Fixed server bug. Btw. I fixed this bug WHILE playing!
Browse files Browse the repository at this point in the history
  • Loading branch information
theZiz committed Sep 20, 2015
1 parent 372b41b commit 9f5e11d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion footer.htm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
</ul>
<font color="#8080A0"><h2 id="license">Sourcecoude and License</h2></font>
<font color="#8080A0"><h2 id="license">Sourcecode and License</h2></font>
<p>Hase is released under the GPLv2+. The sourcecode is available at
<a href="http://github.com/theZiz/hase">Github</a>. For compilation it needs
SDL, SDL_image, SDL_mixer and SDL_net. Furthermore it needs my own library
Expand Down
2 changes: 1 addition & 1 deletion header.htm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<ol>
<li><a href="#description">Description</a></li>
<li><a href="#downloads">Downloads</a></li>
<li><a href="#license">Sourcecoude and License</a></li>
<li><a href="#license">Sourcecode and License</a></li>
</ol>
<font color="#8080A0"><h2 id="description">Description</h2></font>
<p>Hase is an open source (GPL) gravity based artillery shooter. It is
Expand Down
6 changes: 5 additions & 1 deletion server/push_game.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@
//saving push
$query = "INSERT INTO " . $mysql_prefix . "data_list (game_id, player_id, second_of_player, data) ".
"VALUES ( '$game_id', '$player_id', '$second_of_player', '$data' )";
mysql_query($query) or die;
if (!mysql_query($query))
{
$query = "UPDATE " . $mysql_prefix . "data_list SET data='$data' WHERE game_id = '$game_id' AND player_id = '$player_id' AND second_of_player = '$second_of_player'";
mysql_query($query) or die;
}

//player heartbeat
$query = "UPDATE " . $mysql_prefix . "player_list SET heartbeat_time='$now' WHERE game_id = '$game_id' AND player_id = '$player_id'";
Expand Down

0 comments on commit 9f5e11d

Please sign in to comment.