| 124 | } |
| 125 | |
| 126 | void CGhost::GetPath(char *pBuf, int Size, const char *pPlayerName, int Time) const |
| 127 | { |
| 128 | const char *pMap = GameClient()->Map()->BaseName(); |
| 129 | SHA256_DIGEST Sha256 = GameClient()->Map()->Sha256(); |
| 130 | char aSha256[SHA256_MAXSTRSIZE]; |
| 131 | sha256_str(Sha256, aSha256, sizeof(aSha256)); |
| 132 | |
| 133 | char aPlayerName[MAX_NAME_LENGTH]; |
| 134 | str_copy(aPlayerName, pPlayerName); |
| 135 | str_sanitize_filename(aPlayerName); |
| 136 | |
| 137 | char aTimestamp[32]; |
| 138 | str_timestamp_format(aTimestamp, sizeof(aTimestamp), FORMAT_NOSPACE); |
| 139 | |
| 140 | if(Time < 0) |
| 141 | str_format(pBuf, Size, "%s/%s_%s_%s_tmp_%d.gho", ms_pGhostDir, pMap, aPlayerName, aSha256, process_id()); |
| 142 | else |
| 143 | str_format(pBuf, Size, "%s/%s_%s_%d.%03d_%s_%s.gho", ms_pGhostDir, pMap, aPlayerName, Time / 1000, Time % 1000, aTimestamp, aSha256); |
| 144 | } |
| 145 | |
| 146 | void CGhost::AddInfos(const CNetObj_Character *pChar, const CNetObj_DDNetCharacter *pDDnetChar) |
| 147 | { |
nothing calls this directly
no test coverage detected