Instructions Jenkins Doxygen

[fixed] stability issue 15/1915/3
authorVictor Popovici <victorpopovici@gmail.com>
Wed, 2 Jul 2014 12:52:06 +0000 (14:52 +0200)
committerVictor Popovici <victorpopovici@gmail.com>
Wed, 2 Jul 2014 13:02:41 +0000 (15:02 +0200)
Change-Id: Ie0b491a209c745a6952e2ce6ea2cc0bd771c7b8c

MMOCoreORB/src/server/zone/objects/scene/SceneObjectImplementation.cpp

index a0958dc..7a9154d 100644 (file)
@@ -1036,14 +1036,36 @@ void SceneObjectImplementation::updateVehiclePosition(bool sendPackets) {
        if (parent == NULL || (!parent->isVehicleObject() && !parent->isMount()))
                return;
 
-       Locker locker(parent);
+       class UpdateVehiclePositionTask : public Task {
+               ManagedReference<SceneObject*> parent;
+               Quaternion direction;
+               float x, y, z;
+               bool sendPackets;
 
-       parent->setDirection(direction.getW(), direction.getX(), direction.getY(), direction.getZ());
-       parent->setPosition(getPositionX(), getPositionZ(), getPositionY());
+       public:
+               UpdateVehiclePositionTask(SceneObject* parent, Quaternion& quat,
+                               float x, float z, float y, bool sendPackets) : parent(parent),
+                               direction(quat), x(x), y(y), z(z), sendPackets(sendPackets) {
 
-       parent->incrementMovementCounter();
+               }
+
+               void run() {
+                       Locker locker(parent);
+
+                       parent->setDirection(direction.getW(), direction.getX(), direction.getY(), direction.getZ());
+                       parent->setPosition(x, z, y);
+
+                       parent->incrementMovementCounter();
+
+                       parent->updateZone(false, sendPackets);
+               }
+       };
+
+       UpdateVehiclePositionTask* task = new UpdateVehiclePositionTask(parent,
+                       direction, getPositionX(), getPositionZ(), getPositionY(),
+                       sendPackets);
 
-       parent->updateZone(false, sendPackets);
+       task->execute();
 }
 
 void SceneObjectImplementation::updateZone(bool lightUpdate, bool sendPackets) {