mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Made File Execution Level 3, but level 4 only for autoexec.cfg at server start
Removed TODO, because it's needed there to reset tunings on map change
This commit is contained in:
parent
bdd3af9f43
commit
2ad456433d
|
@ -64,7 +64,7 @@ public:
|
|||
virtual bool LineIsValid(const char *pStr) = 0;
|
||||
virtual void ExecuteLine(const char *Sptr, const int ClientLevel, const int ClientId, FPrintCallback pfnAlternativePrintCallback = 0, void *pUserData = 0, FPrintCallback pfnAlternativePrintResponseCallback = 0, void *pResponseUserData = 0) = 0;
|
||||
virtual void ExecuteLineStroked(int Stroke, const char *pStr, const int ClientLevel, const int ClientId, FPrintCallback pfnAlternativePrintCallback = 0, void *pUserData = 0, FPrintCallback pfnAlternativePrintResponseCallback = 0, void *pResponseUserData = 0) = 0;
|
||||
virtual void ExecuteFile(const char *pFilename, FPrintCallback pfnAlternativePrintCallback = 0, void *pUserData = 0, FPrintCallback pfnAlternativePrintResponseCallback = 0, void *pResponseUserData = 0) = 0;
|
||||
virtual void ExecuteFile(const char *pFilename, FPrintCallback pfnAlternativePrintCallback = 0, void *pUserData = 0, FPrintCallback pfnAlternativePrintResponseCallback = 0, void *pResponseUserData = 0, int Level = 3) = 0;
|
||||
|
||||
virtual void RegisterPrintCallback(FPrintCallback pfnPrintCallback, void *pUserData) = 0;
|
||||
virtual void RegisterAlternativePrintCallback(FPrintCallback pfnAlternativePrintCallback, void *pAlternativeUserData) = 0;
|
||||
|
|
|
@ -1211,7 +1211,7 @@ int CServer::Run()
|
|||
Console()->ExecuteLine("sv_hit 1",4,-1);
|
||||
Console()->ExecuteLine("sv_npc 0",4,-1);
|
||||
Console()->ExecuteLine("sv_phook 1",4,-1);
|
||||
Console()->ExecuteLine("sv_endless_drag 0",4,-1); //TODO: Such string executed where autoexec executed. No need??
|
||||
Console()->ExecuteLine("sv_endless_drag 0",4,-1);
|
||||
// new map loaded
|
||||
GameServer()->OnShutdown();
|
||||
|
||||
|
@ -1678,7 +1678,7 @@ int main(int argc, const char **argv) // ignore_convention
|
|||
pConsole->ExecuteLine("sv_phook 1",4,-1);
|
||||
pConsole->ExecuteLine("sv_endless_drag 0",4,-1);
|
||||
// execute autoexec file
|
||||
pConsole->ExecuteFile("autoexec.cfg");
|
||||
pConsole->ExecuteFile("autoexec.cfg", 0, 0, 0, 0, 4);
|
||||
|
||||
// parse the command line arguments
|
||||
if(argc > 1) // ignore_convention
|
||||
|
|
|
@ -563,7 +563,7 @@ void CConsole::ExecuteLine(const char *pStr, const int ClientLevel, const int Cl
|
|||
}
|
||||
|
||||
|
||||
void CConsole::ExecuteFile(const char *pFilename, FPrintCallback pfnAlternativePrintCallback, void *pUserData, FPrintCallback pfnAlternativePrintResponseCallback, void *pResponseUserData)
|
||||
void CConsole::ExecuteFile(const char *pFilename, FPrintCallback pfnAlternativePrintCallback, void *pUserData, FPrintCallback pfnAlternativePrintResponseCallback, void *pResponseUserData, int Level)
|
||||
{
|
||||
// make sure that this isn't being executed already
|
||||
for(CExecFile *pCur = m_pFirstExec; pCur; pCur = pCur->m_pPrev)
|
||||
|
@ -599,7 +599,7 @@ void CConsole::ExecuteFile(const char *pFilename, FPrintCallback pfnAlternativeP
|
|||
ReleaseAlternativePrintCallback();
|
||||
|
||||
while((pLine = lr.Get()))
|
||||
ExecuteLine(pLine, 4, -1, pfnAlternativePrintCallback, pUserData, pfnAlternativePrintResponseCallback, pResponseUserData);
|
||||
ExecuteLine(pLine, Level, -1, pfnAlternativePrintCallback, pUserData, pfnAlternativePrintResponseCallback, pResponseUserData);
|
||||
|
||||
io_close(File);
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ class CConsole : public IConsole
|
|||
static void Con_Echo(IResult *pResult, void *pUserData, int ClientId);
|
||||
static void Con_Exec(IResult *pResult, void *pUserData, int ClientId);
|
||||
|
||||
void ExecuteFileRecurse(const char *pFilename, FPrintCallback pfnAlternativePrintCallback = 0, void *pUserData = 0, FPrintCallback pfnAlternativePrintResponseCallback = 0, void *pResponseUserData = 0);
|
||||
void ExecuteFileRecurse(const char *pFilename, FPrintCallback pfnAlternativePrintCallback = 0, void *pUserData = 0, FPrintCallback pfnAlternativePrintResponseCallback = 0, void *pResponseUserData = 0, int Level = 3);
|
||||
virtual void ExecuteLineStroked(int Stroke, const char *pStr, const int ClientLevel, const int ClientId, FPrintCallback pfnAlternativePrintCallback = 0, void *pUserData = 0, FPrintCallback pfnAlternativePrintResponseCallback = 0, void *pResponseUserData = 0);
|
||||
|
||||
FPrintCallback m_pfnPrintCallback;
|
||||
|
@ -154,7 +154,7 @@ public:
|
|||
|
||||
virtual bool LineIsValid(const char *pStr);
|
||||
virtual void ExecuteLine(const char *pStr, const int ClientLevel, const int ClientId, FPrintCallback pfnAlternativePrintCallback = 0, void *pUserData = 0, FPrintCallback pfnAlternativePrintResponseCallback = 0, void *pResponseUserData = 0);
|
||||
virtual void ExecuteFile(const char *pFilename, FPrintCallback pfnAlternativePrintCallback = 0, void *pUserData = 0, FPrintCallback pfnAlternativePrintResponseCallback = 0, void *pResponseUserData = 0);
|
||||
virtual void ExecuteFile(const char *pFilename, FPrintCallback pfnAlternativePrintCallback = 0, void *pUserData = 0, FPrintCallback pfnAlternativePrintResponseCallback = 0, void *pResponseUserData = 0, int Level = 3);
|
||||
|
||||
virtual void RegisterPrintCallback(FPrintCallback pfnPrintCallback, void *pUserData);
|
||||
virtual void RegisterAlternativePrintCallback(FPrintCallback pfnAlternativePrintCallback, void *pAlternativeUserData);
|
||||
|
|
Loading…
Reference in a new issue