Browse Source

Fixed mAtRest logic when setting static flag.

Daniel Buckmaster 13 years ago
parent
commit
f10ea8bbd4
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Engine/source/T3D/item.cpp

+ 2 - 2
Engine/source/T3D/item.cpp

@@ -1279,7 +1279,7 @@ DefineEngineMethod( Item, getLastStickyNormal, const char *, (),,
 bool Item::_setStatic(void *object, const char *index, const char *data)
 bool Item::_setStatic(void *object, const char *index, const char *data)
 {
 {
    Item *i = static_cast<Item*>(object);
    Item *i = static_cast<Item*>(object);
-   i->mAtRest = false;
+   i->mAtRest = dAtob(data);
    i->setMaskBits(InitialUpdateMask | PositionMask);
    i->setMaskBits(InitialUpdateMask | PositionMask);
    return true;
    return true;
 }
 }
@@ -1294,7 +1294,7 @@ bool Item::_setRotate(void *object, const char *index, const char *data)
 void Item::initPersistFields()
 void Item::initPersistFields()
 {
 {
    addGroup("Misc");	
    addGroup("Misc");	
-   addProtectedField("static", TypeBool, Offset(mStatic, Item), &_setStatic, &defaultProtectedGetFn, "If true, the object is not moving in the world (and will not be updated through the network).\n");
+   addProtectedField("static", TypeBool, Offset(mStatic, Item), &_setStatic, &defaultProtectedGetFn, "If true, the object is not moving in the world.\n");
    addProtectedField("rotate", TypeBool, Offset(mRotate, Item), &_setRotate, &defaultProtectedGetFn, "If true, the object will automatically rotate around its Z axis.\n");
    addProtectedField("rotate", TypeBool, Offset(mRotate, Item), &_setRotate, &defaultProtectedGetFn, "If true, the object will automatically rotate around its Z axis.\n");
    endGroup("Misc");
    endGroup("Misc");