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:
@@ -118,6 +118,11 @@ public abstract class RatingManagerDelegate extends GameManagerDelegate
|
|||||||
{
|
{
|
||||||
super.gameWillStart();
|
super.gameWillStart();
|
||||||
|
|
||||||
|
// if this game is not rated, stop here
|
||||||
|
if (!_gmgr.getGameConfig().rated) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// note the time at which we started
|
// note the time at which we started
|
||||||
_startStamp = (int) (System.currentTimeMillis() / 1000);
|
_startStamp = (int) (System.currentTimeMillis() / 1000);
|
||||||
|
|
||||||
@@ -146,6 +151,11 @@ public abstract class RatingManagerDelegate extends GameManagerDelegate
|
|||||||
{
|
{
|
||||||
super.gameDidEnd();
|
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
|
// don't update ratings if the game did not run long enough
|
||||||
int gameSecs = (int) (System.currentTimeMillis()/1000 - _startStamp);
|
int gameSecs = (int) (System.currentTimeMillis()/1000 - _startStamp);
|
||||||
if (gameSecs < minimumRatedDuration()) {
|
if (gameSecs < minimumRatedDuration()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user