File tree Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -496,9 +496,26 @@ public: \
496
496
ScriptDefModule::PROPERTYDESCRIPTION_UIDMAP& propertyDescrs = \
497
497
pScriptModule_->getCellPropertyDescriptions_uidmap (); \
498
498
\
499
- size_t count = 0 ; \
499
+ size_t count = propertyDescrs. size (); \
500
500
\
501
- while (mstream->length () > 0 && count < propertyDescrs.size ()) \
501
+ { \
502
+ ScriptDefModule::PROPERTYDESCRIPTION_UIDMAP::iterator iter = propertyDescrs.begin (); \
503
+ for (; iter != propertyDescrs.end (); ++iter) \
504
+ { \
505
+ /* 由于存在一种情况, 组件def中没有内容, 但有cell脚本,此时baseapp上无法判断他是否有cell属性,所以写celldata时没有数据写入 */ \
506
+ if (iter->second ->getDataType ()->type () == DATA_TYPE_ENTITY_COMPONENT) \
507
+ { \
508
+ EntityComponentType* pEntityComponentType = (EntityComponentType*)iter->second ->getDataType (); \
509
+ if (pEntityComponentType->pScriptDefModule ()->getPropertyDescrs ().size () == 0 ) \
510
+ { \
511
+ --count; \
512
+ continue ; \
513
+ } \
514
+ } \
515
+ } \
516
+ } \
517
+ \
518
+ while (mstream->length () > 0 && count-- > 0 ) \
502
519
{ \
503
520
(*mstream) >> uid /* 父属性 */ >> uid; \
504
521
ScriptDefModule::PROPERTYDESCRIPTION_UIDMAP::iterator iter = propertyDescrs.find (uid); \
@@ -530,8 +547,6 @@ public: \
530
547
PyDict_SetItemString (cellData, iter->second ->getName (), pyobj); \
531
548
Py_DECREF (pyobj); \
532
549
} \
533
- \
534
- ++count; \
535
550
} \
536
551
\
537
552
return cellData; \
You can’t perform that action at this time.
0 commit comments