From: Kimmo R. <ki...@us...> - 2010-06-06 20:32:08
|
Update of /cvsroot/arianne/stendhal/src/games/stendhal/client/gui/map In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv30491/src/games/stendhal/client/gui/map Modified Files: PlayerMapObject.java Log Message: minor cleanup, javadoc Index: PlayerMapObject.java =================================================================== RCS file: /cvsroot/arianne/stendhal/src/games/stendhal/client/gui/map/PlayerMapObject.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PlayerMapObject.java 24 Aug 2009 09:42:01 -0000 1.3 --- PlayerMapObject.java 6 Jun 2010 20:31:59 -0000 1.4 *************** *** 30,34 **** drawColor = COLOR_USER; } else if (entity instanceof Player) { ! chooseVisibility(entity); // Follow the ghost mode changes of other players --- 30,34 ---- drawColor = COLOR_USER; } else if (entity instanceof Player) { ! choosePlayerColor(entity); // Follow the ghost mode changes of other players *************** *** 36,40 **** public void entityChanged(final IEntity entity, final Object property) { if (property == RPEntity.PROP_GHOSTMODE) { ! chooseVisibility(entity); } } --- 36,40 ---- public void entityChanged(final IEntity entity, final Object property) { if (property == RPEntity.PROP_GHOSTMODE) { ! choosePlayerColor(entity); } } *************** *** 50,54 **** } ! private void chooseVisibility(final IEntity player) { if (!((Player) player).isGhostMode()) { drawColor = COLOR_PLAYER; --- 50,60 ---- } ! /** ! * Select a color for drawing the player depending on ! * ghostmode status. ! * ! * @param player ! */ ! private void choosePlayerColor(final IEntity player) { if (!((Player) player).isGhostMode()) { drawColor = COLOR_PLAYER; *************** *** 65,68 **** --- 71,75 ---- * @param color The draw color */ + @Override protected void draw(final Graphics g, final int scale, final Color color) { int mapX = worldToCanvas(x, scale); |