Skip to content

Commit 2f4df07

Browse files
committed
up
1 parent afee321 commit 2f4df07

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

KBEngine.cs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1405,7 +1405,13 @@ public void Client_onCreatedProxies(UInt64 rndUUID, Int32 eid, string entityType
14051405
Client_onEntityDestroyed(eid);
14061406
}
14071407

1408-
Type runclass = EntityDef.moduledefs[entityType].script;
1408+
ScriptModule module = null;
1409+
if(!EntityDef.moduledefs.TryGetValue(entityType, out module))
1410+
{
1411+
Dbg.ERROR_MSG("KBEngine::Client_onCreatedProxies: not found module(" + entityType + ")!");
1412+
}
1413+
1414+
Type runclass = module.script;
14091415
if(runclass == null)
14101416
return;
14111417

@@ -1638,7 +1644,13 @@ public void Client_onEntityEnterWorld(MemoryStream stream)
16381644
return;
16391645
}
16401646

1641-
Type runclass = EntityDef.moduledefs[entityType].script;
1647+
ScriptModule module = null;
1648+
if(!EntityDef.moduledefs.TryGetValue(entityType, out module))
1649+
{
1650+
Dbg.ERROR_MSG("KBEngine::Client_onCreatedProxies: not found module(" + entityType + ")!");
1651+
}
1652+
1653+
Type runclass = module.script;
16421654
if(runclass == null)
16431655
return;
16441656

0 commit comments

Comments
 (0)