Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9b08664f6a |
@@ -1,9 +0,0 @@
|
||||
# MW2 Fun Gun Mod
|
||||
|
||||
> **Note:** This is a modification of Santahunters original Mod, credits go to Santa for the original Mod!
|
||||
|
||||
## Server Setup
|
||||
|
||||
`set sv_maprotation ""`
|
||||
|
||||
Map rotation must be empty for voting to work properly.
|
||||
@@ -6,24 +6,24 @@
|
||||
Nevertheless it uses some codesnippets from the old gungame mod.
|
||||
|
||||
|
||||
----- Version 1.5 - God of Hellfire Update -------
|
||||
- Added Botwarfare to the Mod
|
||||
- Added Fungame mode
|
||||
- 150+ unique weapons progression list
|
||||
- Classic Progression style from Pistol to Javelin
|
||||
- Possibility to set it to 2 kills per gun via configuration
|
||||
- Performance Improvements
|
||||
- Removed all Server Console Logs
|
||||
- Optimized mod code
|
||||
- Removed several unused code snippets
|
||||
- Bugfixes
|
||||
- Fixed "Configstring Overflow (511)" crash on asset-heavy maps (mp_nightshift)
|
||||
- Fixed Classic mode weapon list population for 300+ weapons
|
||||
- Fixed weapon upgrades not working on first weapon
|
||||
- Fixed several other minor bugs
|
||||
- Removed 2.5 second delay on switching weapons on respawn
|
||||
|
||||
----- Version 1.5 - Fungame Update -------
|
||||
|
||||
- Added "Fungame" mode:
|
||||
-> 150 unique weapons progression list
|
||||
-> Includes new weapons like Peacekeeper, Ripper, and more
|
||||
- Weapon Logic Improvements:
|
||||
-> Reduced Riot Shield requirement to 1 kill (Fungame only)
|
||||
-> Fixed Riot Shield kills not counting as progression
|
||||
-> Fixed Javelin win condition (requires 2 kills to finish)
|
||||
-> Corrected internal weapon names (ACR to masada, Thumper to m79)
|
||||
- Stability & Optimization:
|
||||
-> Fixed "Configstring Overflow (511)" crash on asset-heavy maps (mp_nightshift)
|
||||
-> Removed console debug flooding causing server timeouts
|
||||
-> Unified game mode configuration in main.gsc
|
||||
-> Fixed Classic mode weapon list population for 300+ weapons
|
||||
- Server & Bot Management:
|
||||
-> Fixed bot persistence across map rotations (bots_manage_fill)
|
||||
-> Improved server internet visibility (dedicated 2)
|
||||
|
||||
----- Version 1.4 -------
|
||||
|
||||
|
||||
@@ -55,7 +55,6 @@ onStartGameType()
|
||||
setObjectiveHintText( "allies", "Be the first who cycled through all guns to win! \n \n Mod made by ^:Santahunter^7!" );
|
||||
setObjectiveHintText( "axis", "Be the first who cycled through all guns to win! \n \n Mod made by ^:Santahunter^7!" );
|
||||
|
||||
level.killcam = false;
|
||||
level.spawnMins = ( 0, 0, 0 );
|
||||
level.spawnMaxs = ( 0, 0, 0 );
|
||||
maps\mp\gametypes\_spawnlogic::addSpawnPoints( "allies", "mp_dm_spawn" );
|
||||
|
||||
@@ -71,7 +71,6 @@ onStartGameType()
|
||||
setObjectiveHintText( "allies", "Each several kills of your team, your weapon ranks up! \n \n Mod made by ^:Santahunter^7!" );
|
||||
setObjectiveHintText( "axis", "Each several kills of your team, your weapon ranks up! \n \n Mod made by ^:Santahunter^7!" );
|
||||
|
||||
level.killcam = false;
|
||||
level.spawnMins = ( 0, 0, 0 );
|
||||
level.spawnMaxs = ( 0, 0, 0 );
|
||||
maps\mp\gametypes\_spawnlogic::placeSpawnPoints( "mp_tdm_spawn_allies_start" );
|
||||
|
||||
@@ -120,7 +120,6 @@ loadSettings()
|
||||
setDvar("scr_" + (getDvar("g_gametype")) + "_timelimit", 0);
|
||||
setDvar("scr_" + (getDvar("g_gametype")) + "_scorelimit", 0);
|
||||
setDvar("ui_allow_teamchange", 0);
|
||||
setDvar("scr_game_allowkillcam", 0);
|
||||
setDvar("testClients_watchKillcam", 0);
|
||||
setDvar("scr_game_hardpoints", 0);
|
||||
setDvar("scr_game_graceperiod", 0);
|
||||
@@ -256,7 +255,8 @@ firstSpawn()
|
||||
self setClientDvar("bg_shock_lookControl_mousesensitivityscale", 1);
|
||||
self setClientDvar("bg_shock_movement", 0);
|
||||
self setClientDvar("bg_shock_lookControl", 0);
|
||||
self setClientDvar("scr_game_allowkillcam", 0);
|
||||
self setClientDvar("ui_drawradar", 0);
|
||||
self setClientDvar("cg_drawTeamScores", 0);
|
||||
self.hud_damagefeedback.color = (1,0,0);
|
||||
self.line = self createRectangle("CENTER", "LEFT", 0,-90,300,5,(1,1,0),"line_horizontal",1);
|
||||
self thread onKilling();
|
||||
@@ -273,11 +273,6 @@ firstSpawn()
|
||||
wait .1;
|
||||
self notify("menuresponse", "changeclass", "class1");
|
||||
wait .1;
|
||||
// Re-apply perks here — the engine's class-load triggered by changeclass above
|
||||
// can wipe perk state before loadSetup() gets a chance to set them on first spawn.
|
||||
self maps\mp\perks\_perks::givePerk("specialty_fastreload"); // Sleight of Hand
|
||||
self maps\mp\perks\_perks::givePerk("specialty_falldamage");
|
||||
self maps\mp\perks\_perks::givePerk("specialty_quickdraw");
|
||||
self.firstSpawn = false;
|
||||
self thread tryCreateMarkerIcons();
|
||||
}
|
||||
@@ -330,16 +325,19 @@ loadSetup()
|
||||
self maps\mp\perks\_perks::givePerk("specialty_fastreload"); // due to icys request :)
|
||||
self maps\mp\perks\_perks::givePerk("specialty_falldamage"); // due to icys request :)
|
||||
self maps\mp\perks\_perks::givePerk("specialty_quickdraw");
|
||||
// Static HUD dvars set once per spawn.
|
||||
// g_hardcore=1 handles minimap/radar/teamscore suppression at engine level.
|
||||
// We only need to override what we want TO show (ammo, custom health HUD).
|
||||
// Static HUD dvars set once per spawn — moved from watchHUD's 1-second polling loop.
|
||||
// These values never change mid-game so there is no need to re-apply them every second.
|
||||
self setClientDvar("cg_drawRadar", 1);
|
||||
self setClientDvar("cg_drawStance", 0);
|
||||
self setClientDvar("cg_drawTeamScores", 0);
|
||||
self setClientDvar("cg_drawKillfeed", 0);
|
||||
self setClientDvar("cg_drawBreathHint", 0);
|
||||
self setClientDvar("cg_drawMantleHint", 0);
|
||||
self setClientDvar("cg_drawTurretCrosshair", 0);
|
||||
self setClientDvar("cg_cursorHints", 0);
|
||||
self setClientDvar("ui_hud_hardcore", 0); // show custom HUD elements despite g_hardcore
|
||||
// Keep g_hardcore=1 for server-side gameplay rules but show the normal client HUD
|
||||
// so our custom health/weapon overlays render correctly without fighting hardcore suppression.
|
||||
self setClientDvar("ui_hud_hardcore", 0);
|
||||
self thread takeInvalidWeapon();
|
||||
if(level.state == "prematch")
|
||||
{
|
||||
@@ -714,6 +712,7 @@ tryNuke()
|
||||
level notify("nuke");
|
||||
foreach(player in level.players)
|
||||
{
|
||||
player setClientDvar("ui_hud_hardcore", 0);
|
||||
player hide();
|
||||
}
|
||||
|
||||
@@ -845,26 +844,30 @@ takeInvalidWeapon()
|
||||
self endon("disconnect");
|
||||
self endon("death");
|
||||
level endon("nuke");
|
||||
// Skip the first 5 frames so the initial updateWeapon() from loadSetup() has
|
||||
// time to complete its switchtoweaponimmediate before we start polling.
|
||||
// This prevents a false-positive correction that was causing the 2.5s delay.
|
||||
for(i = 0; i < 5; i++)
|
||||
waitFrame();
|
||||
counter = 0;
|
||||
waitFrame(); // was: wait 3 — removed so mid-game joiners get their weapon immediately
|
||||
while(1)
|
||||
{
|
||||
wait 0.1; // 10/s is ample for a safety-net poller
|
||||
wait 0.1; // was waitFrame() (~60/s) — 10/s is ample for a safety-net poller
|
||||
if(!isAlive(self))
|
||||
continue;
|
||||
if(self isMantling())
|
||||
continue;
|
||||
weapon = self getCurrentWeapon();
|
||||
if(!self hasWeapon(level.gungameList[self.current]))
|
||||
{
|
||||
counter++;
|
||||
if(counter == 2)
|
||||
{
|
||||
counter = 0;
|
||||
level.gungameList[self.current] = mod\weapons::setWeapon("peacekeeper_mp");
|
||||
}
|
||||
}
|
||||
if(weapon != level.gungameList[self.current])
|
||||
{
|
||||
self takeAllWeapons();
|
||||
self thread updateWeapon();
|
||||
// Short cooldown — just enough for switchtoweaponimmediate to settle.
|
||||
// The old 2.5s wait was causing the visible mid-game-join delay.
|
||||
wait 0.5;
|
||||
wait 2.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1048,7 +1051,6 @@ createRectangle(align, relative, x, y, width, height, color, shader, sort)
|
||||
hud setPoint(align,relative,x,y);
|
||||
return hud;
|
||||
}
|
||||
|
||||
upgradeTeamUI(team)
|
||||
{
|
||||
fontElem = newTeamHudElem( team );
|
||||
@@ -1258,7 +1260,9 @@ watchHUD()
|
||||
self endon("death"); // prevent thread accumulation across respawns
|
||||
while(true)
|
||||
{
|
||||
// Re-apply ammo visibility (engine may reset it on class/weapon events).
|
||||
// Only re-apply dvars the engine may reset mid-game (radar via UAV, ammo via class events).
|
||||
// ui_hud_hardcore is set to 0 once per spawn in loadSetup() and does not need refreshing.
|
||||
self setClientDvar("ui_drawradar", 1);
|
||||
self setClientDvar("cg_drawAmmo", 1);
|
||||
wait 5;
|
||||
}
|
||||
|
||||
@@ -60,39 +60,39 @@ loadVote()
|
||||
maps()
|
||||
{
|
||||
level.maps = [];
|
||||
// MW2 Base Maps
|
||||
|
||||
level.maps[level.maps.size] = "mp_rust";
|
||||
level.maps[level.maps.size] = "mp_afghan";
|
||||
level.maps[level.maps.size] = "mp_terminal";
|
||||
level.maps[level.maps.size] = "mp_highrise";
|
||||
//level.maps[level.maps.size] = "mp_derail"; //fuck derail
|
||||
level.maps[level.maps.size] = "mp_derail";
|
||||
level.maps[level.maps.size] = "mp_rundown";
|
||||
level.maps[level.maps.size] = "mp_brecourt"; //Wasteland
|
||||
level.maps[level.maps.size] = "mp_boneyard"; //Scrapyard
|
||||
level.maps[level.maps.size] = "mp_brecourt";
|
||||
level.maps[level.maps.size] = "mp_boneyard";
|
||||
level.maps[level.maps.size] = "mp_quarry";
|
||||
level.maps[level.maps.size] = "mp_nightshift"; //Skidrow
|
||||
level.maps[level.maps.size] = "mp_nightshift";
|
||||
level.maps[level.maps.size] = "mp_estate";
|
||||
level.maps[level.maps.size] = "mp_invasion";
|
||||
level.maps[level.maps.size] = "mp_checkpoint"; //Karachi
|
||||
level.maps[level.maps.size] = "mp_checkpoint";
|
||||
level.maps[level.maps.size] = "mp_subbase";
|
||||
level.maps[level.maps.size] = "mp_favela";
|
||||
level.maps[level.maps.size] = "mp_underpass";
|
||||
//level.maps[level.maps.size] = "iw4_credits"; // no
|
||||
level.maps[level.maps.size] = "iw4_credits";
|
||||
|
||||
// MW2 DLC Maps
|
||||
level.maps[level.maps.size] = "mp_complex"; //Bailout Stimulus DLC
|
||||
level.maps[level.maps.size] = "mp_crash"; //Crash
|
||||
level.maps[level.maps.size] = "mp_overgrown"; //Overgrown
|
||||
level.maps[level.maps.size] = "mp_compact"; //Salvage Stimulus DLC
|
||||
level.maps[level.maps.size] = "mp_storm"; //Storm
|
||||
|
||||
level.maps[level.maps.size] = "mp_abandon"; //Carnival
|
||||
//level.maps[level.maps.size] = "mp_fuel2"; // hell no
|
||||
level.maps[level.maps.size] = "mp_strike"; //Strike
|
||||
level.maps[level.maps.size] = "mp_trailerpark"; //Trailerpark
|
||||
level.maps[level.maps.size] = "mp_vacant"; //Vacant
|
||||
level.maps[level.maps.size] = "mp_complex";
|
||||
level.maps[level.maps.size] = "mp_crash";
|
||||
level.maps[level.maps.size] = "mp_overgrown";
|
||||
level.maps[level.maps.size] = "mp_compact";
|
||||
level.maps[level.maps.size] = "mp_storm";
|
||||
|
||||
level.maps[level.maps.size] = "mp_nuked"; //Nuketown
|
||||
level.maps[level.maps.size] = "mp_abandon";
|
||||
level.maps[level.maps.size] = "mp_fuel2";
|
||||
level.maps[level.maps.size] = "mp_strike";
|
||||
level.maps[level.maps.size] = "mp_trailerpark";
|
||||
level.maps[level.maps.size] = "mp_vacant";
|
||||
|
||||
level.maps[level.maps.size] = "mp_nuked";
|
||||
|
||||
level.maps[level.maps.size] = "mp_cross_fire";
|
||||
level.maps[level.maps.size] = "mp_bloc";
|
||||
@@ -126,7 +126,7 @@ maps()
|
||||
//level.maps[level.maps.size] = "so_forest_contingency";
|
||||
//level.maps[level.maps.size] = "dcburning";
|
||||
//level.maps[level.maps.size] = "dcemp";
|
||||
//level.maps[level.maps.size] = "estate";
|
||||
level.maps[level.maps.size] = "estate";
|
||||
//level.maps[level.maps.size] = "favela";
|
||||
//level.maps[level.maps.size] = "so_showers_gulag";
|
||||
level.maps[level.maps.size] = "oilrig";
|
||||
|
||||
@@ -46,7 +46,6 @@ loadWeapons()
|
||||
// pistols
|
||||
weaponList[weaponList.size] = "usp_mp";
|
||||
weaponList[weaponList.size] = "deserteagle_mp";
|
||||
weaponList[weaponList.size] = "deserteagle_akimbo_mp"; // GL deagle
|
||||
weaponList[weaponList.size] = "coltanaconda_mp";
|
||||
weaponList[weaponList.size] = "beretta_mp";
|
||||
// semi auto pistols
|
||||
@@ -119,7 +118,7 @@ loadWeapons()
|
||||
// Only remove specific weapons if we still have enough unique ones left
|
||||
if(weaponList.size > 5)
|
||||
{
|
||||
if(weaponList[id] == "m79_mp" || weaponList[id] == "at4_mp" || weaponList[id] == "rpg_mp" || weaponList[id] == "riotshield_mp" || weaponList[id] == "dragunov_mp" || weaponList[id] == "m40a3_mp" || weaponList[id] == "peacekeeper_mp" || weaponList[id] == "deserteagle_akimbo_mp")
|
||||
if(weaponList[id] == "m79_mp" || weaponList[id] == "at4_mp" || weaponList[id] == "rpg_mp" || weaponList[id] == "riotshield_mp" || weaponList[id] == "dragunov_mp" || weaponList[id] == "m40a3_mp" || weaponList[id] == "peacekeeper_mp")
|
||||
weaponList = removeIDfromArray(id, weaponList);
|
||||
}
|
||||
}
|
||||
@@ -138,10 +137,6 @@ removeIDfromArray(id, weaponList)
|
||||
}
|
||||
setWeapon(name)
|
||||
{
|
||||
// If the caller already specified a fully-qualified akimbo weapon (e.g.
|
||||
// "deserteagle_akimbo_mp"), pass it through unchanged — no randomization.
|
||||
if(isSubstr(name, "_akimbo_"))
|
||||
return name;
|
||||
name = strTok(name, "_");
|
||||
scope = "";
|
||||
attachments = "";
|
||||
@@ -523,16 +518,6 @@ loadFungameList()
|
||||
addFungameWeapon("famas_reflex_mp");
|
||||
addFungameWeapon("famas_acog_mp");
|
||||
addFungameWeapon("famas_fmj_mp");
|
||||
addFungameWeapon("fal_mp");
|
||||
addFungameWeapon("fal_silencer_mp");
|
||||
addFungameWeapon("fal_reflex_mp");
|
||||
addFungameWeapon("fal_acog_mp");
|
||||
addFungameWeapon("fal_gl_mp");
|
||||
addFungameWeapon("m16_mp");
|
||||
addFungameWeapon("m16_silencer_mp");
|
||||
addFungameWeapon("m16_reflex_mp");
|
||||
addFungameWeapon("m16_acog_mp");
|
||||
addFungameWeapon("m16_gl_mp");
|
||||
addFungameWeapon("ak47classic_mp");
|
||||
|
||||
wait .05;
|
||||
|
||||
Reference in New Issue
Block a user