the-butterfly-effect / tbe

The Butterfly Effect, a realistic physics simulation game
http://the-butterfly-effect.org
GNU General Public License v2.0
95 stars 13 forks source link

Objects with pivot points don't work in regression tests #299

Open Wuzzy2 opened 8 years ago

Wuzzy2 commented 8 years ago

If you want to add an object into the hints section of a level for an object which has a pivot point (e.g. rotating bar or hammer), and then do the regression test of said level, the object will behave incorrectly. It seems to fall like a normal object, or it has its pivot point somewhere else.

Below is a simple test level which demonstrates the issue by adding a hammer as a hint.

<!DOCTYPE mydocument>
<tbe-level>
    <levelinfo>
        <title>Regression Test Test</title>
        <author>Wuzzy</author>
        <license>WTFPL</license>
        <description>Test of regression testing.</description>
        <date>13.06.16</date>
    </levelinfo>
    <toolbox>
        <toolboxitem count="1">
            <object height="0.18" Y="0" width="0.45" type="Hammer" X="0" angle="0"/>
        </toolboxitem>
    </toolbox>
    <scene>
        <scenesize height="5" width="10"/>
        <predefined/>
        <background>
            <gradientstop pos="0">0.8;0.8;1;1</gradientstop>
            <gradientstop pos="1">0.494118;0.494118;0.894118;1</gradientstop>
        </background>
    </scene>
    <goals>
        <goal isFail="false" type="escapedPingusCount">
            <property key="equalmore">1</property>
        </goal>
    </goals>
    <hints>
        <hint Y="2" number="1" object="Hammer" X="2"/>
    </hints>
</tbe-level>