#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)))
WepSet warmup_start_weapons;
WepSet warmup_start_weapons_default;
WepSet warmup_start_weapons_defaultmask;
+#define WARMUP_START_WEAPONS ((g_warmup_allguns == 1) ? (warmup_start_weapons & (weaponsInMap | start_weapons)) : warmup_start_weapons)
float warmup_start_ammo_shells;
float warmup_start_ammo_nails;
float warmup_start_ammo_rockets;
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);
}
for (i = WEP_FIRST; i <= WEP_LAST; ++i)
{
e = get_weaponinfo(i);
- float w = want_weapon("g_start_weapon_", e, cvar("g_warmup_allguns"));
+ float w = want_weapon("g_start_weapon_", e, g_warmup_allguns);
if(w & 1)
warmup_start_weapons |= WepSet_FromWeapon(i);
if(w & 2)
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((start_weapons | warmup_start_weapons) & WepSet_FromWeapon(i))
+ if(precache_weapons & WepSet_FromWeapon(i))
weapon_action(i, WR_PRECACHE);
}
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();
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();
}
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);
}