From: Kimmo R. <ki...@us...> - 2009-07-05 21:04:52
|
Update of /cvsroot/arianne/stendhal/src/games/stendhal/server/entity/player In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv18237/src/games/stendhal/server/entity/player Modified Files: Player.java Log Message: fixed a bug that prevented karma from being used Index: Player.java =================================================================== RCS file: /cvsroot/arianne/stendhal/src/games/stendhal/server/entity/player/Player.java,v retrieving revision 1.243 retrieving revision 1.244 diff -C2 -d -r1.243 -r1.244 *** Player.java 5 Jun 2009 08:09:16 -0000 1.243 --- Player.java 5 Jul 2009 21:04:49 -0000 1.244 *************** *** 461,465 **** double limit; double score; ! if (logger.isDebugEnabled()) { logger.debug("karma request: " + negLimit + " <= x <= " + posLimit); --- 461,465 ---- double limit; double score; ! if (logger.isDebugEnabled()) { logger.debug("karma request: " + negLimit + " <= x <= " + posLimit); *************** *** 493,499 **** /* ! * Clip to granularity */ ! score = (int) Math.round((score / granularity) * granularity); /* --- 493,500 ---- /* ! * Clip to granularity. Use floor() instead of round() so that the player ! * never uses more karma than she has. */ ! score = Math.floor(score / granularity) * granularity; /* |