MCPcopy Create free account
hub / github.com/Phobos-developers/Phobos / SetTeamLoggingPadding

Method SetTeamLoggingPadding

src/Misc/SyncLogging.cpp:322–349  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

320}
321
322void SyncLogger::SetTeamLoggingPadding(TeamClass* pTeam)
323{
324 int length = strlen(pTeam->Type->get_ID());
325
326 if (length <= 24 && SyncLogger::TeamTypeClass_MaxIDLength < length)
327 SyncLogger::TeamTypeClass_MaxIDLength = length;
328
329 if (pTeam->Type->ScriptType)
330 {
331 length = strlen(pTeam->Type->ScriptType->get_ID());
332
333 if (length <= 24 && SyncLogger::ScriptTypeClass_MaxIDLength < length)
334 SyncLogger::ScriptTypeClass_MaxIDLength = length;
335 }
336
337 if (pTeam->Owner)
338 {
339 length = strlen(pTeam->Owner->Type->get_ID());
340
341 if (length <= 24 && SyncLogger::HouseTypeClass_MaxIDLength < length)
342 SyncLogger::HouseTypeClass_MaxIDLength = length;
343
344 length = strlen(pTeam->Owner->PlainName);
345
346 if (length <= 21 && SyncLogger::HouseName_MaxIDLength < length)
347 SyncLogger::HouseName_MaxIDLength = length;
348 }
349}
350
351// Hooks. Anim contructor logging is in Ext/Anim/Body.cpp to reduce duplicate hooks
352

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected