Skip to content

Commit

Permalink
Merge pull request #162 from Die4Ever/develop v1.5.9
Browse files Browse the repository at this point in the history
v1.5.9 Ninja JC and Stick With the Prod improvements
  • Loading branch information
Die4Ever authored Jun 16, 2021
2 parents 865df2b + 0f475ed commit 052bf00
Show file tree
Hide file tree
Showing 29 changed files with 550 additions and 135 deletions.
4 changes: 2 additions & 2 deletions DXRBalance/DeusEx/Classes/BalanceWeaponShuriken.uc
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function CheckSkill()
defaultproperties
{
PickupAmmoCount=20
ShotTime=0.3
ShotTime=0.5
ReloadCount=1
HitDamage=20
HitDamage=18
}
20 changes: 20 additions & 0 deletions DXRBalance/DeusEx/Classes/GasGrenade.uc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
class GasGrenade injects GasGrenade;

function GetSpawnCloudType(out class<Cloud> GasType, out Name tDamageType)
{
GasType = class'TearGas';
tDamageType = 'TearGas';
//GasType = class'PoisonGas';
//tDamageType = 'Poison';
/* // mixed clouds, might be OP
if (FRand() < 0.5)
{
GasType = class'PoisonGas';
tDamageType = 'Poison';
}
else
{
GasType = class'TearGas';
tDamageType = 'TearGas';
}*/
}
53 changes: 53 additions & 0 deletions DXRBalance/DeusEx/Classes/ThrownProjectile.uc
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
class ThrownProjectile shims ThrownProjectile;

//
// SpawnTearGas needs to happen on the server so the clouds are insync and damage is dealt out of them
//
function SpawnTearGas()
{
local int i;
local class<Cloud> GasType;
local Name tDamageType;

if ( Role < ROLE_Authority )
return;

for (i=0; i<blastRadius/36; i++)
{
if (FRand() < 0.9)
{
GetSpawnCloudType( GasType, tDamageType );
SpawnCloud(GasType, tDamageType);
}
}
}

function GetSpawnCloudType(out class<Cloud> GasType, out Name tDamageType)
{
GasType = class'TearGas';
tDamageType = 'TearGas';
}

function SpawnCloud(class<Cloud> type, Name DamageType)
{
local Vector loc;
local Cloud gas;

loc = Location;
loc.X += FRand() * blastRadius - blastRadius * 0.5;
loc.Y += FRand() * blastRadius - blastRadius * 0.5;
loc.Z += 32;
gas = spawn(type, None,, loc);
if (gas == None) return;

gas.DamageType = DamageType;
gas.Velocity = vect(0,0,0);
gas.Acceleration = vect(0,0,0);
gas.DrawScale = FRand() * 0.5 + 2.0;
gas.LifeSpan = FRand() * 10 + 30;
if ( Level.NetMode != NM_Standalone )
gas.bFloating = False;
else
gas.bFloating = True;
gas.Instigator = Instigator;
}
73 changes: 51 additions & 22 deletions DXRModules/DeusEx/Classes/DXRAugmentations.uc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ replication

function CheckConfig()
{
if( ConfigOlderThan(1,4,8,0) ) {
if( ConfigOlderThan(1,5,9,8) ) {
min_aug_str = default.min_aug_str;
max_aug_str = default.max_aug_str;
}
Expand Down Expand Up @@ -86,52 +86,77 @@ function RandomizeAugCannisters()
}
}

function static _DefaultAugsMask(DXRando dxr, out int banned[50], out int numAugs)
{
local DXRLoadouts loadouts;
local class<Augmentation> a;
local int i;

loadouts = DXRLoadouts(dxr.FindModule(class'DXRLoadouts'));
for(i=0; i<ArrayCount(class'#var prefix AugmentationManager'.default.augClasses); i++) {
if( banned[i] == 1 ) continue;
a = class'#var prefix AugmentationManager'.default.augClasses[i];
if( a.default.AugmentationLocation == LOC_Default ) {
banned[i] = 1;
continue;
}
if( loadouts != None ) {
if( loadouts.StartedWithAug(a) ) {
banned[i] = 1;
continue;
}
}
numAugs++;
}
}

