Fix getting demo filename in csgo
This commit is contained in:
		
							parent
							
								
									857eb091bd
								
							
						
					
					
						commit
						30a83785bf
					
				| @ -464,7 +464,11 @@ void CForwardManager::CallOnStopRecording(IDemoRecorder *recorder) | |||||||
| 	if (!recorder->IsRecording()) | 	if (!recorder->IsRecording()) | ||||||
| 		return; | 		return; | ||||||
| 
 | 
 | ||||||
|  | #if SOURCE_ENGINE == SE_CSGO | ||||||
|  | 	char *pDemoFile = (char *)recorder->GetDemoFile() + 4; | ||||||
|  | #else | ||||||
| 	char *pDemoFile = (char *)recorder->GetDemoFile(); | 	char *pDemoFile = (char *)recorder->GetDemoFile(); | ||||||
|  | #endif | ||||||
| 	 | 	 | ||||||
| 	HLTVServerWrapper *wrapper = g_HLTVServers.GetWrapper(recorder); | 	HLTVServerWrapper *wrapper = g_HLTVServers.GetWrapper(recorder); | ||||||
| 	int instance = -1; | 	int instance = -1; | ||||||
|  | |||||||
| @ -533,7 +533,11 @@ static cell_t Native_GetDemoFileName(IPluginContext *pContext, const cell_t *par | |||||||
| 	if (!hltvserver->GetDemoRecorder()->IsRecording()) | 	if (!hltvserver->GetDemoRecorder()->IsRecording()) | ||||||
| 		return 0; | 		return 0; | ||||||
| 
 | 
 | ||||||
|  | #if SOURCE_ENGINE == SE_CSGO | ||||||
|  | 	char *pDemoFile = (char *)hltvserver->GetDemoRecorder()->GetDemoFile() + 4; | ||||||
|  | #else | ||||||
| 	char *pDemoFile = (char *)hltvserver->GetDemoRecorder()->GetDemoFile(); | 	char *pDemoFile = (char *)hltvserver->GetDemoRecorder()->GetDemoFile(); | ||||||
|  | #endif | ||||||
| 	if (!pDemoFile) | 	if (!pDemoFile) | ||||||
| 		return 0; | 		return 0; | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user