#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_REALPLAYER(v) FOR_EACH_REALCLIENT(v) if(IS_PLAYER(v))
+#define FOR_EACH_MONSTER(v) for(v = world; (v = findflags(v, flags, FL_MONSTER)) != world; )
+
#define CENTER_OR_VIEWOFS(ent) (ent.origin + (IS_PLAYER(ent) ? ent.view_ofs : ((ent.mins + ent.maxs) * 0.5)))
// copies a string to a tempstring (so one can strunzone it)
s = cvar_string("g_weaponarena");
if (s == "0" || s == "")
{
- if(g_lms || g_ca)
+ if(g_ca)
s = "most";
}
g_pinata = 0; // incompatible
g_weapon_stay = 0; // incompatible
WEPSET_COPY_AA(start_weapons, g_weaponarena_weapons);
- if(!(g_lms || g_ca))
+ if(!g_ca)
start_items |= IT_UNLIMITED_AMMO;
}
else if (g_minstagib)
}
else
{
- if(g_lms || g_ca)
+ if(g_ca)
{
start_ammo_shells = cvar("g_lms_start_ammo_shells");
start_ammo_nails = cvar("g_lms_start_ammo_nails");
}
}
- if (g_lms || g_ca)
+ if (g_ca)
{
start_health = cvar("g_lms_start_health");
start_armorvalue = cvar("g_lms_start_armor");
float g_bugrigs_speed_pow;
float g_bugrigs_steer;
-float g_touchexplode;
-float g_touchexplode_radius;
-float g_touchexplode_damage;
-float g_touchexplode_edgedamage;
-float g_touchexplode_force;
-
float sv_autotaunt;
float sv_taunt;
void readlevelcvars(void)
{
g_minstagib = cvar("g_minstagib");
+
+ monster_skill = cvar("g_monsters_skill");
// load ALL the mutators
if(cvar("g_dodging"))
MUTATOR_ADD(mutator_spawn_near_teammate);
if(cvar("g_physical_items"))
MUTATOR_ADD(mutator_physical_items);
+ if(cvar("g_touchexplode"))
+ MUTATOR_ADD(mutator_touchexplode);
if(!g_minstagib)
{
if(cvar("g_invincible_projectiles"))
g_bugrigs_speed_pow = cvar("g_bugrigs_speed_pow");
g_bugrigs_steer = cvar("g_bugrigs_steer");
- g_touchexplode = cvar("g_touchexplode");
- g_touchexplode_radius = cvar("g_touchexplode_radius");
- g_touchexplode_damage = cvar("g_touchexplode_damage");
- g_touchexplode_edgedamage = cvar("g_touchexplode_edgedamage");
- g_touchexplode_force = cvar("g_touchexplode_force");
-
sv_clones = cvar("sv_clones");
sv_foginterval = cvar("sv_foginterval");
g_cloaked = cvar("g_cloaked");
g_warmup_allguns = cvar("g_warmup_allguns");
g_warmup_allow_timeout = cvar("g_warmup_allow_timeout");
- if ((g_race && g_race_qualifying == 2) || g_runematch || g_arena || g_assault || cvar("g_campaign"))
+ if ((g_race && g_race_qualifying == 2) || g_arena || g_assault || cvar("g_campaign"))
inWarmupStage = 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(inWarmupStage && !g_ca)
- game_starttime = cvar("g_start_delay");
+ if not(inWarmupStage)
+ game_starttime = time + cvar("g_start_delay");
readplayerstartcvars();
}
{
// gamemode related things
precache_model ("models/misc/chatbubble.spr");
- if (g_runematch)
- {
- precache_model ("models/runematch/curse.mdl");
- precache_model ("models/runematch/rune.mdl");
- }
#ifdef TTURRETS_ENABLED
if (autocvar_g_turrets)
return uid2name(db_get(ServerProgsDB, strcat(map, rr, "crypto_idfp", ftos(pos))));
}
-string race_placeName(float pos) {
- if(floor((mod(pos, 100))/10) * 10 != 10) // examples: 12th, 111th, 213th will not execute this block
- {
- if(mod(pos, 10) == 1)
- return strcat(ftos(pos), "st");
- else if(mod(pos, 10) == 2)
- return strcat(ftos(pos), "nd");
- else if(mod(pos, 10) == 3)
- return strcat(ftos(pos), "rd");
- else
- return strcat(ftos(pos), "th");
- }
- else
- return strcat(ftos(pos), "th");
-}
-
float MoveToRandomMapLocation(entity e, float goodcontents, float badcontents, float badsurfaceflags, float attempts, float maxaboveground, float minviewdistance)
{
float m, i;
return TRUE;
return FALSE;
}
-
-void dedicated_print(string input) // print(), but only print if the server is not local
-{
- if not(server_is_local) { print(input); }
-}