@@ -594,7 +594,7 @@ static void DeserializeFusionObject(FusionObject* fusion_object)
594594 }
595595}
596596
597- static dmGameObject::Result DoRegisterObject (dmhash_t id, dmMessage::URL * factory_url, uint32_t scene, FusionCore::ObjectOwnerModes owner_mode)
597+ static dmGameObject::Result DoCreateObject (dmhash_t id, dmMessage::URL * factory_url, uint32_t scene, FusionCore::ObjectOwnerModes owner_mode)
598598{
599599 if (HasSharedObject (id))
600600 {
@@ -1007,7 +1007,7 @@ void Fusion_OnFusionStart()
10071007// send object properties
10081008void Fusion_TickBeforeFrameEnd ()
10091009{
1010- dmLogInfo (" TickBeforeFrameEnd" );
1010+ // dmLogInfo("TickBeforeFrameEnd");
10111011 dmHashTable<dmhash_t , FusionObject*>::Iterator iter = g_Ctx->m_FusionObjects .GetIterator ();
10121012 while (iter.Next ())
10131013 {
@@ -1023,7 +1023,7 @@ void Fusion_TickBeforeFrameEnd()
10231023// updated object properties with received data
10241024void Fusion_TickAfterFrameBegin (double dt)
10251025{
1026- dmLogInfo (" Fusion_TickAfterFrameBegin" );
1026+ // dmLogInfo("Fusion_TickAfterFrameBegin");
10271027 dmHashTable<dmhash_t , FusionObject*>::Iterator iter = g_Ctx->m_FusionObjects .GetIterator ();
10281028 while (iter.Next ())
10291029 {
@@ -1771,16 +1771,16 @@ static int EnableDebug(lua_State* L)
17711771
17721772
17731773
1774- /* * Register a scene object
1775- * @name register_scene_object
1776- * @number scene
1774+ /* * Create a map object
1775+ * @name create_map_object
1776+ * @number map
17771777 * @string factory_url
17781778 * @number owner_mode
17791779 * @string [id]
17801780 */
1781- static int RegisterSceneObject (lua_State* L)
1781+ static int CreateMapObject (lua_State* L)
17821782{
1783- dmLogInfo (" RegisterSceneObject " );
1783+ dmLogInfo (" CreateMapObject " );
17841784 if (!g_Ctx->m_FusionClient )
17851785 {
17861786 luaL_error (L, " No Fusion client" );
@@ -1810,7 +1810,7 @@ static int RegisterSceneObject(lua_State* L)
18101810 bool alreadyPopulated;
18111811 uint32_t engineFlags = 0 ;
18121812 int32_t requiredObjectsCount = 0 ;
1813- dmLogInfo (" Calling CreateSceneObject " );
1813+ dmLogInfo (" Calling CreateMapObject " );
18141814 FusionCore::ObjectRoot* object = g_Ctx->m_FusionClient ->CreateMapObject (alreadyPopulated,
18151815 wordsCount,
18161816 type,
@@ -1822,7 +1822,7 @@ static int RegisterSceneObject(lua_State* L)
18221822 engineFlags,
18231823 requiredObjectsCount);
18241824
1825- dmLogInfo (" Calling CreateSceneObject - done" );
1825+ dmLogInfo (" Calling CreateMapObject - done" );
18261826 FusionObject* fusion_object = CreateFusionObject (id, object);
18271827 if (!fusion_object)
18281828 {
@@ -1921,7 +1921,7 @@ static int SpawnObject(lua_State* L)
19211921 uint32_t scene = (uint32_t )luaL_checknumber (L, 4 );
19221922 FusionCore::ObjectOwnerModes ownerMode = (FusionCore::ObjectOwnerModes)luaL_checknumber (L, 5 );
19231923
1924- r = DoRegisterObject (id, &factory_url, scene, ownerMode);
1924+ r = DoCreateObject (id, &factory_url, scene, ownerMode);
19251925 if (dmGameObject::RESULT_OK != r)
19261926 {
19271927 luaL_error (L, " Unable to spawn game object" );
@@ -1962,16 +1962,16 @@ static int DespawnObject(lua_State* L)
19621962}
19631963
19641964
1965- /* * Register an object
1966- * @name register_object
1965+ /* * Create an object
1966+ * @name create_object
19671967 * @number scene
19681968 * @string factory_url
19691969 * @number owner_mode
19701970 * @string [id]
19711971 */
1972- static int RegisterObject (lua_State* L)
1972+ static int CreateObject (lua_State* L)
19731973{
1974- dmLogInfo (" RegisterObject " );
1974+ dmLogInfo (" CreateObject " );
19751975 if (!g_Ctx->m_FusionClient )
19761976 {
19771977 luaL_error (L, " No Fusion client" );
@@ -1985,8 +1985,8 @@ static int RegisterObject(lua_State* L)
19851985 FusionCore::ObjectOwnerModes ownerMode = (FusionCore::ObjectOwnerModes)luaL_checknumber (L, 3 );
19861986 dmhash_t id = ResolveId (L, 4 );
19871987
1988- dmLogInfo (" RegisterObject %d" , ownerMode);
1989- dmGameObject::Result r = DoRegisterObject (id, factory_url, scene, ownerMode);
1988+ dmLogInfo (" CreateObject %d" , ownerMode);
1989+ dmGameObject::Result r = DoCreateObject (id, factory_url, scene, ownerMode);
19901990 if (dmGameObject::RESULT_OK != r)
19911991 {
19921992 luaL_error (L, " Unable to create object" );
@@ -1996,13 +1996,13 @@ static int RegisterObject(lua_State* L)
19961996 return 0 ;
19971997}
19981998
1999- /* * Unregister a previously registered object
2000- * @name unregister_object
1999+ /* * Destroy a previously created object
2000+ * @name destroy_object
20012001 * @string [id]
20022002 */
2003- static int UnregisterObject (lua_State* L)
2003+ static int DestroyObject (lua_State* L)
20042004{
2005- dmLogInfo (" UnregisterObject " );
2005+ dmLogInfo (" DestroyObject " );
20062006 if (!g_Ctx->m_FusionClient )
20072007 {
20082008 luaL_error (L, " No Fusion client" );
@@ -2161,7 +2161,7 @@ static int GetOwnerId(lua_State* L)
21612161 */
21622162static int HasAuthority (lua_State* L)
21632163{
2164- dmLogInfo (" HasAuthority" );
2164+ // dmLogInfo("HasAuthority");
21652165 if (!g_Ctx->m_FusionClient )
21662166 {
21672167 luaL_error (L, " No Fusion client" );
@@ -2634,9 +2634,9 @@ static const luaL_reg Module_methods[] = {
26342634 // lifecycle
26352635 { " spawn" , SpawnObject },
26362636 { " despawn" , DespawnObject },
2637- { " register_object " , RegisterObject },
2638- { " register_scene_object " , RegisterSceneObject },
2639- { " unregister_object " , UnregisterObject },
2637+ { " create_object " , CreateObject },
2638+ { " create_map_object " , CreateMapObject },
2639+ { " destroy_object " , DestroyObject },
26402640 { " map_change" , MapChange },
26412641
26422642 // rpc and events
0 commit comments