From: <aki...@us...> - 2008-08-15 20:59:11
|
Revision: 4864 http://gridarta.svn.sourceforge.net/gridarta/?rev=4864&view=rev Author: akirschbaum Date: 2008-08-15 20:59:19 +0000 (Fri, 15 Aug 2008) Log Message: ----------- Prepend an underscore to auto-generated animation names to avoid clashes with manually defined animations. Modified Paths: -------------- trunk/crossfire/src/cfeditor/gameobject/ArchetypeParser.java trunk/daimonin/src/daieditor/gameobject/ArchetypeParser.java Modified: trunk/crossfire/src/cfeditor/gameobject/ArchetypeParser.java =================================================================== --- trunk/crossfire/src/cfeditor/gameobject/ArchetypeParser.java 2008-08-15 20:45:08 UTC (rev 4863) +++ trunk/crossfire/src/cfeditor/gameobject/ArchetypeParser.java 2008-08-15 20:59:19 UTC (rev 4864) @@ -166,18 +166,19 @@ } } else if (animflag) { if (thisLine.equals("mina")) { + final String animationName = "_" + archetype.getArchetypeName(); try { archetype.setAnimText(animText.toString()); - animationObjects.addAnimPath(archetype.getArchetypeName(), path + archetype.getArchetypeName()); - animationObjects.addAnimationObject(archetype.getArchetypeName(), animText.toString()); + animationObjects.addAnimPath(animationName, path + archetype.getArchetypeName()); + animationObjects.addAnimationObject(animationName, animText.toString()); animText = null; } catch (final DuplicateAnimationException e) { // TODO: Report to the user log.warn(ACTION_FACTORY.format("logDuplicateAnimation", e.getDuplicate().getAnimName())); } - archetype.addObjectText("animation " + archetype.getArchetypeName()); - archetype.setAnimName(archetype.getArchetypeName()); + archetype.addObjectText("animation " + animationName); + archetype.setAnimName(animationName); // here we must add this to AnimationObject // and add Animation cmd here! Modified: trunk/daimonin/src/daieditor/gameobject/ArchetypeParser.java =================================================================== --- trunk/daimonin/src/daieditor/gameobject/ArchetypeParser.java 2008-08-15 20:45:08 UTC (rev 4863) +++ trunk/daimonin/src/daieditor/gameobject/ArchetypeParser.java 2008-08-15 20:59:19 UTC (rev 4864) @@ -164,17 +164,18 @@ } } else if (animflag) { if (thisLine.equals("mina")) { + final String animationName = "_" + archetype.getArchetypeName(); try { - animationObjects.addAnimPath(archetype.getArchetypeName(), path + archetype.getArchetypeName()); - animationObjects.addAnimationObject(archetype.getArchetypeName(), animText.toString()); + animationObjects.addAnimPath(animationName, path + archetype.getArchetypeName()); + animationObjects.addAnimationObject(animationName, animText.toString()); animText = null; } catch (final DuplicateAnimationException e) { // TODO: Report to the user log.warn(ACTION_FACTORY.format("logDuplicateAnimation", e.getDuplicate().getAnimName())); } - archetype.addObjectText("animation " + archetype.getArchetypeName()); - archetype.setAnimName(archetype.getArchetypeName()); + archetype.addObjectText("animation " + animationName); + archetype.setAnimName(animationName); // here we must add this to AnimationObject // and add Animation cmd here! This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |