// {{{ campingrifle
set g_balance_campingrifle_magazinecapacity 8
set g_balance_campingrifle_reloadtime 2 // matches reload anim
-set g_balance_campingrifle_auto_reload_after_changing_weapons 0
+set g_balance_campingrifle_auto_reload_on_switch 0
set g_balance_campingrifle_bursttime 0
set g_balance_campingrifle_primary_tracer 0
set g_balance_campingrifle_primary_damage 60
// {{{ campingrifle
set g_balance_campingrifle_magazinecapacity 8
set g_balance_campingrifle_reloadtime 2 // matches reload anim
-set g_balance_campingrifle_auto_reload_after_changing_weapons 0
+set g_balance_campingrifle_auto_reload_on_switch 0
set g_balance_campingrifle_bursttime 0.85 // 0.35 - 0.1 + 0.35 - 0.1 + 0.35 = three secondaries
set g_balance_campingrifle_primary_tracer 0
set g_balance_campingrifle_primary_damage 75
// {{{ campingrifle
set g_balance_campingrifle_magazinecapacity 8 // make it pretty much useless in close combat
set g_balance_campingrifle_reloadtime 2 // matches reload anim
-set g_balance_campingrifle_auto_reload_after_changing_weapons 0
+set g_balance_campingrifle_auto_reload_on_switch 0
set g_balance_campingrifle_bursttime 0
set g_balance_campingrifle_primary_tracer 1
set g_balance_campingrifle_primary_damage 65
// {{{ campingrifle
set g_balance_campingrifle_magazinecapacity 8 // make it pretty much useless in close combat
set g_balance_campingrifle_reloadtime 2 // matches reload anim
-set g_balance_campingrifle_auto_reload_after_changing_weapons 0
+set g_balance_campingrifle_auto_reload_on_switch 0
set g_balance_campingrifle_bursttime 0
set g_balance_campingrifle_primary_tracer 1
set g_balance_campingrifle_primary_damage 70
// {{{ campingrifle
set g_balance_campingrifle_magazinecapacity 8 // make it pretty much useless in close combat
set g_balance_campingrifle_reloadtime 2 // matches reload anim
-set g_balance_campingrifle_auto_reload_after_changing_weapons 0
+set g_balance_campingrifle_auto_reload_on_switch 0
set g_balance_campingrifle_bursttime 0
set g_balance_campingrifle_primary_tracer 1
set g_balance_campingrifle_primary_damage 40
{
float baseskill;
string title;
- if(cvar("sv_cheats"))
+ if(autocvar_sv_cheats)
{
CampaignBailout("JOLLY CHEATS AHAHAHAHAHAHAH))");
return;
// copy sv_gravity cvar, as the engine needs it too (sorry, this will mess
// with the menu a little still...)
- cvar_set_normal("sv_gravity", cvar_string("sv_gravity"));
+ cvar_set_normal("sv_gravity", ftos(cvar("sv_gravity")));
if(Campaign_Invalid())
return;
+float autocvar_sv_cheats; // must... declare... global
+
float cheatcount_total;
.float cheatcount;
void CheatInit();
if(!teams_matter)
if(strlen(cvar_string("sv_defaultplayercolors")))
- if(self.clientcolors != cvar("sv_defaultplayercolors"))
- setcolor(self, cvar("sv_defaultplayercolors"));
+ if(self.clientcolors != stof(cvar_string("sv_defaultplayercolors")))
+ setcolor(self, stof(cvar_string("sv_defaultplayercolors")));
}
void PlayerTouchExplode(entity p1, entity p2)
if(RadiusDamage_running)
{
- string save;
- print("RadiusDamage called recursively!\n");
- print("Expect stuff to go HORRIBLY wrong.\n");
- print("Causing a stack trace...\n");
- save = cvar_string("prvm_backtraceforwarnings");
- cvar_set("prvm_backtraceforwarnings", "1");
- fclose(-1); // calls VM_Warning
- cvar_set("prvm_backtraceforwarnings", save);
+ backtrace("RadiusDamage called recursively! Expect stuff to go HORRIBLY wrong.");
return 0;
}
TemporaryDB = db_create();
- /*
- TODO sound pack system
- // initialize sound pack system
- soundpack = cvar_string("g_soundpack");
- if(soundpack != "")
- soundpack = strcat(soundpack, "/");
- soundpack = strzone(soundpack);
- */
-
// 0 normal
lightstyle(0, "m");
GameLogInit(); // prepare everything
if(cvar("sv_eventlog"))
{
- s = strcat(cvar_string("sv_eventlog_files_counter"), ".");
+ s = strcat(ftos(cvar("sv_eventlog_files_counter")), ".");
s = strcat(s, ftos(random()));
matchid = strzone(s);
return v;
};
+//#NO AUTOCVARS START
+
float g_pickup_shells;
float g_pickup_shells_max;
float g_pickup_nails;
readplayerstartcvars();
}
-/*
-// TODO sound pack system
-string soundpack;
-
-string precache_sound_builtin (string s) = #19;
-void(entity e, float chan, string samp, float vol, float atten) sound_builtin = #8;
-string precache_sound(string s)
-{
- return precache_sound_builtin(strcat(soundpack, s));
-}
-void play2(entity e, string filename)
-{
- stuffcmd(e, strcat("play2 ", soundpack, filename, "\n"));
-}
-void sound(entity e, float chan, string samp, float vol, float atten)
-{
- sound_builtin(e, chan, strcat(soundpack, samp), vol, atten);
-}
-*/
+//#NO AUTOCVARS END
// Sound functions
string precache_sound (string s) = #19;
void() monster_checkbossflag =
{
+//#NO AUTOCVARS START
#if 0
local float healthboost;
local float r;
while (self.colormod_x > 0.6 && self.colormod_y > 0.6 && self.colormod_z > 0.6);
}
#endif
+//#NO AUTOCVARS END
};
float SKILL4_MINALPHA = 0.4;
float monsterwander;
+//#NO AUTOCVARS START
/*
monsterwander = cvar("monsterwander");
// monsterwander is always on in skill 5
if (skill >= 5)
monsterwander = TRUE;
*/
+//#NO AUTOCVARS END
.float candrown;
void(string m) setdm =
{
dmmessage = m;
- if (cvar_string("deathmatch") != m)
+ if (cvar("deathmatch") != stof(m))
cvar_set("deathmatch", m);
}
void(string m) setteamplay =
{
dmmessage = m;
- if (cvar_string("teamplay") != m)
+ if (cvar("teamplay") != stof(m))
cvar_set("teamplay", m);
}
// #define KH_PLAYER_USE_ATTACHMENT
// #define KH_PLAYER_USE_CARRIEDMODEL
-// #define KH_KEY_ATTACHMENT_DEBUG
#ifdef KH_PLAYER_USE_ATTACHMENT
vector KH_PLAYER_ATTACHMENT_DIST_ROTATED = '0 -4 0';
if(intermission_running)
return;
-#ifdef KH_KEY_ATTACHMENT_DEBUG
- if(self.kh_prev == self.owner)
- {
- if(cvar_string("_angles") != "")
- {
- self.angles = stov(cvar_string("_angles"));
- setorigin(self, stov(cvar_string("_origin")));
- }
- }
-#endif
-
if(self.owner)
{
#ifndef KH_PLAYER_USE_ATTACHMENT
prev = cvar("gamecfg");
for(i = 0; i < 2; ++i)
{
+//#NO AUTOCVARS START
found += (g_dm = (!found && (prev != GAME_DEATHMATCH) && cvar("g_dm")));
found += (g_tdm = (!found && (prev != GAME_TEAM_DEATHMATCH) && cvar("g_tdm")));
found += (g_domination = (!found && (prev != GAME_DOMINATION) && cvar("g_domination")));
found += (g_cts = (!found && (prev != GAME_CTS) && cvar("g_cts")));
found += (g_freezetag = (!found && (prev != GAME_FREEZETAG) && cvar("g_freezetag")));
found += (g_keepaway = (!found && (prev != GAME_KEEPAWAY) && cvar("g_keepaway")));
+//#NO AUTOCVARS END
if(found)
break;
race_timelimit = cvar("timelimit");
cvar_set("fraglimit", "0");
cvar_set("leadlimit", "0");
- cvar_set("timelimit", cvar_string("g_race_qualifying_timelimit"));
+ cvar_set("timelimit", ftos(cvar("g_race_qualifying_timelimit")));
}
else
g_race_qualifying = 0;
GetKickVoteVictim_newcommand = strcat(argv(0), " # ", ftos(num_for_edict(e)));
if(argv(0) == "kickban")
{
- GetKickVoteVictim_newcommand = strcat(GetKickVoteVictim_newcommand, " ", cvar_string("g_ban_default_bantime"), " ", cvar_string("g_ban_default_masksize"), " ", reason);
+ GetKickVoteVictim_newcommand = strcat(GetKickVoteVictim_newcommand, " ", ftos(cvar("g_ban_default_bantime")), " ", ftos(cvar("g_ban_default_masksize")), " ", reason);
}
else if(argv(0) == "kick")
{
print_to(e, "^7\"^2yes^7\", \"^2no^7\", \"^2abstain^7\" and \"^2dontcare^7\" to make your vote.");
print_to(e, "^7If enough of the players vote yes the vote is accepted.");
print_to(e, "^7If enough of the players vote no the vote is rejected.");
- print_to(e, strcat("^7If neither the vote will timeout after ", cvar_string("sv_vote_timeout"), "^7 seconds."));
+ print_to(e, strcat("^7If neither the vote will timeout after ", ftos(cvar("sv_vote_timeout")), "^7 seconds."));
print_to(e, "^7You can call a vote for or execute these commands:");
print_to(e, strcat("^3", cvar_string("sv_vote_commands"), "^7 and maybe further ^3arguments^7"));
}
weapon_setup(WEP_CAMPINGRIFLE);
full = W_CampingRifle_CheckMaxBullets(TRUE);
- if(cvar("g_balance_campingrifle_auto_reload_after_changing_weapons"))
+ if(cvar("g_balance_campingrifle_auto_reload_on_switch"))
if(!full)
self.campingrifle_bulletcounter = -1;
}
desiredorigin = WarpZone_RefSys_TransformOrigin(self.owner, self, self.owner.origin + self.owner.view_ofs);
olddir = normalize(self.velocity);
-#if 0
- // disabled this code because it doesn't do what I want it to do :P
- cosminang = cos(cvar("g_balance_rocketlauncher_guidefadeangle") * DEG2RAD);
- cosmaxang = cos(cvar("g_balance_rocketlauncher_guidemaxangle") * DEG2RAD);
- cosang = desireddir * normalize(self.origin - desiredorigin);
- if(cosminang == cosmaxang)
- f *= (cosang >= cosminang);
- else
- f *= bound(0, (cosang - cosmaxang) / (cosminang - cosmaxang), 1);
-#endif
-
// now it gets tricky... we want to move like some curve to approximate the target direction
// but we are limiting the rate at which we can turn!
goal = desiredorigin + ((self.origin - desiredorigin) * desireddir + cvar("g_balance_rocketlauncher_guidegoal")) * desireddir;