ATTENTION WORLD AT WAR MAPPERS;
Cod 5 uses a bad _teams.gsc...in cod4 infinity ward corrected this in a later patch however cod5 uses an early build of the cod4 files therefor the fix isnt in them.
Mappers should be aware of this and take action now so we don't get off to a bad start like we did with CoD4. I have tested 16 maps so far and only 2 use the good code.
THE PART THATS BAD IN _TEAMS.GSC:
setPlayerModels()
{
game["allies_model"] = [];
alliesCharSet = tableLookup( "mp/mapsTable.csv", 0, getDvar( "mapname" ), 1 );
if ( !isDefined( alliesCharSet ) || alliesCharSet == "" )
{
game["allies_soldiertype"] = "pacific";
game["allies"] = "marines";
}
else
game["allies_soldiertype"] = alliesCharSet;
axisCharSet = tableLookup( "mp/mapsTable.csv", 0, getDvar( "mapname" ), 2 );
if ( !isDefined( axisCharSet ) || axisCharSet == "" )
{
game["axis_soldiertype"] = "pacific";
game["axis"] = "japanese";
}
else
game["axis_soldiertype"] = axisCharSet;
if ( game["allies_soldiertype"] == "german" )
{
//###stefan the changing of teams is causing this to trigger a ton
// and as it is not a fatal condition, we're changing this assert() to a warning message
// so our designers can continue to run
//assert( game["allies"] == "russian" );
if (game["allies"]!="russian")
{
IPrintLn("WARNING: game[\"allies\"]=="+game["allies"]+", expected\"russian\"");
}
mptype\mptype_rus_guard_rifle::precache();
mptype\mptype_rus_guard_cqb::precache();
mptype\mptype_rus_guard_assault::precache();
mptype\mptype_rus_guard_lmg::precache();
mptype\mptype_rus_guard_smg::precache();
game["allies_model"]["SNIPER"] = mptype\mptype_rus_guard_rifle::main;
game["allies_model"]["SUPPORT"] = mptype\mptype_rus_guard_lmg::main;
game["allies_model"]["ASSAULT"] = mptype\mptype_rus_guard_assault::main;
game["allies_model"]["RECON"] = mptype\mptype_rus_guard_cqb::main;
game["allies_model"]["SPECOPS"] = mptype\mptype_rus_guard_smg::main;
game["allies_model"]["FLAMETHROWER"] = mptype\mptype_rus_guard_lmg::main;
// custom class defaults
game["allies_model"]["CLASS_CUSTOM1"] = mptype\mptype_rus_guard_assault::main;
game["allies_model"]["CLASS_CUSTOM2"] = mptype\mptype_rus_guard_assault::main;
game["allies_model"]["CLASS_CUSTOM3"] = mptype\mptype_rus_guard_assault::main;
game["allies_model"]["CLASS_CUSTOM4"] = mptype\mptype_rus_guard_assault::main;
game["allies_model"]["CLASS_CUSTOM5"] = mptype\mptype_rus_guard_assault::main;
}
else //if ( game["allies_soldiertype"] == "pacific" )
{
//###stefan the changing of teams is causing this to trigger a ton
// and as it is not a fatal condition, we're changing this assert() to a warning message
// so our designers can continue to run
//assert( game["allies"] == "marines" );
if (game["allies"]!="marines")
{
IPrintLn("WARNING: game[\"allies\"]=="+game["allies"]+", expected\"marines\"");
}
mptype\mptype_usa_raider_rifle::precache();
mptype\mptype_usa_raider_cqb::precache();
mptype\mptype_usa_raider_assault::precache();
mptype\mptype_usa_raider_lmg::precache();
mptype\mptype_usa_raider_smg::precache();
game["allies_model"]["SNIPER"] = mptype\mptype_usa_raider_rifle::main;
game["allies_model"]["SUPPORT"] = mptype\mptype_usa_raider_lmg::main;
game["allies_model"]["ASSAULT"] = mptype\mptype_usa_raider_assault::main;
game["allies_model"]["RECON"] = mptype\mptype_usa_raider_cqb::main;
game["allies_model"]["SPECOPS"] = mptype\mptype_usa_raider_smg::main;
game["allies_model"]["FLAMETHROWER"] = mptype\mptype_usa_raider_cqb::main;
// custom class defaults
game["allies_model"]["CLASS_CUSTOM1"] = mptype\mptype_usa_raider_assault::main;
game["allies_model"]["CLASS_CUSTOM2"] = mptype\mptype_usa_raider_assault::main;
game["allies_model"]["CLASS_CUSTOM3"] = mptype\mptype_usa_raider_assault::main;
game["allies_model"]["CLASS_CUSTOM4"] = mptype\mptype_usa_raider_assault::main;
game["allies_model"]["CLASS_CUSTOM5"] = mptype\mptype_usa_raider_assault::main;
}
if ( game["axis_soldiertype"] == "german" )
{
//###stefan the changing of teams is causing this to trigger a ton
// and as it is not a fatal condition, we're changing this assert() to a warning message
// so our designers can continue to run
//assert( game["axis"] == "german" );
if (game["axis"]!="german")
{
IPrintLn("WARNING: game[\"axis\"]=="+game["axis"]+", expected\"german\"");
}
mptype\mptype_ger_hnrgrd_rifle::precache();
mptype\mptype_ger_hnrgrd_cqb::precache();
mptype\mptype_ger_hnrgrd_assault::precache();
mptype\mptype_ger_hnrgrd_lmg::precache();
mptype\mptype_ger_hnrgrd_smg::precache();
game["axis_model"]["SNIPER"] = mptype\mptype_ger_hnrgrd_rifle::main;
game["axis_model"]["SUPPORT"] = mptype\mptype_ger_hnrgrd_lmg::main;
game["axis_model"]["ASSAULT"] = mptype\mptype_ger_hnrgrd_assault::main;
game["axis_model"]["RECON"] = mptype\mptype_ger_hnrgrd_cqb::main;
game["axis_model"]["SPECOPS"] = mptype\mptype_ger_hnrgrd_smg::main;
game["axis_model"]["FLAMETHROWER"] = mptype\mptype_ger_hnrgrd_lmg::main;
// custom class defaults
game["axis_model"]["CLASS_CUSTOM1"] = mptype\mptype_ger_hnrgrd_assault::main;
game["axis_model"]["CLASS_CUSTOM2"] = mptype\mptype_ger_hnrgrd_assault::main;
game["axis_model"]["CLASS_CUSTOM3"] = mptype\mptype_ger_hnrgrd_assault::main;
game["axis_model"]["CLASS_CUSTOM4"] = mptype\mptype_ger_hnrgrd_assault::main;
game["axis_model"]["CLASS_CUSTOM5"] = mptype\mptype_ger_hnrgrd_assault::main;
}
else //if ( game["axis_soldiertype"] == "pacific" )
{
//###stefan the changing of teams is causing this to trigger a ton
// and as it is not a fatal condition, we're changing this assert() to a warning message
// so our designers can continue to run
//assert( game["axis"] == "japanese" );
if (game["axis"]!="japanese")
{
IPrintLn("WARNING: game[\"axis\"]=="+game["axis"]+", expected\"japanese\"");
}
mptype\mptype_jap_impinf_rifle::precache();
mptype\mptype_jap_impinf_cqb::precache();
mptype\mptype_jap_impinf_assault::precache();
mptype\mptype_jap_impinf_lmg::precache();
mptype\mptype_jap_impinf_smg::precache();
game["axis_model"]["SNIPER"] = mptype\mptype_jap_impinf_rifle::main;
game["axis_model"]["SUPPORT"] = mptype\mptype_jap_impinf_lmg::main;
game["axis_model"]["ASSAULT"] = mptype\mptype_jap_impinf_assault::main;
game["axis_model"]["RECON"] = mptype\mptype_jap_impinf_cqb::main;
game["axis_model"]["SPECOPS"] = mptype\mptype_jap_impinf_smg::main;
game["axis_model"]["FLAMETHROWER"] = mptype\mptype_jap_impinf_smg::main;
// custom class defaults
game["axis_model"]["CLASS_CUSTOM1"] = mptype\mptype_jap_impinf_assault::main;
game["axis_model"]["CLASS_CUSTOM2"] = mptype\mptype_jap_impinf_assault::main;
game["axis_model"]["CLASS_CUSTOM3"] = mptype\mptype_jap_impinf_assault::main;
game["axis_model"]["CLASS_CUSTOM4"] = mptype\mptype_jap_impinf_assault::main;
game["axis_model"]["CLASS_CUSTOM5"] = mptype\mptype_jap_impinf_assault::main;
}
}
THIS SHOULD BE:
setPlayerModels()
{
game["allies_model"] = [];
alliesCharSet = tableLookup( "mp/mapsTable.csv", 0, getDvar( "mapname" ), 1 );
if ( !isDefined( alliesCharSet ) || alliesCharSet == "" )
{
if( !isdefined( game["allies_soldiertype"] ) || !isdefined( game["allies"] ) )
{
game["allies_soldiertype"] = "pacific";
game["allies"] = "marines";
}
}
else
game["allies_soldiertype"] = alliesCharSet;
axisCharSet = tableLookup( "mp/mapsTable.csv", 0, getDvar( "mapname" ), 2 );
if ( !isDefined( axisCharSet ) || axisCharSet == "" )
{
if( !isdefined( game["axis_soldiertype"] ) || !isdefined( game["axis"] ) )
{
game["axis_soldiertype"] = "pacific";
game["axis"] = "japanese";
}
}
else
game["axis_soldiertype"] = axisCharSet;
if( game["allies_soldiertype"] == "german" )
{
//###stefan the changing of teams is causing this to trigger a ton
// and as it is not a fatal condition, we're changing this assert() to a warning message
// so our designers can continue to run
//assert( game["allies"] == "russian" );
if (game["allies"]!="russian")
{
IPrintLn("WARNING: game[\"allies\"]=="+game["allies"]+", expected\"russian\"");
}
mptype\mptype_rus_guard_rifle::precache();
mptype\mptype_rus_guard_cqb::precache();
mptype\mptype_rus_guard_assault::precache();
mptype\mptype_rus_guard_lmg::precache();
mptype\mptype_rus_guard_smg::precache();
game["allies_model"]["SNIPER"] = mptype\mptype_rus_guard_rifle::main;
game["allies_model"]["SUPPORT"] = mptype\mptype_rus_guard_lmg::main;
game["allies_model"]["ASSAULT"] = mptype\mptype_rus_guard_assault::main;
game["allies_model"]["RECON"] = mptype\mptype_rus_guard_cqb::main;
game["allies_model"]["SPECOPS"] = mptype\mptype_rus_guard_smg::main;
game["allies_model"]["FLAMETHROWER"] = mptype\mptype_rus_guard_lmg::main;
// custom class defaults
game["allies_model"]["CLASS_CUSTOM1"] = mptype\mptype_rus_guard_assault::main;
game["allies_model"]["CLASS_CUSTOM2"] = mptype\mptype_rus_guard_assault::main;
game["allies_model"]["CLASS_CUSTOM3"] = mptype\mptype_rus_guard_assault::main;
game["allies_model"]["CLASS_CUSTOM4"] = mptype\mptype_rus_guard_assault::main;
game["allies_model"]["CLASS_CUSTOM5"] = mptype\mptype_rus_guard_assault::main;
}
else //if ( game["allies_soldiertype"] == "pacific" )
{
//###stefan the changing of teams is causing this to trigger a ton
// and as it is not a fatal condition, we're changing this assert() to a warning message
// so our designers can continue to run
//assert( game["allies"] == "marines" );
if (game["allies"]!="marines")
{
IPrintLn("WARNING: game[\"allies\"]=="+game["allies"]+", expected\"marines\"");
}
mptype\mptype_usa_raider_rifle::precache();
mptype\mptype_usa_raider_cqb::precache();
mptype\mptype_usa_raider_assault::precache();
mptype\mptype_usa_raider_lmg::precache();
mptype\mptype_usa_raider_smg::precache();
game["allies_model"]["SNIPER"] = mptype\mptype_usa_raider_rifle::main;
game["allies_model"]["SUPPORT"] = mptype\mptype_usa_raider_lmg::main;
game["allies_model"]["ASSAULT"] = mptype\mptype_usa_raider_assault::main;
game["allies_model"]["RECON"] = mptype\mptype_usa_raider_cqb::main;
game["allies_model"]["SPECOPS"] = mptype\mptype_usa_raider_smg::main;
game["allies_model"]["FLAMETHROWER"] = mptype\mptype_usa_raider_cqb::main;
// custom class defaults
game["allies_model"]["CLASS_CUSTOM1"] = mptype\mptype_usa_raider_assault::main;
game["allies_model"]["CLASS_CUSTOM2"] = mptype\mptype_usa_raider_assault::main;
game["allies_model"]["CLASS_CUSTOM3"] = mptype\mptype_usa_raider_assault::main;
game["allies_model"]["CLASS_CUSTOM4"] = mptype\mptype_usa_raider_assault::main;
game["allies_model"]["CLASS_CUSTOM5"] = mptype\mptype_usa_raider_assault::main;
}
if ( game["axis_soldiertype"] == "german" )
{
//###stefan the changing of teams is causing this to trigger a ton
// and as it is not a fatal condition, we're changing this assert() to a warning message
// so our designers can continue to run
//assert( game["axis"] == "german" );
if (game["axis"]!="german")
{
IPrintLn("WARNING: game[\"axis\"]=="+game["axis"]+", expected\"german\"");
}
mptype\mptype_ger_hnrgrd_rifle::precache();
mptype\mptype_ger_hnrgrd_cqb::precache();
mptype\mptype_ger_hnrgrd_assault::precache();
mptype\mptype_ger_hnrgrd_lmg::precache();
mptype\mptype_ger_hnrgrd_smg::precache();
game["axis_model"]["SNIPER"] = mptype\mptype_ger_hnrgrd_rifle::main;
game["axis_model"]["SUPPORT"] = mptype\mptype_ger_hnrgrd_lmg::main;
game["axis_model"]["ASSAULT"] = mptype\mptype_ger_hnrgrd_assault::main;
game["axis_model"]["RECON"] = mptype\mptype_ger_hnrgrd_cqb::main;
game["axis_model"]["SPECOPS"] = mptype\mptype_ger_hnrgrd_smg::main;
game["axis_model"]["FLAMETHROWER"] = mptype\mptype_ger_hnrgrd_lmg::main;
// custom class defaults
game["axis_model"]["CLASS_CUSTOM1"] = mptype\mptype_ger_hnrgrd_assault::main;
game["axis_model"]["CLASS_CUSTOM2"] = mptype\mptype_ger_hnrgrd_assault::main;
game["axis_model"]["CLASS_CUSTOM3"] = mptype\mptype_ger_hnrgrd_assault::main;
game["axis_model"]["CLASS_CUSTOM4"] = mptype\mptype_ger_hnrgrd_assault::main;
game["axis_model"]["CLASS_CUSTOM5"] = mptype\mptype_ger_hnrgrd_assault::main;
}
else //if ( game["axis_soldiertype"] == "pacific" )
{
//###stefan the changing of teams is causing this to trigger a ton
// and as it is not a fatal condition, we're changing this assert() to a warning message
// so our designers can continue to run
//assert( game["axis"] == "japanese" );
if (game["axis"]!="japanese")
{
IPrintLn("WARNING: game[\"axis\"]=="+game["axis"]+", expected\"japanese\"");
}
mptype\mptype_jap_impinf_rifle::precache();
mptype\mptype_jap_impinf_cqb::precache();
mptype\mptype_jap_impinf_assault::precache();
mptype\mptype_jap_impinf_lmg::precache();
mptype\mptype_jap_impinf_smg::precache();
game["axis_model"]["SNIPER"] = mptype\mptype_jap_impinf_rifle::main;
game["axis_model"]["SUPPORT"] = mptype\mptype_jap_impinf_lmg::main;
game["axis_model"]["ASSAULT"] = mptype\mptype_jap_impinf_assault::main;
game["axis_model"]["RECON"] = mptype\mptype_jap_impinf_cqb::main;
game["axis_model"]["SPECOPS"] = mptype\mptype_jap_impinf_smg::main;
game["axis_model"]["FLAMETHROWER"] = mptype\mptype_jap_impinf_smg::main;
// custom class defaults
game["axis_model"]["CLASS_CUSTOM1"] = mptype\mptype_jap_impinf_assault::main;
game["axis_model"]["CLASS_CUSTOM2"] = mptype\mptype_jap_impinf_assault::main;
game["axis_model"]["CLASS_CUSTOM3"] = mptype\mptype_jap_impinf_assault::main;
game["axis_model"]["CLASS_CUSTOM4"] = mptype\mptype_jap_impinf_assault::main;
game["axis_model"]["CLASS_CUSTOM5"] = mptype\mptype_jap_impinf_assault::main;
}
}
Corrected Code Courtesy of Tally by way of M\arc