Skip to content

Commit 039f307

Browse files
committed
В каллбек eArticleInfo добавился ещё один аргумент - текст артикла
1 parent b7b9b24 commit 039f307

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

ogsr_engine/xrGame/actor_communication.cpp

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -87,16 +87,12 @@ void CActor::AddEncyclopediaArticle( const CInfoPortion* info_portion, bool reve
8787

8888
CEncyclopediaArticle article;
8989
article.Load( id );
90-
article_vector.push_back(
91-
ARTICLE_DATA( id, Level().GetGameTime(), article.data()->articleType )
92-
);
93-
LPCSTR g, n;
94-
int _atype = article.data()->articleType;
95-
g = *( article.data()->group );
96-
n = *( article.data()->name );
97-
callback( GameObject::eArticleInfo )( lua_game_object(), g, n, _atype );
90+
ARTICLE_DATA::EArticleType _atype = article.data()->articleType;
91+
auto& Data = article_vector.emplace_back(id, Level().GetGameTime(), _atype);
92+
93+
callback(GameObject::eArticleInfo)(lua_game_object(), article.data()->group.c_str(), article.data()->name.c_str(), _atype, article.data()->text.c_str());
9894

99-
update_pda_section( article_vector.back() );
95+
update_pda_section(Data);
10096
}
10197

10298
if ( !updated_pda.empty() && HUD().GetUI() ) {

0 commit comments

Comments
 (0)