Skip to content

Commit

Permalink
Promod LIVE V2.18 release
Browse files Browse the repository at this point in the history
  • Loading branch information
Ingramz authored and Trivve committed Feb 12, 2014
1 parent 1b0be92 commit 8436ce9
Show file tree
Hide file tree
Showing 17 changed files with 138 additions and 178 deletions.
2 changes: 1 addition & 1 deletion compile.bat
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

@echo off

SET mod_name=pml217
SET mod_name=pml218
SET work_directory=%~dp0
cd %work_directory%

Expand Down
3 changes: 2 additions & 1 deletion compile_fastfile.bat
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ xcopy shock ..\..\raw\shock\ /SY
xcopy sound ..\..\raw\sound\ /SY
xcopy soundaliases ..\..\raw\soundaliases\ /SY
xcopy ui_mp ..\..\raw\ui_mp\ /SY
xcopy xmodel ..\..\raw\xmodel\ /SY

copy mod.csv ..\..\zone_source /Y

cd ..\..\bin
linker_pc.exe -language english -compress -cleanup mod -verbose

cd ..\mods\pml217
cd ..\mods\pml218
copy ..\..\zone\english\mod.ff

pause
5 changes: 1 addition & 4 deletions maps/mp/_flashgrenades.gsc
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,7 @@ monitorFlash()
{
self waittill( "flashbang", amount_distance, amount_angle, attacker );

if ( !isalive( self ) )
continue;

if ( ( isDefined( level.rdyup ) && level.rdyup && ( !isDefined( self.ruptally ) || self.ruptally < 0 ) ) || isDefined( game["PROMOD_MATCH_MODE"] ) && game["PROMOD_MATCH_MODE"] == "strat" && isDefined( self.flying ) && self.flying )
if ( !isalive( self ) || ( isDefined( level.rdyup ) && level.rdyup && ( !isDefined( self.ruptally ) || self.ruptally < 0 ) ) || isDefined( game["PROMOD_MATCH_MODE"] ) && game["PROMOD_MATCH_MODE"] == "strat" && isDefined( self.flying ) && self.flying || isDefined( game["PROMOD_KNIFEROUND"] ) && game["PROMOD_KNIFEROUND"] )
continue;

hurtattacker = false;
Expand Down
172 changes: 62 additions & 110 deletions maps/mp/gametypes/_class.gsc
Original file line number Diff line number Diff line change
Expand Up @@ -8,78 +8,34 @@
Terms of license can be found in LICENSE.md document bundled with the project.
*/

init()
{
level.primary_weapon_array = [];

weapon_class_register( "m16_mp", "weapon_assault" );
weapon_class_register( "m16_silencer_mp", "weapon_assault" );
weapon_class_register( "ak47_mp", "weapon_assault" );
weapon_class_register( "ak47_silencer_mp", "weapon_assault" );
weapon_class_register( "m4_mp", "weapon_assault" );
weapon_class_register( "m4_silencer_mp", "weapon_assault" );
weapon_class_register( "g3_mp", "weapon_assault" );
weapon_class_register( "g3_silencer_mp", "weapon_assault" );
weapon_class_register( "g36c_mp", "weapon_assault" );
weapon_class_register( "g36c_silencer_mp", "weapon_assault" );
weapon_class_register( "m14_mp", "weapon_assault" );
weapon_class_register( "m14_silencer_mp", "weapon_assault" );
weapon_class_register( "mp44_mp", "weapon_assault" );
weapon_class_register( "mp5_mp", "weapon_smg" );
weapon_class_register( "mp5_silencer_mp", "weapon_smg" );
weapon_class_register( "uzi_mp", "weapon_smg" );
weapon_class_register( "uzi_silencer_mp", "weapon_smg" );
weapon_class_register( "ak74u_mp", "weapon_smg" );
weapon_class_register( "ak74u_silencer_mp", "weapon_smg" );
weapon_class_register( "winchester1200_mp", "weapon_shotgun" );
weapon_class_register( "m1014_mp", "weapon_shotgun" );
weapon_class_register( "m40a3_mp", "weapon_sniper" );
weapon_class_register( "remington700_mp", "weapon_sniper" );

level thread onPlayerConnecting();
}

weapon_class_register( weapon, weapon_type )
{
level.primary_weapon_array[weapon] = weapon_type;
}

giveLoadout( team, class )
{
self takeAllWeapons();

self setClass( class );
self setClientDvar( "loadout_curclass", class );
self.curClass = class;

sidearmWeapon();
primaryWeapon();

if ( getDvarInt( "weap_allow_frag_grenade" ) && ( isDefined( level.strat_over ) && level.strat_over || !isDefined( level.strat_over ) ) )
if(getDvarInt("weap_allow_frag_grenade") && (!isDefined( level.strat_over ) || level.strat_over))
{
s = "";
if ( level.hardcoreMode )
{
self giveWeapon( "frag_grenade_short_mp" );
self setWeaponAmmoClip( "frag_grenade_short_mp", 1 );
self switchToOffhand( "frag_grenade_short_mp" );
}
else
{
self giveWeapon( "frag_grenade_mp" );
self setWeaponAmmoClip( "frag_grenade_mp", 1 );
self switchToOffhand( "frag_grenade_mp" );
}
s = "_short";
self giveWeapon( "frag_grenade"+s+"_mp" );
self setWeaponAmmoClip( "frag_grenade"+s+"_mp", 1 );
self switchToOffhand( "frag_grenade"+s+"_mp" );
}

if ( self.pers[class]["loadout_grenade"] != "none" && ( getDvarInt( "weap_allow_flash_grenade" ) || getDvarInt( "weap_allow_smoke_grenade" ) ) )
gren = self.pers[class]["loadout_grenade"];
if((gren == "flash_grenade" || gren == "smoke_grenade") && getDvarInt("weap_allow_"+gren))
{
if ( self.pers[class]["loadout_grenade"] == "flash_grenade" && getDvarInt("weap_allow_flash_grenade") )
self setOffhandSecondaryClass("flash");
else if ( self.pers[class]["loadout_grenade"] == "smoke_grenade" && getDvarInt("weap_allow_smoke_grenade") )
self setOffhandSecondaryClass("smoke");

if ( isDefined( level.strat_over ) && level.strat_over || !isDefined( level.strat_over ) )
self setOffhandSecondaryClass(GetSubStr(gren, 0, 5));
if(!isDefined(level.strat_over) || level.strat_over)
{
self giveWeapon( self.pers[class]["loadout_grenade"] + "_mp" );
self setWeaponAmmoClip( self.pers[class]["loadout_grenade"] + "_mp", 1 );
self giveWeapon(gren+"_mp");
self setWeaponAmmoClip(gren+"_mp", 1);
}
}

Expand All @@ -96,13 +52,13 @@ sidearmWeapon()

if ( sideArmWeapon != "none" )
{
s = "";
if ( self.pers[class]["loadout_secondary_attachment"] == "silencer" )
sidearmWeapon = sidearmWeapon + "_silencer_mp";
s = "_silencer";
else
{
self.pers[class]["loadout_secondary_attachment"] = "none";
sidearmWeapon = sidearmWeapon + "_mp";
}

sidearmWeapon += s+"_mp";

if ( isDefined( level.strat_over ) && level.strat_over && ( !isDefined( game["PROMOD_KNIFEROUND"] ) || !game["PROMOD_KNIFEROUND"] ) || !isDefined( level.strat_over ) )
{
Expand All @@ -117,46 +73,61 @@ primaryWeapon()
class = self.pers["class"];
primaryWeapon = self.pers[class]["loadout_primary"];

if ( primaryWeapon != "none" && primaryWeapon != "m16" && primaryWeapon != "ak47" && primaryWeapon != "m4" && primaryWeapon != "g3" && primaryWeapon != "g36c" && primaryWeapon != "m14" && primaryWeapon != "mp44" && primaryWeapon != "mp5" && primaryWeapon != "uzi" && primaryWeapon != "ak74u" && primaryWeapon != "winchester1200" && primaryWeapon != "m1014" && primaryWeapon != "m40a3" && primaryWeapon != "remington700" )
primaryWeapon = getDvar( "class_" + class + "_primary" );

if ( !isDefined( self.pers[class]["loadout_camo"] ) )
self.pers[class]["camo_num"] = 0;
else if ( self.pers[class]["loadout_camo"] == "camo_brockhaurd" )
self.pers[class]["camo_num"] = 1;
else if ( self.pers[class]["loadout_camo"] == "camo_bushdweller" )
self.pers[class]["camo_num"] = 2;
else if ( self.pers[class]["loadout_camo"] == "camo_blackwhitemarpat" )
self.pers[class]["camo_num"] = 3;
else if ( self.pers[class]["loadout_camo"] == "camo_tigerred" )
self.pers[class]["camo_num"] = 4;
else if ( self.pers[class]["loadout_camo"] == "camo_stagger" )
self.pers[class]["camo_num"] = 5;
else if ( self.pers[class]["loadout_camo"] == "camo_gold" && ( primaryWeapon == "ak47" || primaryWeapon == "uzi" || primaryWeapon == "m1014" ) )
self.pers[class]["camo_num"] = 6;
else if ( self.pers[class]["loadout_camo"] == "camo_none" )
self.pers[class]["camo_num"] = 0;
else
switch(primaryWeapon)
{
self.pers[class]["loadout_camo"] = "camo_none";
self.pers[class]["camo_num"] = 0;
case "none":
case "m16":
case "ak47":
case "m4":
case "g3":
case "g36c":
case "m14":
case "mp44":
case "mp5":
case "uzi":
case "ak74u":
case "winchester1200":
case "m1014":
case "m40a3":
case "remington700":
break;
default:
primaryWeapon = getDvar("class_"+class+"_primary");
}

camos = strtok("camo_brockhaurd|camo_bushdweller|camo_blackwhitemarpat|camo_tigerred|camo_stagger", "|");
camonum = 0;

if(isDefined(self.pers[class]["loadout_camo"]))
{
for(i=0;i<camos.size;i++)
if(self.pers[class]["loadout_camo"] == camos[i])
{
camonum = i+1;
break;
}

if(self.pers[class]["loadout_camo"] == "camo_gold" && (primaryWeapon == "ak47" || primaryWeapon == "uzi" || primaryWeapon == "m1014"))
camonum = 6;
}
else
self.pers[class]["loadout_camo"] = "camo_none";

if ( primaryWeapon != "none" )
if(primaryWeapon != "none")
{
if ( self.pers[class]["loadout_primary_attachment"] == "silencer" )
primaryWeapon = primaryWeapon + "_silencer_mp";
s = "";
if(self.pers[class]["loadout_primary_attachment"] == "silencer")
s = "_silencer";
else
{
self.pers[class]["loadout_primary_attachment"] = "none";
primaryWeapon = primaryWeapon + "_mp";
}

primaryWeapon += s+"_mp";

self maps\mp\gametypes\_teams::playerModelForWeapon( self.pers[class]["loadout_primary"] );

if ( isDefined( level.strat_over ) && level.strat_over && ( !isDefined( game["PROMOD_KNIFEROUND"] ) || !game["PROMOD_KNIFEROUND"] ) || !isDefined( level.strat_over ) )
{
self giveWeapon( primaryWeapon, self.pers[class]["camo_num"] );
self giveWeapon( primaryWeapon, camonum );
self setSpawnWeapon( primaryWeapon );
self giveMaxAmmo( primaryWeapon );
}
Expand Down Expand Up @@ -227,23 +198,4 @@ preserveClass( class )
set_config( dataName, value )
{
self setStat( int( tableLookup( "promod/customStatsTable.csv", 1, dataName, 0 ) ), value );
}

onPlayerConnecting()
{
for(;;)
{
level waittill( "connecting", player );

if ( !isDefined( player.pers["class"] ) )
player.pers["class"] = undefined;

player.class = player.pers["class"];
}
}

setClass( newClass )
{
self setClientDvar( "loadout_curclass", newClass );
self.curClass = newClass;
}
3 changes: 1 addition & 2 deletions maps/mp/gametypes/_globallogic.gsc
Original file line number Diff line number Diff line change
Expand Up @@ -2679,7 +2679,6 @@ Callback_StartGameType()
level.useStartSpawns = true;

thread maps\mp\gametypes\_promod::init();
thread maps\mp\gametypes\_class::init();
thread maps\mp\gametypes\_rank::init();
thread maps\mp\gametypes\_menus::init();
thread maps\mp\gametypes\_hud::init();
Expand Down Expand Up @@ -3131,7 +3130,7 @@ Callback_PlayerDamage( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, s
self.attackers[ self.attackers.size ] = eAttacker;
self.attackerData[eAttacker.clientid] = false;
}
if ( maps\mp\gametypes\_weapons::isPrimaryWeapon( sWeapon ) )
if ( WeaponInventoryType( sWeapon ) == "primary" )
self.attackerData[eAttacker.clientid] = true;
}

Expand Down
6 changes: 3 additions & 3 deletions maps/mp/gametypes/_promod.gsc
Original file line number Diff line number Diff line change
Expand Up @@ -616,8 +616,8 @@ updateServerDvars()

get_config( dataName )
{
self.dataValue = self getStat( int( tableLookup( "promod/customStatsTable.csv", 1, dataName, 0 ) ) );
self.dataString = tablelookup( "promod/customStatsTable.csv", 0, self.dataValue, 1 );
dataValue = self getStat( int( tableLookup( "promod/customStatsTable.csv", 1, dataName, 0 ) ) );
dataString = tablelookup( "promod/customStatsTable.csv", 0, dataValue, 1 );

return self.dataString;
return dataString;
}
67 changes: 37 additions & 30 deletions maps/mp/gametypes/_weapons.gsc
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,7 @@ shotCounter()
printStats()
{
if(isDefined(game["PROMOD_MATCH_MODE"]) && game["PROMOD_MATCH_MODE"] == "match" && isDefined(self.hasDoneCombat) && self.hasDoneCombat && isDefined(level.gameEnded) && !level.gameEnded && (!isDefined( game["promod_do_readyup"] ) || !game["promod_do_readyup"]))
{
self iprintln("Can't display stats. Wait for the round to end.");
}
else
{
if ( !isDefined( self.pers["damage_done"] ) )
Expand Down Expand Up @@ -197,32 +195,46 @@ dropWeaponForDeath( attacker )
if ( !isDefined( weapon ) || !self hasWeapon( weapon ) )
return;

if( isPrimaryWeapon( weapon ) )
switch ( weapon )
{
switch ( level.primary_weapon_array[weapon] )
{
case "weapon_assault":
if ( !getDvarInt( "class_assault_allowdrop" ) )
return;
break;
case "weapon_smg":
if ( !getDvarInt( "class_specops_allowdrop" ) )
return;
break;
case "weapon_sniper":
if ( !getDvarInt( "class_sniper_allowdrop" ) )
return;
break;
case "weapon_shotgun":
if ( !getDvarInt( "class_demolitions_allowdrop" ) )
return;
break;
default:
case "m16_mp":
case "m16_silencer_mp":
case "ak47_mp":
case "ak47_silencer_mp":
case "m4_mp":
case "m4_silencer_mp":
case "g3_mp":
case "g3_silencer_mp":
case "g36c_mp":
case "g36c_silencer_mp":
case "m14_mp":
case "m14_silencer_mp":
case "mp44_mp":
if ( !getDvarInt( "class_assault_allowdrop" ) )
return;
}
break;
case "mp5_mp":
case "mp5_silencer_mp":
case "uzi_mp":
case "uzi_silencer_mp":
case "ak74u_mp":
case "ak74u_silencer_mp":
if ( !getDvarInt( "class_specops_allowdrop" ) )
return;
break;
case "m40a3_mp":
case "remington700_mp":
if ( !getDvarInt( "class_sniper_allowdrop" ) )
return;
break;
case "winchester1200_mp":
case "m1014_mp":
if ( !getDvarInt( "class_demolitions_allowdrop" ) )
return;
break;
default:
return;
}
else if ( WeaponClass( weapon ) != "pistol" )
return false;

clipAmmo = self GetWeaponAmmoClip( weapon );

Expand Down Expand Up @@ -300,9 +312,4 @@ onWeaponDamage( eInflictor, sWeapon, meansOfDeath, damage )
self endon ( "disconnect" );

maps\mp\gametypes\_shellshock::shellshockOnDamage( meansOfDeath, damage );
}

isPrimaryWeapon( weaponname )
{
return isdefined( level.primary_weapon_array[weaponname] );
}
4 changes: 3 additions & 1 deletion mod.csv
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,6 @@ rawfile,shock/damage_mp.shock

sound,promod,,all_mp

stringtable,promod/customStatsTable.csv
stringtable,promod/customStatsTable.csv

xmodel,com_floodlight_on
2 changes: 1 addition & 1 deletion pb/promod_iwd_md5.cfg
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pb_sv_md5tool a "" v mods/pml217/pml217.iwd SZ276308 AT0 LEN2048 0B6BD48A1B9FE82904C3C4FD549B4FEA
pb_sv_md5tool a "" v pml218.iwd SZ276308 AT0 LEN2048 DA521500161DE4CA327F648779011C0A
Loading

0 comments on commit 8436ce9

Please sign in to comment.