From: ChadF <ch...@us...> - 2007-09-27 12:14:04
|
Update of /cvsroot/arianne/stendhal/src/games/stendhal/server/entity/spawner In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv30976/src/games/stendhal/server/entity/spawner Modified Files: CreatureRespawnPoint.java Log Message: Refactored change zone code to order sequence of changes better. Simplied to just placeat(), which does zone changes if needed. Added better status checking in cases where sheep/pets don't transfer. Code is _still_ messy (but a little better). <zone>.add() automatically assigned object ID when needed now. AreaEntity entering/exiting/movement should now work better for join/leave/teleport/push that only did walk before. Should fix the pushed into spikes bug [#1800694]. Index: CreatureRespawnPoint.java =================================================================== RCS file: /cvsroot/arianne/stendhal/src/games/stendhal/server/entity/spawner/CreatureRespawnPoint.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** CreatureRespawnPoint.java 3 Jul 2007 17:59:27 -0000 1.6 --- CreatureRespawnPoint.java 27 Sep 2007 12:13:35 -0000 1.7 *************** *** 169,180 **** newentity.setDEF(Rand.rand(newentity.getDEF(), newentity.getDEF() / 10)); - zone.assignRPObjectID(newentity); StendhalRPAction.placeat(zone, newentity, x, y); newentity.setRespawnPoint(this); - creatures.add(newentity); ! zone.add(newentity); ! newentity.init(); } catch (Exception e) { logger.error("error respawning entity " + prototypeCreature, e); --- 169,178 ---- newentity.setDEF(Rand.rand(newentity.getDEF(), newentity.getDEF() / 10)); StendhalRPAction.placeat(zone, newentity, x, y); + newentity.init(); newentity.setRespawnPoint(this); ! creatures.add(newentity); } catch (Exception e) { logger.error("error respawning entity " + prototypeCreature, e); |