From: Hendrik B. <nh...@us...> - 2010-04-27 19:07:02
|
Update of /cvsroot/arianne/stendhal/src/games/stendhal/server/entity/mapstuff/portal In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv17198/src/games/stendhal/server/entity/mapstuff/portal Modified Files: Tag: VERSION_00_RELEASE_83 Portal.java Log Message: backported fix for walking into orbs Index: Portal.java =================================================================== RCS file: /cvsroot/arianne/stendhal/src/games/stendhal/server/entity/mapstuff/portal/Portal.java,v retrieving revision 1.17 retrieving revision 1.17.2.1 diff -C2 -d -r1.17 -r1.17.2.1 *** Portal.java 24 Apr 2010 12:26:06 -0000 1.17 --- Portal.java 27 Apr 2010 19:06:54 -0000 1.17.2.1 *************** *** 42,45 **** --- 42,46 ---- */ protected static final String ATTR_HIDDEN = "hidden"; + protected static final String ATTR_USE = "use"; /** the logger instance. */ *************** *** 59,62 **** --- 60,64 ---- final RPClass portal = new RPClass(RPCLASS_NAME); portal.isA("entity"); + portal.addAttribute(ATTR_USE, Type.FLAG); portal.addAttribute(ATTR_HIDDEN, Type.FLAG); } *************** *** 180,184 **** return false; } ! if (!nextTo(player)) { // Too far to use the portal from here, but walk to it --- 182,191 ---- return false; } ! ! if (!nextTo(player) && has("use")) { ! player.sendPrivateText("You must come closer before you can use this orb."); ! return false; ! } ! if (!nextTo(player)) { // Too far to use the portal from here, but walk to it |