REGISTER_NET_TEMP(TE_CSQC_SHOCKWAVEPARTICLE)
#ifdef SVQC
-// enable when shockwave replaces shotgun
-#if 0
-METHOD(Shockwave, m_spawnfunc_hookreplace, Weapon(Shockwave this, entity e))
-{
- //if(autocvar_sv_q3acompat_machineshockwaveswap) // WEAPONTODO
- if (autocvar_sv_q3acompat_machineshotgunswap && !Item_IsLoot(e))
- {
- return WEP_MACHINEGUN;
- }
- return this;
-}
-#endif
const float MAX_SHOCKWAVE_HITS = 10;
//#define DEBUG_SHOCKWAVE
//***********************
// NOTE: for best experience, you need to swap MGs with SGs in the map or it won't have a MG
+bool q3compat_arena(string mapname)
+{
+ if(fexists(strcat("scripts/", mapname, ".arena"))) return true;
+
+ return false;
+}
// SG -> MG || SG
-SPAWNFUNC_ITEM_COND(ammo_shells, autocvar_sv_q3acompat_machineshotgunswap, ITEM_Bullets, ITEM_Shells)
-SPAWNFUNC_WEAPON_COND(weapon_shotgun, autocvar_sv_q3acompat_machineshotgunswap, WEP_MACHINEGUN, WEP_SHOTGUN)
+SPAWNFUNC_ITEM_COND(ammo_shells, q3compat_arena(mapname), ITEM_Bullets, ITEM_Shells)
+SPAWNFUNC_WEAPON_COND(weapon_shotgun, q3compat_arena(mapname), WEP_MACHINEGUN, WEP_SHOTGUN)
// MG -> SG || MG
-SPAWNFUNC_ITEM_COND(ammo_bullets, autocvar_sv_q3acompat_machineshotgunswap, ITEM_Shells, ITEM_Bullets)
+SPAWNFUNC_ITEM_COND(ammo_bullets, q3compat_arena(mapname), ITEM_Shells, ITEM_Bullets)
// GL -> Mortar
SPAWNFUNC_ITEM(ammo_grenades, ITEM_Rockets)
SPAWNFUNC_ITEM(ammo_belt, ITEM_Cells)
// Team Arena Nailgun -> Crylink || Quake Nailgun -> Electro
-SPAWNFUNC_WEAPON_COND(weapon_nailgun, autocvar_sv_q3acompat_machineshotgunswap, WEP_CRYLINK, WEP_ELECTRO)
+SPAWNFUNC_WEAPON_COND(weapon_nailgun, q3compat_arena(mapname), WEP_CRYLINK, WEP_ELECTRO)
SPAWNFUNC_ITEM(ammo_nails, ITEM_Cells)
// LG -> Electro
// DeFRaG mappers use "notcpm" or "notvq3" to disable an entity in CPM or VQ3 physics
// Xonotic is usually played with a CPM-based physics so we default to CPM mode
- if(cvar_string("g_mod_physics") == "Q3") {
+ if(cvar_string("g_mod_physics") == "Q3")
+ {
if(this.notvq3) return true;
}
else if(this.notcpm) return true;
MapInfo_Enumerate();
MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 1);
- if(fexists(strcat("scripts/", mapname, ".arena")))
- cvar_settemp("sv_q3acompat_machineshotgunswap", "1");
-
if(fexists(strcat("scripts/", mapname, ".defi")))
cvar_settemp("sv_q3defragcompat", "1");
sv_gameplayfix_gravityunaffectedbyticrate 1
sv_gameplayfix_nogravityonground 1
-set sv_q3acompat_machineshotgunswap 0 "shorthand for swapping machinegun and shotgun (for Q3A map compatibility in mapinfo files)"
set sv_q3defragcompat 0 "toggle for some compatibility hacks (for Q3DF map compatibility)"
set g_movement_highspeed 1 "multiplier scale for movement speed (applies to sv_maxspeed and sv_maxairspeed, also applies to air acceleration when g_movement_highspeed_q3_compat is set to 0)"