function static RandomizeAugCannister(DXRando dxr, #var prefix AugmentationCannister a)
{
local int attempts;
a.AddAugs[0] = PickRandomAug(dxr);
local int attempts, numAugs;
local int banned[50];

_DefaultAugsMask(dxr, banned, numAugs);

a.AddAugs[0] = PickRandomAug(dxr, banned, numAugs);
a.AddAugs[1] = a.AddAugs[0];
for( attempts = 0; attempts<100 && a.AddAugs[1] == a.AddAugs[0]; attempts++ )
{
a.AddAugs[1] = PickRandomAug(dxr);
a.AddAugs[1] = PickRandomAug(dxr, banned, numAugs);
}

if( a.AddAugs[0] == '#var prefix AugSpeed' || a.AddAugs[1] == '#var prefix AugSpeed' ) {
dxr.flags.player().ClientMessage("Speed Enhancement is in this area.",, true);
}
}

function static Name PickRandomAug(DXRando dxr)
function static Name PickRandomAug(DXRando dxr, int banned[50], int numAugs)
{
local int slot;
local int skipAugSpeed;
local int numAugs;
local int slot, i, r;
local Name AugName;
numAugs=21;
if( dxr.flags.settings.speedlevel > 0 )
skipAugSpeed=1;
slot = staticrng(dxr, numAugs-3-skipAugSpeed) + skipAugSpeed;// exclude the 3 or 4 augs you start with, 0 is AugSpeed
if ( slot >= 11 ) slot++;// skip AugIFF
if ( slot >= 12 ) slot++;// skip AugLight
if (slot >= 18 ) slot++;// skip AugDatalink
r = staticrng(dxr, numAugs);
for(i=0; i < ArrayCount(class'#var prefix AugmentationManager'.default.augClasses); i++) {
if( banned[i] == 1 ) continue;
if( slot == r )
break;
slot++;
}
slot = i;
if( slot >= ArrayCount(class'#var prefix AugmentationManager'.default.augClasses) )
dxr.err("PickRandomAug WTF");
AugName = class'#var prefix AugmentationManager'.default.augClasses[slot].Name;
log("Picked Aug "$ slot $"/"$numAugs$" " $ AugName, 'DXRAugmentations');
return AugName;
}
simulated function RandoAug(Augmentation a)
{
local int oldseed;
if( dxr == None ) return;
if( #var prefix AugSpeed(a) != None || #var prefix AugLight(a) != None || #var prefix AugHeartLung(a) != None
|| #var prefix AugIFF(a) != None || #var prefix AugDatalink(a) != None || AugNinja(a) != None )
return;
oldseed = dxr.SetSeed( dxr.Crc(dxr.seed $ "RandoAug " $ a.class.name ) );
RandoLevelValues(a, min_aug_str, max_aug_str, a.Description);
dxr.SetSeed(oldseed);
}
simulated function string DescriptionLevel(Actor act, int i, out string word)
Expand Down Expand Up @@ -209,17 +234,21 @@ simulated function RemoveRandomAug(#var PlayerPawn p)
{
local Augmentation a, b, augs[64];
local AugmentationManager am;
local DXRLoadouts loadouts;
local int numAugs, slot;

am = p.AugmentationSystem;
loadouts = DXRLoadouts(dxr.FindModule(class'DXRLoadouts'));

for( a = am.FirstAug; a != None; a = a.next ) {
if( !a.bHasIt ) continue;
if( a.AugmentationLocation == LOC_Default ) continue;

if( #var prefix AugSpeed(a) != None || #var prefix AugLight(a) != None
|| #var prefix AugIFF(a) != None || #var prefix AugDatalink(a) != None || AugNinja(a) != None
) continue;
if( #var prefix AugLight(a) != None || #var prefix AugIFF(a) != None || #var prefix AugDatalink(a) != None )
continue;

if( loadouts != None && loadouts.StartedWithAug(a.class) )
continue;

augs[numAugs++] = a;
}
Expand Down
4 changes: 3 additions & 1 deletion DXRModules/DeusEx/Classes/DXRBacktracking.uc
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,15 @@ function AnyEntry()

function FixInterpolating(#var PlayerPawn p)
{
p.bDetectable = true;
p.bHidden = false;
p.Visibility = p.Default.Visibility;
//err(player()$" state: "$player().GetStateName()$", Tag: "$player().tag$", NextState: "$player().NextState$", bInterpolating: "$player().bInterpolating);
if( p.NextState != 'Interpolating' ) return;
info("FixInterpolating(), "$p$" state: "$p.GetStateName()$", Tag: "$p.tag$", NextState: "$p.NextState$", bInterpolating: "$p.bInterpolating);
p.NextState = '';
p.NextLabel = '';
p.GotoState('PlayerWalking');
p.bDetectable = true;
}

function ParisMetroAnyEntry()
Expand Down
1 change: 1 addition & 0 deletions DXRModules/DeusEx/Classes/DXREnemies.uc
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@ function RandomizeSP(ScriptedPawn p, int percent)

l("RandomizeSP("$p$", "$percent$")");
p.SurprisePeriod = rngrange(p.SurprisePeriod+0.1, 0.3, 1.2);
p.GroundSpeed = rngrange(p.GroundSpeed, 0.9, 1.1);

if( IsHuman(p) == False ) return; // only give random weapons to humans
if( p.IsA('MJ12Commando') || p.IsA('WIB') ) return;
Expand Down
12 changes: 12 additions & 0 deletions DXRModules/DeusEx/Classes/DXRFixup.uc
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,11 @@ function Vandenberg_FirstEntry()
}
break;

case "14_VANDENBERG_SUB":
AddSwitch( vect(3790.639893, -488.639587, -369.964142), rot(0, 32768, 0), 'Elevator1');
AddSwitch( vect(3799.953613, -446.640015, -1689.817993), rot(0, 16384, 0), 'Elevator1');
break;

case "14_OCEANLAB_LAB":
foreach AllActors(class'ComputerSecurity', comp) {
if( comp.UserList[0].userName == "Kraken" && comp.UserList[0].Password == "Oceanguard" ) {
Expand Down Expand Up @@ -844,6 +849,13 @@ function Shipyard_FirstEntry()
}
AddSwitch( vect(2534.639893, 227.583054, 339.803802), rot(0,-32760,0), 'shipbelowdecks_door' );
break;

case "09_NYC_SHIPBELOW":
foreach AllActors(class'DeusExMover', m, 'ShipBreech') {
m.bHighlight = true;
m.bLocked = true;
}
break;
}
}

Expand Down
6 changes: 3 additions & 3 deletions DXRModules/DeusEx/Classes/DXRFlags.uc
Original file line number Diff line number Diff line change
Expand Up @@ -180,20 +180,20 @@ simulated static function CurrentVersion(optional out int major, optional out in
major=1;
minor=5;
patch=9;
build=2;
build=8;//build can't be higher than 99
}

simulated static function string VersionString(optional bool full)
{
local int major,minor,patch,build;
CurrentVersion(major,minor,patch,build);
return VersionToString(major, minor, patch, build, full) $ " Alpha";
return VersionToString(major, minor, patch, build, full) $ "";
}
function CheckConfig()
{
local int i;
if( ConfigOlderThan(1,5,9,2) ) {
if( ConfigOlderThan(1,5,9,8) ) {
// setup default difficulties
i=0;
#ifndef hx
Expand Down
23 changes: 22 additions & 1 deletion DXRModules/DeusEx/Classes/DXRKeys.uc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var config float min_lock_adjust, max_lock_adjust, min_door_adjust, max_door_adj
function CheckConfig()
{
local int i;
if( ConfigOlderThan(1,5,7,0) ) {
if( ConfigOlderThan(1,5,9,8) ) {

for(i=0; i<ArrayCount(keys_rules); i++) {
keys_rules[i].map = "";
Expand Down Expand Up @@ -75,6 +75,27 @@ function CheckConfig()
keys_rules[i].allow = false;
i++;

keys_rules[i].map = "12_Vandenberg_Tunnels";
keys_rules[i].item_name = 'maintenancekey';
keys_rules[i].min_pos = vect(-3521.955078, 3413.110352, -3246.771729);
keys_rules[i].max_pos = vect(-2844.053467, 3756.776855, -3097.210205);
keys_rules[i].allow = false;
i++;

keys_rules[i].map = "12_Vandenberg_Tunnels";
keys_rules[i].item_name = 'control_room';
keys_rules[i].min_pos = vect(-99999, -99999, -99999);
keys_rules[i].max_pos = vect(99999, 99999, 99999);
keys_rules[i].allow = true;
i++;

keys_rules[i].map = "12_Vandenberg_Tunnels";
keys_rules[i].item_name = 'maintenancekey';
keys_rules[i].min_pos = vect(-99999, -99999, -99999);
keys_rules[i].max_pos = vect(99999, 99999, 99999);
keys_rules[i].allow = true;
i++;

//disallow the crew quarters
keys_rules[i].map = "14_oceanlab_lab";
keys_rules[i].item_name = 'crewkey';
Expand Down
Loading

0 comments on commit 052bf00

Please sign in to comment.