Remove mp version checker code.

This commit is contained in:
Mari the Deer 2022-03-25 18:54:04 +01:00
commit 3e1153c477
2 changed files with 4 additions and 47 deletions

View file

@ -1,3 +1,3 @@
[default]
SWWM_MODVER="\cyDEMOLITIONIST \cw1.2pre r199 \cu(Fri 25 Mar 18:42:01 CET 2022)\c-";
SWWM_SHORTVER="\cw1.2pre r199 \cu(2022-03-25 18:42:01)\c-";
SWWM_MODVER="\cyDEMOLITIONIST \cw1.2pre r200 \cu(Fri 25 Mar 18:54:04 CET 2022)\c-";
SWWM_SHORTVER="\cw1.2pre r200 \cu(2022-03-25 18:54:04)\c-";

View file

@ -14,11 +14,7 @@ Class SWWMStaticHandler : StaticEventHandler
// versioning
bool tainted;
String taintver;
bool mptaint[MAXPLAYERS];
bool mprecv[MAXPLAYERS];
String mpver[MAXPLAYERS];
int checktic;
ui bool mpsent, checked;
int maptime;
bool unloading;
ui Dictionary menustate; // used by Demolitionist Menu to restore old menu positions
@ -270,15 +266,7 @@ Class SWWMStaticHandler : StaticEventHandler
override void NetworkProcess( ConsoleEvent e )
{
if ( e.IsManual ) return;
if ( e.Name.Left(12) ~== "swwmversion." )
{
String verstr = e.Name.Mid(12);
mprecv[e.Player] = true;
mpver[e.Player] = verstr;
if ( verstr != StringTable.Localize("$SWWM_SHORTVER") )
mptaint[e.Player] = true;
}
else if ( e.Name.Left(16) ~== "swwmachievement." )
if ( e.Name.Left(16) ~== "swwmachievement." )
{
let c = Actor.Spawn("PartyTime",players[e.Args[0]].mo.pos);
c.bSTANDSTILL = true;
@ -306,23 +294,7 @@ Class SWWMStaticHandler : StaticEventHandler
}
if ( gamestate != GS_LEVEL ) return;
CheckAllAchievements();
if ( !mpsent )
{
EventHandler.SendNetworkEvent("swwmversion."..StringTable.Localize("$SWWM_SHORTVER"));
mpsent = true;
return;
}
if ( checked || (gametic < checktic) ) return;
if ( multiplayer )
{
for ( int i=0; i<MAXPLAYERS; i++ )
{
if ( !playeringame[i] || mprecv[i] ) continue;
// waiting for version info from all players
return;
}
}
checked = true;
if ( gametic != checktic ) return;
String cver = StringTable.Localize("$SWWM_SHORTVER");
if ( tainted )
{
@ -336,21 +308,6 @@ Class SWWMStaticHandler : StaticEventHandler
Console.Printf("\cgCurrent:\n \cj"..cver.."\c-");
}
}
if ( multiplayer )
{
bool found = false;
for ( int i=0; i<MAXPLAYERS; i++ )
{
if ( !playeringame[i] || (i == consoleplayer) || (!mptaint[i] && (mpver[i] != "")) ) continue;
if ( !found )
{
Console.Printf("\cfWARNING:\n \cjVersion mismatch between players. Desyncs will happen.\c-");
Console.Printf("\cgYou:\n \cj"..cver.."\c-");
}
found = true;
Console.Printf("\cgPlayer %d (\c-%s\cg):\n \cj%s\c-",i+1,players[i].GetUserName(),(mpver[i]=="")?"\cg(no version data)\c-":mpver[i]);
}
}
}
override void UiTick()