Code: Select all
Script 408 Open
{
if(GetCVar("wdi_disable_autoconfig") == True) Terminate;
While(1)
{
if(getcvar("sv_respawnsuper") == False) Consolecommand("sv_respawnsuper true");
if(getcvar("sv_coop_loseammo") == False) Consolecommand("sv_coop_loseammo true");
if(getcvar("sv_coop_losepowerups") == False) Consolecommand("sv_coop_losepowerups true");
if(getcvar("sv_coop_losearmor") == False) Consolecommand("sv_coop_losearmor true");
if(getcvar("sv_coop_loseweapons") == False) Consolecommand("sv_coop_loseweapons true");
if(getcvar("sv_coop_losekeys") == False) Consolecommand("sv_coop_losekeys true");
if(getcvar("sv_coop_loseinventory") == False) Consolecommand("sv_coop_loseinventory true");
if(getcvar("sv_forcegldefaults") == False) Consolecommand("sv_forcegldefaults true");
if(getcvar("sv_disallowspying") == False) Consolecommand("sv_disallowspying true");
if(getcvar("sv_disallowsuicide") == False) Consolecommand("sv_disallowsuicide true");
if(getcvar("sv_noautomapallies") == False) Consolecommand("sv_noautomapallies true");
if(getcvar("sv_noidentifytarget") == False) Consolecommand("sv_noidentifytarget true");
if(getcvar("sv_randomcoopstarts") == False) Consolecommand("sv_randomcoopstarts true");
if(getcvar("sv_nocoopinfo") == False) Consolecommand("sv_nocoopinfo true");
if(getcvar("sv_weapondrop") == True) Consolecommand("sv_weapondrop false");
if(getcvar("sv_applylmsspectatorsettings") == False && WDI_GameState() != GAMESTATE_GAMEOVER) Consolecommand("sv_applylmsspectatorsettings true");
else if(getcvar("sv_applylmsspectatorsettings") == True && WDI_GameState() == GAMESTATE_GAMEOVER) Consolecommand("sv_applylmsspectatorsettings false");
if(getcvar("compat_limited_airmovement") == False) Consolecommand("compat_limited_airmovement true");
if(getcvar("compat_nocrosshair") == False) Consolecommand("compat_nocrosshair true");
Delay(1);
}
Delay(1);
}
This code automatically sets up appropriate DMFlags etc for the server in WDI. As you can see, it's not NECESSARY (in fact, the server owner can even disable it with a custom cvar), but it's nice to have.
One thing that is necessary, and extremely useful, however, are these two lines from the above code:
Code: Select all
if(getcvar("sv_applylmsspectatorsettings") == False && WDI_GameState() != GAMESTATE_GAMEOVER) Consolecommand("sv_applylmsspectatorsettings true");
else if(getcvar("sv_applylmsspectatorsettings") == True && WDI_GameState() == GAMESTATE_GAMEOVER) Consolecommand("sv_applylmsspectatorsettings false");
These lines automatically allow players to talk to eachother after a round ends (during the tally board). Without it, dead players can't talk to players still alive. I received a lot of positive feedback when I implemented this, and it would be a shame to see it go. If there were an alternative to handle this, that would be greatly welcome!
(I'll also post this on the bug tracker to add to the discussion there)