components/prboom/g_game.c
// killough 3/1/98: function to reload all the default parameter
// settings before a new game begins
killough 3/1/98: function to reload all the default parameter
settings before a new game begins
killough 3 / 1 / 98 : function to reload all the default parameter settings before a new game begins
void G_ReloadDefaults(void)
{
  weapon_recoil = default_weapon_recoil;    
  player_bobbing = default_player_bobbing;  
  variable_friction = default_variable_friction;
  allow_pushers     = default_allow_pushers;
  monsters_remember = default_monsters_remember;   
  monster_infighting = default_monster_infighting; 
#ifdef DOGS
  dogs = netgame ? 0 : G_GetHelpers();             
  dog_jumping = default_dog_jumping;
#endif
  distfriend = default_distfriend;                 
  monster_backing = default_monster_backing;     
  monster_avoid_hazards = default_monster_avoid_hazards; 
  monster_friction = default_monster_friction;     
  help_friends = default_help_friends;             
  monkeys = default_monkeys;
  respawnparm = clrespawnparm;
  fastparm = clfastparm;
  nomonsters = clnomonsters;
  if (startskill==sk_none)
    startskill = (skill_t)(defaultskill-1);
  demoplayback = false;
  singledemo = false;            
  netdemo = false;
  memset(playeringame+1, 0, sizeof(*playeringame)*(MAXPLAYERS-1));
  consoleplayer = 0;
  compatibility_level = default_compatibility_level;
  {
    int i = M_CheckParm("-complevel");
    if (i && (1+i) < myargc) {
      int l = atoi(myargv[i+1]);;
      if (l >= -1) compatibility_level = l;
    }
  }
  if (compatibility_level == -1)
    compatibility_level = best_compatibility;
  if (mbf_features)
    memcpy(comp, default_comp, sizeof comp);
  G_Compatibility();
  demo_insurance = default_demo_insurance == 1;
  rngseed += I_GetRandomTimeSeed() + gametic; 
}
void G_ReloadDefaults ( void ) { weapon_recoil = default_weapon_recoil ; player_bobbing = default_player_bobbing ; variable_friction = default_variable_friction ; allow_pushers = default_allow_pushers ; monsters_remember = default_monsters_remember ; monster_infighting = default_monster_infighting ; #ifdef DOGS dogs = netgame ? 0 : G_GetHelpers ( ) ; dog_jumping = default_dog_jumping ; #endif distfriend = default_distfriend ; monster_backing = default_monster_backing ; monster_avoid_hazards = default_monster_avoid_hazards ; monster_friction = default_monster_friction ; help_friends = default_help_friends ; monkeys = default_monkeys ; respawnparm = clrespawnparm ; fastparm = clfastparm ; nomonsters = clnomonsters ; if ( startskill == sk_none ) startskill = ( skill_t ) ( defaultskill - 1 ) ; demoplayback = false ; singledemo = false ; netdemo = false ; memset ( playeringame + 1 , 0 , sizeof ( * playeringame ) * ( MAXPLAYERS - 1 ) ) ; consoleplayer = 0 ; compatibility_level = default_compatibility_level ; { int i = M_CheckParm ( " " ) ; if ( i && ( 1 + i ) < myargc ) { int l = atoi ( myargv [ i + 1 ] ) ; ; if ( l >= -1 ) compatibility_level = l ; } } if ( compatibility_level == -1 ) compatibility_level = best_compatibility ; if ( mbf_features ) memcpy ( comp , default_comp , sizeof comp ) ; G_Compatibility ( ) ; demo_insurance = default_demo_insurance == 1 ; rngseed += I_GetRandomTimeSeed ( ) + gametic ; }
killough 3/1/98: function to reload all the default parameter
settings before a new game begins
killough 3 / 1 / 98 : function to reload all the default parameter settings before a new game begins
// killough 3/1/98: Initialize options based on config file // (allows functions above to load different values for demos // and savegames without messing up defaults). // weapon recoil // whether player bobs or not /* cph 2007/06/31 - for some reason, the default_* of the next 2 vars was never implemented */ // remember former enemies // killough 7/19/98 // killough 7/19/98 // killough 8/8/98 // killough 9/8/98 // killough 9/9/98 // killough 10/98 // killough 9/9/98 // jff 1/24/98 reset play mode to command line spec'd version // killough 3/1/98: moved to here //jff 3/24/98 set startskill from defaultskill in config file, unless // it has already been set by a -skill parameter // killough 9/29/98: don't stop after 1 demo // killough 2/21/98: // killough 3/31/98, 4/5/98: demo sync insurance // CPhipps