Author Topic: World @ War Mappers- teams.gsc  (Read 1884 times)

Offline =v4v=Viper

  • Rank: Private
  • *
  • Posts: 34
World @ War Mappers- teams.gsc
« on: December 24, 2008, 08:07:37 pm »
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:
Code: [Select]
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:
Code: [Select]

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

Offline Joker{eXtreme}

  • Rank: Private
  • *
  • Posts: 6108
    • http://www.mycallofduty.com
Re: World @ War Mappers- teams.gsc
« Reply #1 on: December 24, 2008, 08:24:32 pm »
Oooooooooooooooooo Good idea reposting that here Viper :)

Offline =v4v=Viper

  • Rank: Private
  • *
  • Posts: 34
Re: World @ War Mappers- teams.gsc
« Reply #2 on: December 24, 2008, 11:18:09 pm »
Lol sorry didn't know was already posted else where ..any who the more early coverage of this issue the better ;)

Offline ACIDRAIN

  • Rank: Private
  • *
  • Posts: 125
    • http://www.arsrclan.com
Re: World @ War Mappers- teams.gsc
« Reply #3 on: December 25, 2008, 12:12:48 am »
So what is the effect of the bad code?  I mean I could look through it and try to figure it out myself, but I'm pretty busy right now and since you guys know already..

If you'd rather link to an informative post elsewhere, I'm game for that too.  Thanks guys :)

Offline Marc

  • Rank: Private
  • *
  • Posts: 59
    • http://www.wildcardonline.nl
Re: World @ War Mappers- teams.gsc
« Reply #4 on: December 25, 2008, 06:29:28 am »
Like any other Call Of Duty Game, COD:WW uses the usual team split:

    * Allies
    * Axis

In Allies you have:

US Marines
Russian Red Army

In Axis you have:

Japanese Imperial Army
German Wehrmacht

Just as in COD4, with the SAS vs Spatsnez team problem, there is a problem with the default _teams.gsc file - it assumes that a custom map is listed in mapsTable.csv, and will default you to using Marines (Americans) and Japanese.

SOURCE

Offline ACIDRAIN

  • Rank: Private
  • *
  • Posts: 125
    • http://www.arsrclan.com
Re: World @ War Mappers- teams.gsc
« Reply #5 on: December 25, 2008, 07:08:06 pm »
Oh ok I see.  I didn't host COD4 so I missed out on that fun.