- if(start_items & IT_UNLIMITED_WEAPON_AMMO)
- {
- start_ammo_rockets = 999;
- start_ammo_shells = 999;
- start_ammo_cells = 999;
- start_ammo_plasma = 999;
- start_ammo_nails = 999;
- start_ammo_fuel = 999;
- }
- else
- {
- start_ammo_shells = cvar("g_start_ammo_shells");
- start_ammo_nails = cvar("g_start_ammo_nails");
- start_ammo_rockets = cvar("g_start_ammo_rockets");
- start_ammo_cells = cvar("g_start_ammo_cells");
- start_ammo_plasma = cvar("g_start_ammo_plasma");
- start_ammo_fuel = cvar("g_start_ammo_fuel");
- }
-
- if (warmup_stage)
- {
- warmup_start_ammo_shells = start_ammo_shells;
- warmup_start_ammo_nails = start_ammo_nails;
- warmup_start_ammo_rockets = start_ammo_rockets;
- warmup_start_ammo_cells = start_ammo_cells;
- warmup_start_ammo_fuel = start_ammo_fuel;
- warmup_start_health = start_health;
- warmup_start_armorvalue = start_armorvalue;
- warmup_start_weapons = start_weapons;
- warmup_start_weapons_default = start_weapons_default;
- warmup_start_weapons_defaultmask = start_weapons_defaultmask;
-
- if (!g_weaponarena && !g_ca)
- {
- warmup_start_ammo_shells = cvar("g_warmup_start_ammo_shells");
- warmup_start_ammo_cells = cvar("g_warmup_start_ammo_cells");
- warmup_start_ammo_nails = cvar("g_warmup_start_ammo_nails");
- warmup_start_ammo_rockets = cvar("g_warmup_start_ammo_rockets");
- warmup_start_ammo_fuel = cvar("g_warmup_start_ammo_fuel");
- warmup_start_health = cvar("g_warmup_start_health");
- warmup_start_armorvalue = cvar("g_warmup_start_armor");
- warmup_start_weapons = '0 0 0';
- warmup_start_weapons_default = '0 0 0';
- warmup_start_weapons_defaultmask = '0 0 0';
- for (i = WEP_FIRST; i <= WEP_LAST; ++i)
- {
- e = get_weaponinfo(i);
- float w = want_weapon(e, g_warmup_allguns);
- if(w & 1)
- warmup_start_weapons |= WepSet_FromWeapon(i);
- if(w & 2)
- warmup_start_weapons_default |= WepSet_FromWeapon(i);
- if(w & 4)
- warmup_start_weapons_defaultmask |= WepSet_FromWeapon(i);
- }
- }
- }
-
- if (g_jetpack)
- start_items |= IT_JETPACK;
-
- MUTATOR_CALLHOOK(SetStartItems);
-
- if ((start_items & IT_JETPACK) || (g_grappling_hook && (start_weapons & WEPSET_HOOK)))
- {
- g_grappling_hook = 0; // these two can't coexist, as they use the same button
- start_items |= IT_FUEL_REGEN;
- start_ammo_fuel = max(start_ammo_fuel, cvar("g_balance_fuel_rotstable"));
- warmup_start_ammo_fuel = max(warmup_start_ammo_fuel, cvar("g_balance_fuel_rotstable"));
- }
-
- WepSet precache_weapons = start_weapons;
- if (g_warmup_allguns != 1)
- precache_weapons |= warmup_start_weapons;
- for (i = WEP_FIRST; i <= WEP_LAST; ++i)
- {
- e = get_weaponinfo(i);
- if(precache_weapons & WepSet_FromWeapon(i))
- WEP_ACTION(i, WR_INIT);
- }
-
- start_ammo_shells = max(0, start_ammo_shells);
- start_ammo_nails = max(0, start_ammo_nails);
- start_ammo_cells = max(0, start_ammo_cells);
- start_ammo_plasma = max(0, start_ammo_plasma);
- start_ammo_rockets = max(0, start_ammo_rockets);
- start_ammo_fuel = max(0, start_ammo_fuel);
-
- warmup_start_ammo_shells = max(0, warmup_start_ammo_shells);
- warmup_start_ammo_nails = max(0, warmup_start_ammo_nails);
- warmup_start_ammo_cells = max(0, warmup_start_ammo_cells);
- warmup_start_ammo_plasma = max(0, warmup_start_ammo_plasma);
- warmup_start_ammo_rockets = max(0, warmup_start_ammo_rockets);
- warmup_start_ammo_fuel = max(0, warmup_start_ammo_fuel);
-}
-
-float g_bugrigs;
-float g_bugrigs_planar_movement;
-float g_bugrigs_planar_movement_car_jumping;
-float g_bugrigs_reverse_spinning;
-float g_bugrigs_reverse_speeding;
-float g_bugrigs_reverse_stopping;
-float g_bugrigs_air_steering;
-float g_bugrigs_angle_smoothing;
-float g_bugrigs_friction_floor;
-float g_bugrigs_friction_brake;
-float g_bugrigs_friction_air;
-float g_bugrigs_accel;
-float g_bugrigs_speed_ref;
-float g_bugrigs_speed_pow;
-float g_bugrigs_steer;
-
-float sv_autotaunt;
-float sv_taunt;
-
-string GetGametype(); // g_world.qc
-void mutators_add(); // mutators.qc
-void readlevelcvars(void)
-{
- // load mutators
- mutators_add();
-
- if(cvar("sv_allow_fullbright"))
- serverflags |= SERVERFLAG_ALLOW_FULLBRIGHT;
-
- g_bugrigs = cvar("g_bugrigs");
- g_bugrigs_planar_movement = cvar("g_bugrigs_planar_movement");
- g_bugrigs_planar_movement_car_jumping = cvar("g_bugrigs_planar_movement_car_jumping");
- g_bugrigs_reverse_spinning = cvar("g_bugrigs_reverse_spinning");
- g_bugrigs_reverse_speeding = cvar("g_bugrigs_reverse_speeding");
- g_bugrigs_reverse_stopping = cvar("g_bugrigs_reverse_stopping");
- g_bugrigs_air_steering = cvar("g_bugrigs_air_steering");
- g_bugrigs_angle_smoothing = cvar("g_bugrigs_angle_smoothing");
- g_bugrigs_friction_floor = cvar("g_bugrigs_friction_floor");
- g_bugrigs_friction_brake = cvar("g_bugrigs_friction_brake");
- g_bugrigs_friction_air = cvar("g_bugrigs_friction_air");
- g_bugrigs_accel = cvar("g_bugrigs_accel");
- g_bugrigs_speed_ref = cvar("g_bugrigs_speed_ref");
- g_bugrigs_speed_pow = cvar("g_bugrigs_speed_pow");
- g_bugrigs_steer = cvar("g_bugrigs_steer");
-
- g_instagib = cvar("g_instagib");
-
- sv_clones = cvar("sv_clones");
- sv_foginterval = cvar("sv_foginterval");
- g_cloaked = cvar("g_cloaked");
- g_footsteps = cvar("g_footsteps");
- g_grappling_hook = cvar("g_grappling_hook");
- g_jetpack = cvar("g_jetpack");
- sv_maxidle = cvar("sv_maxidle");
- sv_maxidle_spectatorsareidle = cvar("sv_maxidle_spectatorsareidle");
- sv_autotaunt = cvar("sv_autotaunt");
- sv_taunt = cvar("sv_taunt");
-
- warmup_stage = cvar("g_warmup");
- g_warmup_limit = cvar("g_warmup_limit");
- g_warmup_allguns = cvar("g_warmup_allguns");
- g_warmup_allow_timeout = cvar("g_warmup_allow_timeout");
-
- if ((g_race && g_race_qualifying == 2) || g_assault || cvar("g_campaign"))
- warmup_stage = 0; // these modes cannot work together, sorry
-
- g_pickup_respawntime_weapon = cvar("g_pickup_respawntime_weapon");
- g_pickup_respawntime_superweapon = cvar("g_pickup_respawntime_superweapon");
- g_pickup_respawntime_ammo = cvar("g_pickup_respawntime_ammo");
- g_pickup_respawntime_short = cvar("g_pickup_respawntime_short");
- g_pickup_respawntime_medium = cvar("g_pickup_respawntime_medium");
- g_pickup_respawntime_long = cvar("g_pickup_respawntime_long");
- g_pickup_respawntime_powerup = cvar("g_pickup_respawntime_powerup");
- g_pickup_respawntimejitter_weapon = cvar("g_pickup_respawntimejitter_weapon");
- g_pickup_respawntimejitter_superweapon = cvar("g_pickup_respawntimejitter_superweapon");
- g_pickup_respawntimejitter_ammo = cvar("g_pickup_respawntimejitter_ammo");
- g_pickup_respawntimejitter_short = cvar("g_pickup_respawntimejitter_short");
- g_pickup_respawntimejitter_medium = cvar("g_pickup_respawntimejitter_medium");
- g_pickup_respawntimejitter_long = cvar("g_pickup_respawntimejitter_long");
- g_pickup_respawntimejitter_powerup = cvar("g_pickup_respawntimejitter_powerup");
-
- g_weaponspeedfactor = cvar("g_weaponspeedfactor");
- g_weaponratefactor = cvar("g_weaponratefactor");
- g_weapondamagefactor = cvar("g_weapondamagefactor");
- g_weaponforcefactor = cvar("g_weaponforcefactor");
- g_weaponspreadfactor = cvar("g_weaponspreadfactor");
-
- g_pickup_shells = cvar("g_pickup_shells");
- g_pickup_shells_max = cvar("g_pickup_shells_max");
- g_pickup_nails = cvar("g_pickup_nails");
- g_pickup_nails_max = cvar("g_pickup_nails_max");
- g_pickup_rockets = cvar("g_pickup_rockets");
- g_pickup_rockets_max = cvar("g_pickup_rockets_max");
- g_pickup_cells = cvar("g_pickup_cells");
- g_pickup_cells_max = cvar("g_pickup_cells_max");
- g_pickup_plasma = cvar("g_pickup_plasma");
- g_pickup_plasma_max = cvar("g_pickup_plasma_max");
- g_pickup_fuel = cvar("g_pickup_fuel");
- g_pickup_fuel_jetpack = cvar("g_pickup_fuel_jetpack");
- g_pickup_fuel_max = cvar("g_pickup_fuel_max");
- g_pickup_armorsmall = cvar("g_pickup_armorsmall");
- g_pickup_armorsmall_max = cvar("g_pickup_armorsmall_max");
- g_pickup_armorsmall_anyway = cvar("g_pickup_armorsmall_anyway");
- g_pickup_armormedium = cvar("g_pickup_armormedium");
- g_pickup_armormedium_max = cvar("g_pickup_armormedium_max");
- g_pickup_armormedium_anyway = cvar("g_pickup_armormedium_anyway");
- g_pickup_armorbig = cvar("g_pickup_armorbig");
- g_pickup_armorbig_max = cvar("g_pickup_armorbig_max");
- g_pickup_armorbig_anyway = cvar("g_pickup_armorbig_anyway");
- g_pickup_armorlarge = cvar("g_pickup_armorlarge");
- g_pickup_armorlarge_max = cvar("g_pickup_armorlarge_max");
- g_pickup_armorlarge_anyway = cvar("g_pickup_armorlarge_anyway");
- g_pickup_healthsmall = cvar("g_pickup_healthsmall");
- g_pickup_healthsmall_max = cvar("g_pickup_healthsmall_max");
- g_pickup_healthsmall_anyway = cvar("g_pickup_healthsmall_anyway");
- g_pickup_healthmedium = cvar("g_pickup_healthmedium");
- g_pickup_healthmedium_max = cvar("g_pickup_healthmedium_max");
- g_pickup_healthmedium_anyway = cvar("g_pickup_healthmedium_anyway");
- g_pickup_healthlarge = cvar("g_pickup_healthlarge");
- g_pickup_healthlarge_max = cvar("g_pickup_healthlarge_max");
- g_pickup_healthlarge_anyway = cvar("g_pickup_healthlarge_anyway");
- g_pickup_healthmega = cvar("g_pickup_healthmega");
- g_pickup_healthmega_max = cvar("g_pickup_healthmega_max");
- g_pickup_healthmega_anyway = cvar("g_pickup_healthmega_anyway");
-
- g_pickup_ammo_anyway = cvar("g_pickup_ammo_anyway");
- g_pickup_weapons_anyway = cvar("g_pickup_weapons_anyway");
-
- g_weapon_stay = cvar(strcat("g_", GetGametype(), "_weapon_stay"));
- if(!g_weapon_stay)
- g_weapon_stay = cvar("g_weapon_stay");
-
- if (!warmup_stage)
- game_starttime = time + cvar("g_start_delay");
-
- readplayerstartcvars();
-}
-
-//#NO AUTOCVARS END
-
-// Sound functions
-string precache_sound (string s) = #19;
-float precache_sound_index (string s) = #19;
-
-#define SND_VOLUME 1
-#define SND_ATTENUATION 2
-#define SND_LARGEENTITY 8
-#define SND_LARGESOUND 16