@@ -1374,6 +1374,13 @@ public void Client_onCreatedProxies(UInt64 rndUUID, Int32 eid, string entityType
13741374 Client_onEntityDestroyed ( eid ) ;
13751375 }
13761376
1377+ MemoryStream entityMessage = null ;
1378+ if ( ! _bufferedCreateEntityMessage . TryGetValue ( eid , out entityMessage ) )
1379+ {
1380+ Dbg . ERROR_MSG ( "KBEngine::Client_onCreatedProxies: entity(" + eid + ") not found!" ) ;
1381+ return ;
1382+ }
1383+
13771384 entity_uuid = rndUUID ;
13781385 entity_id = eid ;
13791386 entity_type = entityType ;
@@ -1396,9 +1403,12 @@ public void Client_onCreatedProxies(UInt64 rndUUID, Int32 eid, string entityType
13961403 entity . baseMailbox . id = eid ;
13971404 entity . baseMailbox . className = entityType ;
13981405 entity . baseMailbox . type = Mailbox . MAILBOX_TYPE . MAILBOX_TYPE_BASE ;
1399-
1406+
14001407 entities [ eid ] = entity ;
14011408
1409+ Client_onUpdatePropertys ( entityMessage ) ;
1410+ _bufferedCreateEntityMessage . Remove ( eid ) ;
1411+
14021412 entity . __init__ ( ) ;
14031413 }
14041414
@@ -1516,6 +1526,7 @@ public void onUpdatePropertys_(Int32 eid, MemoryStream stream)
15161526 {
15171527 setmethod . Invoke ( entity , new object [ ] { oldval } ) ;
15181528 }
1529+
15191530 }
15201531 }
15211532
@@ -1619,7 +1630,7 @@ public void Client_onEntityEnterWorld(MemoryStream stream)
16191630 ScriptModule module = null ;
16201631 if ( ! EntityDef . moduledefs . TryGetValue ( entityType , out module ) )
16211632 {
1622- Dbg . ERROR_MSG ( "KBEngine::Client_onCreatedProxies : not found module(" + entityType + ")!" ) ;
1633+ Dbg . ERROR_MSG ( "KBEngine::Client_onEntityEnterWorld : not found module(" + entityType + ")!" ) ;
16231634 }
16241635
16251636 Type runclass = module . script ;
0 commit comments