We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 406dcbd commit c9c1a10Copy full SHA for c9c1a10
src/core/modules/entities/entities_entity.cpp
@@ -220,9 +220,11 @@ str CBaseEntityWrapper::GetKeyValueString(const char* szName)
220
char szResult[MAX_KEY_VALUE_LENGTH];
221
GetKeyValueStringRaw(szName, szResult, MAX_KEY_VALUE_LENGTH);
222
223
+ // TODO: Don't hardcode this
224
// Fix for field name "model". I think a string_t object is copied to szResult.
- if (strcmp(szName, "model") == 0)
225
- return *(char **) szResult;
+ // https://developer.valvesoftware.com/wiki/Team_train_watcher
226
+ if (strcmp(szName, "model") == 0 || strcmp(szName, "train") == 0)
227
+ return str(*(char **) szResult);
228
229
return str(szResult);
230
}
0 commit comments