Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void CBaseFX::CreateDummyObject()
- {
- ObjectCreateStruct ocs;
- LTVector vScale;
- vScale.x = 1.0f;
- vScale.y = 1.0f;
- vScale.z = 1.0f;
- ocs.m_ObjectType = OT_NORMAL;
- ocs.m_Pos = m_vCreatePos;
- ocs.m_Rotation = m_rCreateRot;
- ocs.m_Scale = vScale;
- if (!m_hObject) m_hObject = m_pLTClient->CreateObject(&ocs);
- }
- struct ContainerPhysics;
- struct ObjectCreateStruct;
- class ILTBaseClass
- {
- public:
- virtual ~ILTBaseClass();
- virtual uint32 EngineMessageFn(uint32 messageID, void *pData, float lData);
- virtual uint32 ObjectMessageFn(HOBJECT hSender, ILTMessage_Read *pMsg);
- uint8 GetType() const { return m_nType; }
- void SetType(uint8 type) { m_nType = type; }
- virtual uint32 OnPrecreate(ObjectCreateStruct* pOCS, float precreateType );
- virtual uint32 OnObjectCreated ( float createType );
- virtual uint32 OnUpdate ();
- virtual uint32 OnTouch ( HOBJECT object, float force );
- virtual uint32 OnLinkBroken ( HOBJECT linkObj );
- virtual uint32 OnCrush ( HOBJECT crusherObj );
- virtual uint32 OnLoad ( ILTMessage_Read *pMsg, float dwParam );
- virtual uint32 OnSave ( ILTMessage_Write *pMsg, float dwParam );
- virtual uint32 OnAffectPhysics ( ContainerPhysics* pCP );
- virtual uint32 OnParentAttachmentRemoved ();
- virtual uint32 OnActivate ();
- virtual uint32 OnDeactivate ();
- virtual uint32 OnAllObjectsCreated ();
- HOBJECT GetHOBJECT() const { return m_hObject; }
- void SetHOBJECT(HOBJECT h) { m_hObject = h; }
- void AddAggregate(LPAGGREGATE pAggregate);
- bool RemoveAggregate(LPAGGREGATE pAggregate);
- protected:
- ILTBaseClass(uint8 nType = OT_NORMAL)
- : m_pFirstAggregate(0),
- m_hObject(INVALID_HOBJECT),
- m_nType(nType) {}
- public:
- LPAGGREGATE m_pFirstAggregate;
- HOBJECT m_hObject;
- uint8 m_nType;
- };
- #define PRECREATE_NORMAL 0.0f
- //! Object is being loaded from a world file. Read props in.
- #define PRECREATE_WORLDFILE 1.0f
- //! Object is created from CreateObjectProps. Use GetPropGeneric to read props.
- #define PRECREATE_STRINGPROP 2.0f
- //! Object comes from a savegame.
- #define PRECREATE_SAVEGAME 3.0f
- //! Object being created on client side (client-only object).
- #define PRECREATE_CLIENTOBJ 4.0f
- //! Deprecated alias for \b OBJECTCREATED_NORMAL
- #define INITIALUPDATE_NORMAL 0.0f
- //! Deprecated alias for \b OBJECTCREATED_WORLDFILE
- #define INITIALUPDATE_WORLDFILE 1.0f
- //! Deprecated alias for \b OBJECTCREATED_STRINGPROP
- #define INITIALUPDATE_STRINGPROP 2.0f
- //! Deprecated alias for \b OBJECTCREATED_SAVEGAME
- #define INITIALUPDATE_SAVEGAME 3.0f
- //! Normal creation.
- #define OBJECTCREATED_NORMAL 0.0f
- //! Being created from a world file.
- #define OBJECTCREATED_WORLDFILE 1.0f
- //! Object is created from CreateObjectProps. Use GetPropGeneric to read props.
- #define OBJECTCREATED_STRINGPROP 2.0f
- //! Created from a savegame.
- #define OBJECTCREATED_SAVEGAME 3.0f
- //! Object created on client side (client-only object).
- #define OBJECTCREATED_CLIENTOBJ 4.0f
- enum
- {
- MID_PRECREATE = 0,
- MID_OBJECTCREATED = 1,
- MID_INITIALUPDATE = 1,
- MID_UPDATE = 2,
- MID_TOUCHNOTIFY = 3,
- MID_LINKBROKEN = 4,
- MID_MODELSTRINGKEY = 5,
- MID_CRUSH = 6,
- MID_LOADOBJECT = 7,
- MID_SAVEOBJECT = 8,
- MID_AFFECTPHYSICS = 9,
- MID_PARENTATTACHMENTREMOVED = 10,
- MID_ACTIVATING = 12,
- MID_DEACTIVATING = 13,
- MID_ALLOBJECTSCREATED = 14,
- MID_TRANSFORMHINT = 15,
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement