mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 08:34:40 +00:00
Moved mask updated to protected member set functions.
This commit is contained in:
parent
a8205240e3
commit
0f22ca64d4
2 changed files with 20 additions and 8 deletions
|
|
@ -457,11 +457,6 @@ void Item::onDeleteNotify( SimObject *obj )
|
||||||
Parent::onDeleteNotify( obj );
|
Parent::onDeleteNotify( obj );
|
||||||
}
|
}
|
||||||
|
|
||||||
void Item::inspectPostApply()
|
|
||||||
{
|
|
||||||
setMaskBits(InitialUpdateMask);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Lighting: -----------------------------------------------------------------
|
// Lighting: -----------------------------------------------------------------
|
||||||
|
|
||||||
void Item::registerLights(LightManager * lightManager, bool lightingScene)
|
void Item::registerLights(LightManager * lightManager, bool lightingScene)
|
||||||
|
|
@ -1281,11 +1276,26 @@ DefineEngineMethod( Item, getLastStickyNormal, const char *, (),,
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
bool Item::_setStatic(void *object, const char *index, const char *data)
|
||||||
|
{
|
||||||
|
Item *i = static_cast<Item*>(object);
|
||||||
|
i->mAtRest = false;
|
||||||
|
i->setMaskBits(InitialUpdateMask | PositionMask);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Item::_setRotate(void *object, const char *index, const char *data)
|
||||||
|
{
|
||||||
|
Item *i = static_cast<Item*>(object);
|
||||||
|
i->setMaskBits(InitialUpdateMask | RotationMask);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
void Item::initPersistFields()
|
void Item::initPersistFields()
|
||||||
{
|
{
|
||||||
addGroup("Misc");
|
addGroup("Misc");
|
||||||
addField("static", TypeBool, Offset(mStatic, Item), "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 (and will not be updated through the network).\n");
|
||||||
addField("rotate", TypeBool, Offset(mRotate, Item), "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");
|
||||||
|
|
||||||
Parent::initPersistFields();
|
Parent::initPersistFields();
|
||||||
|
|
|
||||||
|
|
@ -149,7 +149,9 @@ class Item: public ShapeBase
|
||||||
bool buildPolyList(PolyListContext context, AbstractPolyList* polyList, const Box3F &box, const SphereF &sphere);
|
bool buildPolyList(PolyListContext context, AbstractPolyList* polyList, const Box3F &box, const SphereF &sphere);
|
||||||
void buildConvex(const Box3F& box, Convex* convex);
|
void buildConvex(const Box3F& box, Convex* convex);
|
||||||
void onDeleteNotify(SimObject*);
|
void onDeleteNotify(SimObject*);
|
||||||
void inspectPostApply();
|
|
||||||
|
static bool _setStatic(void *object, const char *index, const char *data);
|
||||||
|
static bool _setRotate(void *object, const char *index, const char *data);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void _updatePhysics();
|
void _updatePhysics();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue