Don't rate anything if the game is not marked as rated.

git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@437 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Michael Bayne
2007-09-25 16:12:28 +00:00
parent c76474a640
commit 2d24116c97
@@ -118,6 +118,11 @@ public abstract class RatingManagerDelegate extends GameManagerDelegate
{
super.gameWillStart();
// if this game is not rated, stop here
if (!_gmgr.getGameConfig().rated) {
return;
}
// note the time at which we started
_startStamp = (int) (System.currentTimeMillis() / 1000);
@@ -146,6 +151,11 @@ public abstract class RatingManagerDelegate extends GameManagerDelegate
{
super.gameDidEnd();
// if this game is not rated, stop here
if (!_gmgr.getGameConfig().rated) {
return;
}
// don't update ratings if the game did not run long enough
int gameSecs = (int) (System.currentTimeMillis()/1000 - _startStamp);
if (gameSecs < minimumRatedDuration()) {