Skip to content

Commit e8b7f7b

Browse files
committed
Fixed getting key value "model"
1 parent 4fec545 commit e8b7f7b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/core/modules/entities/entities_wrap.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,11 @@ const char* CEdictExt::GetKeyValue(edict_t* pEdict, const char* szName)
139139
char szResult[1024];
140140
CBaseEntity* pEntity = pEdict->GetUnknown()->GetBaseEntity();
141141
servertools->GetKeyValue(pEntity, szName, szResult, 1024);
142+
143+
// Fix for field name "model". I think a string_t object is copied to szResult.
144+
if (strcmp(szName, "model") == 0)
145+
return *(char **) szResult;
146+
142147
return szResult;
143148
}
144149

0 commit comments

Comments
 (0)