Instructions Jenkins Doxygen

[fixed?] locomotion after getting kded 77/777/1
authorVictor Popovici <theanswer@swgemu.com>
Sun, 8 Sep 2013 11:00:45 +0000 (13:00 +0200)
committerVictor Popovici <theanswer@swgemu.com>
Sun, 8 Sep 2013 11:00:45 +0000 (13:00 +0200)
Change-Id: I3220edf8b9cd3a6d44e8b2882bd7066464772a73

MMOCoreORB/src/server/zone/managers/creature/tests/LuaMobileTest.cpp
MMOCoreORB/src/server/zone/objects/creature/CreatureObjectImplementation.cpp
MMOCoreORB/src/server/zone/packets/object/DataTransform.h
MMOCoreORB/src/server/zone/packets/object/DataTransformWithParent.h

index 77904d9..badf89e 100644 (file)
@@ -35,11 +35,11 @@ TEST_F(LuaMobileTest, LuaMobileTemplatesTest) {
        CreatureTemplateManager::DEBUG_MODE = 1;
 
        // Verify that all mobiles load
-       EXPECT_EQ(CreatureTemplateManager::instance()->loadTemplates(), 0);
+       ASSERT_EQ(CreatureTemplateManager::instance()->loadTemplates(), 0);
 
        // Verify loot group map loads
        LootGroupMap* lootGroupMap = LootGroupMap::instance();
-       EXPECT_EQ(lootGroupMap->initialize(), 0);
+       ASSERT_EQ(lootGroupMap->initialize(), 0);
 
        // Verify loot group percentages
        HashTableIterator<uint32, Reference<CreatureTemplate*> > iter = CreatureTemplateManager::instance()->iterator();
@@ -81,7 +81,7 @@ TEST_F(LuaMobileTest, LuaMobileTemplatesTest) {
 TEST_F(LuaMobileTest, LuaLootGroupsTest) {
 
        LootGroupMap* lootGroupMap = LootGroupMap::instance();
-       EXPECT_EQ(lootGroupMap->initialize(), 0);
+       ASSERT_EQ(lootGroupMap->initialize(), 0);
 
        HashTableIterator<String, Reference<LootGroupTemplate*> > iter = lootGroupMap->groupTemplates.iterator();
        while (iter.hasNext()) {
index 562bd84..5bbcf16 100644 (file)
@@ -1314,6 +1314,11 @@ void CreatureObjectImplementation::setPosture(int newPosture, bool notifyClient)
                broadcastMessages(&messages, true);
        }
 
+       if(posture != CreaturePosture::UPRIGHT && posture != CreaturePosture::DRIVINGVEHICLE
+                               && posture != CreaturePosture::RIDINGCREATURE && posture != CreaturePosture::SKILLANIMATING ) {
+               setCurrentSpeed(0);
+       }
+
        updateLocomotion();
        notifyPostureChange(newPosture);
 }
index d407ea8..8740241 100644 (file)
@@ -157,7 +157,10 @@ public:
                        || posture == CreaturePosture::RIDINGCREATURE || posture == CreaturePosture::SKILLANIMATING ) {
 
                        updatePosition(object);
+               } else {
+                       object->setCurrentSpeed(0);
 
+                       object->updateLocomotion();
                }
 
        }
index 5618240..38e38d5 100644 (file)
@@ -158,6 +158,10 @@ public:
                        || posture == CreaturePosture::RIDINGCREATURE || posture == CreaturePosture::SKILLANIMATING ) {
 
                        updatePosition(object);
+               } else {
+                       object->setCurrentSpeed(0);
+
+                       object->updateLocomotion();
                }
 
        }