#define FOR_EACH_REALCLIENT(v) FOR_EACH_CLIENT(v) if(IS_REAL_CLIENT(v))
#define FOR_EACH_PLAYER(v) FOR_EACH_CLIENT(v) if(IS_PLAYER(v))
-#define FOR_EACH_SPEC(v) FOR_EACH_CLIENT(v) if not(IS_PLAYER(v)) // Samual: shouldn't this be IS_SPEC(v)? and rather create a separate macro to include observers too
+#define FOR_EACH_SPEC(v) FOR_EACH_CLIENT(v) if (!IS_PLAYER(v)) // Samual: shouldn't this be IS_SPEC(v)? and rather create a separate macro to include observers too
#define FOR_EACH_REALPLAYER(v) FOR_EACH_REALCLIENT(v) if(IS_PLAYER(v))
#define CENTER_OR_VIEWOFS(ent) (ent.origin + (IS_PLAYER(ent) ? ent.view_ofs : ((ent.mins + ent.maxs) * 0.5)))
stuffcmd(self, strcat("cl_cmd sendcvar ", name, "\n"));
}
}
-float w_getbestweapon(entity e);
string W_FixWeaponOrder_ForceComplete_AndBuildImpulseList(string wo)
{
string o;
d = FALSE;
}
else if (g_cts)
- d = (i == WEP_SHOTGUN);
+ d = (i == WEP_SHOTGUN); // todo: how to handle shotgun in CTS mode? we're removing it.. so....
else if (g_nexball)
d = 0; // weapon is set a few lines later
else
d = (i == WEP_LASER || i == WEP_SHOTGUN);
-
+
if(g_grappling_hook) // if possible, redirect off-hand hook to on-hand hook
d |= (i == WEP_HOOK);
if(weaponinfo.spawnflags & WEP_FLAG_MUTATORBLOCKED) // never default mutator blocked guns
d = 0;
var float t = cvar(strcat(cvarprefix, weaponinfo.netname));
-
+
//print(strcat("want_weapon: ", weaponinfo.netname, " - d: ", ftos(d), ", t: ", ftos(t), ". \n"));
-
+
// bit order in t:
// 1: want or not
// 2: is default?
for (j = WEP_FIRST; j <= WEP_LAST; ++j)
{
e = get_weaponinfo(j);
- if not(e.spawnflags & WEP_FLAG_MUTATORBLOCKED)
+ if (!(e.spawnflags & WEP_FLAG_MUTATORBLOCKED))
g_weaponarena_weapons |= WepSet_FromWeapon(j);
}
}
for (j = WEP_FIRST; j <= WEP_LAST; ++j)
{
e = get_weaponinfo(j);
- if not(e.spawnflags & WEP_FLAG_MUTATORBLOCKED)
+ if (!(e.spawnflags & WEP_FLAG_MUTATORBLOCKED))
if (e.spawnflags & WEP_FLAG_NORMAL)
g_weaponarena_weapons |= WepSet_FromWeapon(j);
}
if(!cvar("g_use_ammunition"))
start_items |= IT_UNLIMITED_AMMO;
-
+
if(start_items & IT_UNLIMITED_WEAPON_AMMO)
{
start_ammo_rockets = 999;
{
e = get_weaponinfo(i);
if(precache_weapons & WepSet_FromWeapon(i))
- weapon_action(i, WR_PRECACHE);
+ WEP_ACTION(i, WR_INIT);
}
start_ammo_shells = max(0, start_ammo_shells);
// load mutators
#define CHECK_MUTATOR_ADD(mut_cvar,mut_name,dependence) \
{ if(cvar(mut_cvar) && dependence) { MUTATOR_ADD(mut_name); } }
-
+
CHECK_MUTATOR_ADD("g_dodging", mutator_dodging, 1);
CHECK_MUTATOR_ADD("g_spawn_near_teammate", mutator_spawn_near_teammate, 1);
CHECK_MUTATOR_ADD("g_physical_items", mutator_physical_items, 1);
CHECK_MUTATOR_ADD("g_nades", mutator_nades, 1);
CHECK_MUTATOR_ADD("g_sandbox", sandbox, 1);
CHECK_MUTATOR_ADD("g_campcheck", mutator_campcheck, 1);
-
+
#undef CHECK_MUTATOR_ADD
-
+
if(cvar("sv_allow_fullbright"))
serverflags |= SERVERFLAG_ALLOW_FULLBRIGHT;
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_minstagib = cvar("g_minstagib");
sv_clones = cvar("sv_clones");
g_warmup_allguns = cvar("g_warmup_allguns");
g_warmup_allow_timeout = cvar("g_warmup_allow_timeout");
- if ((g_race && g_race_qualifying == 2) || g_arena || g_assault || cvar("g_campaign"))
+ 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");
if(!g_weapon_stay)
g_weapon_stay = cvar("g_weapon_stay");
- if not(warmup_stage)
+ if (!warmup_stage)
game_starttime = time + cvar("g_start_delay");
readplayerstartcvars();
precache_sound ("weapons/hook_impact.wav"); // hook
}
- if(autocvar_sv_precacheweapons)
- {
- //precache weapon models/sounds
- float wep;
- wep = WEP_FIRST;
- while (wep <= WEP_LAST)
- {
- weapon_action(wep, WR_PRECACHE);
- wep = wep + 1;
- }
- }
-
precache_model("models/elaser.mdl");
precache_model("models/laser.mdl");
precache_model("models/ebomb.mdl");
void adaptor_think2use_hittype_splash() // for timed projectile detonation
{
- if not(self.flags & FL_ONGROUND) // if onground, we ARE touching something, but HITTYPE_SPLASH is to be networked if the damage causing projectile is not touching ANYTHING
+ if(!(self.flags & FL_ONGROUND)) // if onground, we ARE touching something, but HITTYPE_SPLASH is to be networked if the damage causing projectile is not touching ANYTHING
self.projectiledeathtype |= HITTYPE_SPLASH;
adaptor_think2use();
}
db_put(ServerProgsDB, strcat("uid2name", myuid), "");
}
}
-
+
if(s == "")
s = "^1Unregistered Player";
return s;
float randombit(float bits)
{
- if not(bits & (bits-1)) // this ONLY holds for powers of two!
+ if(!(bits & (bits-1))) // this ONLY holds for powers of two!
return bits;
float n, f, b, r;
#else
string cvar_string_normal(string n)
{
- if not(cvar_type(n) & 1)
+ if (!(cvar_type(n) & 1))
backtrace(strcat("Attempt to access undefined cvar: ", n));
return builtin_cvar_string(n);
}