Skip to content

Commit

Permalink
v3.2.0.2 Beta Merge pull request #962 from Die4Ever/develop
Browse files Browse the repository at this point in the history
v3.2.0.2 Beta
  • Loading branch information
Die4Ever authored Sep 26, 2024
2 parents f6f04d2 + 6421a78 commit a3ff10a
Show file tree
Hide file tree
Showing 56 changed files with 974 additions and 241 deletions.
22 changes: 20 additions & 2 deletions DXRCore/DeusEx/Classes/DXRActorsBase.uc
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ function SwapAll(string classname, float percent_chance)
temp[num++] = a;
}

if(num<2) {
l("SwapAll(" $ classname $ ", " $ percent_chance $ ") only found " $ num);
return;
}
for(i=0; i<num; i++) {
if( percent_chance<100 && !chance_single(percent_chance) ) continue;
slot=rng(num-1);// -1 because we skip ourself
Expand Down Expand Up @@ -1309,6 +1314,8 @@ function vector GetRandomPosition(optional vector target, optional float mindist
maxdist = 9999999;

foreach RadiusActors(class'NavigationPoint', p, maxdist, target) {
if(Teleporter(p)!=None) continue;
if(MapExit(p)!=None) continue;
if( (!allowSky) && p.Region.Zone.IsA('SkyZoneInfo') ) continue;
if( (!allowWater) && p.Region.Zone.bWaterZone ) continue;
if( (!allowPain) && (p.Region.Zone.bKillZone || p.Region.Zone.bPainZone ) ) continue;
Expand Down Expand Up @@ -1711,6 +1718,17 @@ function bool PositionIsSafeLenient(Vector oldloc, Actor test, Vector newloc)
return _PositionIsSafeOctant(oldloc, GetCenter(test), newloc);
}

function RemoveDXMoverPrePivot(#var(DeusExPrefix)Mover dxm)
{
local vector pivot;
local rotator r;

pivot = dxm.PrePivot >> dxm.Rotation;
dxm.BasePos = dxm.BasePos - vectm(pivot.X,pivot.Y,pivot.Z);
dxm.PrePivot=vect(0,0,0);
dxm.SetLocation(dxm.BasePos);
}

static function Actor GlowUp(Actor a, optional byte hue, optional byte saturation)
{
// if `a` is a datacube, spawn a new light instead
Expand All @@ -1734,7 +1752,7 @@ static function Actor GlowUp(Actor a, optional byte hue, optional byte saturatio
function DebugMarkKeyActor(Actor a, coerce string id)
{
local ActorDisplayWindow actorDisplay;
if( ! #defined(locdebug)) {
if( ! #bool(locdebug)) {
err("Don't call DebugMarkKeyActor without locdebug mode! Add locdebug to the compiler_settings.default.json file");
return;
}
Expand All @@ -1760,7 +1778,7 @@ function DebugMarkKeyPosition(vector pos, coerce string id)
{
local ActorDisplayWindow actorDisplay;
local Actor a;
if( ! #defined(locdebug)) {
if( ! #bool(locdebug)) {
err("Don't call DebugMarkKeyPosition without locdebug mode! Add locdebug to the compiler_settings.default.json file");
return;
}
Expand Down
1 change: 1 addition & 0 deletions DXRCore/DeusEx/Classes/DXRBase.uc
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ simulated function DXRando GetDXR()

static function DXRBase Find()
{
if(class'DXRando'.default.dxr == None) return None;
return class'DXRando'.default.dxr.FindModule(default.class);
}

Expand Down
7 changes: 3 additions & 4 deletions DXRCore/DeusEx/Classes/DXRInfo.uc
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,13 @@ simulated final function #var(PlayerPawn) player(optional bool quiet)
local #var(PlayerPawn) p;
local DXRando dxr;
dxr = GetDXR();
//p = #var(PlayerPawn)(GetPlayerPawn());
p = dxr.Player;
if(dxr != None) p = dxr.Player;
if( p == None ) {
p = #var(PlayerPawn)(GetPlayerPawn());
if(p==None){ //If GetPlayerPawn() didn't work (probably in HX)
foreach AllActors(class'#var(PlayerPawn)', p){break;}
}
dxr.Player = p;
if(dxr != None) dxr.Player = p;
}
if( p == None && !quiet ) warning("player() found None");
return p;
Expand Down Expand Up @@ -227,7 +226,7 @@ function bool OnTitleScreen()
{
local DXRando dxr;
dxr = class'DXRando'.default.dxr;
if(dxr == None) return true;
return dxr.LocalURL=="DX" || dxr.LocalURL=="DXONLY";
}

Expand Down
5 changes: 4 additions & 1 deletion DXRCore/DeusEx/Classes/DXRMenuSelectDifficulty.uc
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ function BindControls(optional string action)
NewMenuItem("", "Use the installer to download the mirrored map files, or go to the unreal-map-flipper Releases page on Github");
EnumOption("Mirror Map Files Not Found", -1, f.mirroredmaps);
}
#else
//Disable mirrored maps entirely if map variants aren't supported
f.mirroredmaps=-1;
#endif

NewMenuItem("Seed", "Enter a seed if you want to play the same game again. Leave it blank for a random seed.");
Expand Down Expand Up @@ -171,7 +174,7 @@ function string SetEnumValue(int e, string text)
// HACK: this allows you to override the autosave option instead of SetDifficulty forcing it by game mode
Super.SetEnumValue(e, text);
if(e == gamemode_enum && #defined(injections)) {
if(InStr(text, "Halloween Mode")==0 || InStr(text, "WaltonWare Halloween")==0)
if(InStr(text, "Halloween")!=-1)
{
Super.SetEnumValue(autosave_enum, "Limited Fixed Saves");
}
Expand Down
2 changes: 1 addition & 1 deletion DXRCore/DeusEx/Classes/DXRMenuSetupRando.uc
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ function BindControls(optional string action)
NewMenuItem("Non-Human Chance %", "Reduce the chance of new enemies being non-humans.");
Slider(f.settings.enemies_nonhumans, 0, 100);

NewMenuItem("Enemy Respawn Seconds", "(Beta) How many seconds for enemies to respawn. Leave blank or 0 to disable.");
NewMenuItem("Enemy Respawn Seconds", "How many seconds for enemies to respawn. Leave blank or 0 to disable.");
Slider(f.settings.enemyrespawn, 0, 10000);

NewMenuItem("Move Turrets", "Randomizes locations of turrets, cameras, and security computers for them.");
Expand Down
16 changes: 15 additions & 1 deletion DXRCore/DeusEx/Classes/DXRVersion.uc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ simulated static function CurrentVersion(optional out int major, optional out in
major=3;
minor=2;
patch=0;
build=1;//build can't be higher than 99
build=2;//build can't be higher than 99
}

simulated static function bool VersionIsStable()
Expand Down Expand Up @@ -60,6 +60,20 @@ simulated static function int VersionNumber()
return VersionToInt(major, minor, patch, build);
}
simulated static function bool FeatureFlag(int major, int minor, int patch, string feature) // make sure to have an issue in GitHub with the feature flag name! and it should be attached to a milestone
{
if(#bool(allfeatures)) return true;
#ifdef enablefeature
if("#var(enablefeature)" == feature) return true;
#endif
if(VersionNumber() >= VersionToInt(major, minor, patch, 0)) {
log("WARNING: FeatureFlag " $ feature $ " only requires v" $ major $ "." $ minor $ "." $ patch, default.class.name);
return true;
}
return false;
}

simulated static function bool VersionOlderThan(int config_version, int major, int minor, int patch, int build)
{
return config_version < VersionToInt(major, minor, patch, build);
Expand Down
21 changes: 16 additions & 5 deletions DXRFixes/DeusEx/Classes/ElevatorMover.uc
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ class ElevatorMover merges ElevatorMover;
// can't do injects because it uses a state

var float lastTime, moveSpeed, originalMoveTime;
var int numKeyPos;
var int numKeyPos, prevSeqNum;
var bool initialized;

function Initialize()
{
local SequenceTrigger st;
local float dist, maxDist, avgDist, distSum;
local float dist, maxDist, maxDist2, avgDist, distSum;
local int validKeyPos[8];
local int i, j;

Expand All @@ -34,13 +34,18 @@ function Initialize()
for (i = 0; i < numKeyPos; i++) {
for (j = i + 1; j < numKeyPos; j++) {
dist = VSize(KeyPos[validKeyPos[i]] - KeyPos[validKeyPos[j]]);
maxDist = FMax(maxDist, dist);
if(dist > maxDist) {
maxDist2 = maxDist;
maxDist = dist;
} else if(dist > maxDist2) {
maxDist2 = dist;
}
distSum += dist;
}
}

avgDist = distSum / (numKeyPos * (numKeyPos - 1) / 2.0);
moveSpeed = (maxDist*0.33 + avgDist*0.67) / MoveTime;
moveSpeed = (maxDist*0.5 + maxDist2*0.5) / MoveTime;
originalMoveTime = MoveTime;

initialized = true;
Expand Down Expand Up @@ -68,7 +73,7 @@ function SetSeq(int seqnum)

Initialize();

if( MoveTime/10 < Level.TimeSeconds-lastTime )
if( seqnum != prevSeqNum && MoveTime/3 < Level.TimeSeconds-lastTime ) // HACK: for 12_vandenberg_cmd elevator
oldSeq = true;

if ( bIsMoving && !oldSeq )
Expand All @@ -81,6 +86,7 @@ function SetSeq(int seqnum)

if (KeyNum != seqnum || oldSeq)
{
prevSeqNum = seqnum;
prevKeyNum = KeyNum;
KeyNum = seqnum;

Expand All @@ -91,3 +97,8 @@ function SetSeq(int seqnum)
else lastTime = Level.TimeSeconds;
}
}

defaultproperties
{
prevSeqNum=-1
}
6 changes: 3 additions & 3 deletions DXRMapFixups/DeusEx/Classes/DXRFixupM01.uc
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ function PostFirstEntryMapFixes()
local DeusExMover m;
local BlockPlayer bp;

FixUNATCORetinalScanner();

switch(dxr.localURL) {
case "01_NYC_UNATCOISLAND":
AddBox(class'#var(prefix)CrateUnbreakableSmall', vectm(6720.866211, -3346.700684, -445.899597));// electrical hut
Expand All @@ -27,9 +25,11 @@ function PostFirstEntryMapFixes()
SetAllLampsState(,, false, vect(-5724.620605, 1435.543213, -79.614632), 0.01);
SetAllLampsState(,, false, vect(3313.0954215, -1662.294768, -176.938141), 0.01);

break;
case "01_NYC_UNATCOHQ":
FixUNATCORetinalScanner();
break;
}

}


Expand Down
8 changes: 6 additions & 2 deletions DXRMapFixups/DeusEx/Classes/DXRFixupM03.uc
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,13 @@ function PostFirstEntryMapFixes()

RevisionMaps = class'DXRMapVariants'.static.IsRevisionMaps(player());

FixUNATCORetinalScanner();

switch(dxr.localURL) {
case "03_NYC_UNATCOHQ":
FixUNATCORetinalScanner();
break;
case "03_NYC_BatteryPark":
player().StartDataLinkTransmission("dl_batterypark");
break;
case "03_NYC_BrooklynBridgeStation":
if (!RevisionMaps){
a = AddActor(class'Barrel1', vect(-27.953907, -3493.229980, 45.101418));
Expand Down
15 changes: 14 additions & 1 deletion DXRMapFixups/DeusEx/Classes/DXRFixupM04.uc
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,20 @@ function PreFirstEntryMapFixes()

function PostFirstEntryMapFixes()
{
FixUNATCORetinalScanner();
local DeusExGoal goal;

switch(dxr.localURL)
{
case "04_NYC_UNATCOHQ":
FixUNATCORetinalScanner();
break;
case "04_NYC_STREET":
goal = player().FindGoal('TellJaime');
if (goal != None) {
goal.SetCompleted();
}
break;
}
}

function AnyEntryMapFixes()
Expand Down
51 changes: 39 additions & 12 deletions DXRMapFixups/DeusEx/Classes/DXRFixupM05.uc
Original file line number Diff line number Diff line change
Expand Up @@ -331,18 +331,45 @@ function BalanceJailbreak()

else {
// put the items in the surgery ward
itemLocations[num++] = vectm(2174.416504,-569.534729,-213.660309);// paul's bed
itemLocations[num++] = vectm(2176.658936,-518.937012,-213.659302);// paul's bed
itemLocations[num++] = vectm(1792.696533,-738.417175,-213.660248);// bed 2
itemLocations[num++] = vectm(1794.898682,-802.133301,-213.658630);// bed 2
itemLocations[num++] = vectm(1572.443237,-739.527649,-213.660095);// bed 1
itemLocations[num++] = vectm(1570.557007,-801.213806,-213.660095);// bed 1
itemLocations[num++] = vectm(1269.494019,-522.082458,-221.659180);// near ambrosia
itemLocations[num++] = vectm(1909.302979,-376.711639,-221.660095);// desk with microscope and datacube
itemLocations[num++] = vectm(1572.411865,-967.828735,-261.659546);// on the floor, at the wall with the monitors
itemLocations[num++] = vectm(1642.170532,-968.813354,-261.660736);
itemLocations[num++] = vectm(1715.513062,-965.846558,-261.657837);
itemLocations[num++] = vectm(1782.731689,-966.754700,-261.661041);
itemLocations[num++] = vectm(2160,-585,-203);// paul's bed
itemLocations[num++] = vectm(2160,-505,-203);// paul's bed
itemLocations[num++] = vectm(1805,-730,-203);// middle bed
itemLocations[num++] = vectm(1805,-810,-203);// middle bed
itemLocations[num++] = vectm(1555,-730,-203);// bed near ambrosia
itemLocations[num++] = vectm(1555,-810,-203);// bed near ambrosia

//Third bed locations
itemLocations[num++] = vectm(2190,-545,-203);// paul's bed
itemLocations[num++] = vectm(1775,-770,-203);// middle bed
itemLocations[num++] = vectm(1585,-770,-203);// bed near ambrosia


itemLocations[num++] = vectm(1270,-522,-211);// near ambrosia
itemLocations[num++] = vectm(1275,-710,-211);// table with two microscopes and datacube (left)
itemLocations[num++] = vectm(1275,-805,-211);// table with two microscopes and datacube (right)
itemLocations[num++] = vectm(1910,-375,-211);// desk with microscope and datacube
itemLocations[num++] = vectm(2160,-327,-211);// table with two monitors (left)
itemLocations[num++] = vectm(2055,-327,-211);// table with two monitors (right)
itemLocations[num++] = vectm(2110,-327,-211);// table with two monitors (middle)

// on the floor, at the wall with the monitors, starting in the center, working out
itemLocations[num++] = vectm(1575,-950,-251);
itemLocations[num++] = vectm(1650,-950,-251);
itemLocations[num++] = vectm(1500,-950,-251);
itemLocations[num++] = vectm(1725,-950,-251);
itemLocations[num++] = vectm(1425,-950,-251);
itemLocations[num++] = vectm(1800,-950,-251);
itemLocations[num++] = vectm(1350,-950,-251);
itemLocations[num++] = vectm(1875,-950,-251);
itemLocations[num++] = vectm(1275,-950,-251);

// seriously, why do you have so much stuff, I never want to see these spots get used
// on the floor, at the wall with the monitors, emergency second row
itemLocations[num++] = vectm(1575,-900,-251);
itemLocations[num++] = vectm(1650,-900,-251);
itemLocations[num++] = vectm(1500,-900,-251);
itemLocations[num++] = vectm(1725,-900,-251);
itemLocations[num++] = vectm(1425,-900,-251);

foreach AllActors(class'#var(prefix)DataLinkTrigger', dlt) {
if(dlt.datalinkTag != 'dl_equipment') continue;
Expand Down
26 changes: 26 additions & 0 deletions DXRMapFixups/DeusEx/Classes/DXRFixupM06.uc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ var bool raidStarted;

function CheckConfig()
{
local Rotator rot;
local int i;

add_datacubes[i].map = "06_HONGKONG_VERSALIFE";
Expand All @@ -22,6 +23,13 @@ function CheckConfig()
add_datacubes[i].text = "It's so handy being able to quickly grab some cash from the Quick Stop before getting to the club!|nAccount: 2332316 |nPIN: 1608 ";
i++;

add_datacubes[i].map = "06_HONGKONG_WANCHAI_STREET";
add_datacubes[i].text = "Miss Chow,|nOur agents have ascertained the access codes to the police evidence vault in the market. When you are ready, our agents can enter the vault and remove the evidence located within using the code 87342.|n|nCommander Triolet";
add_datacubes[i].Location = vect(-300.4, -1544.0, 1970.4);
rot.Yaw = -2250.0;
add_datacubes[i].rotation = rot;
i++;

add_datacubes[i].map = "06_HONGKONG_WANCHAI_UNDERWORLD";
add_datacubes[i].text = "Max,|nIf you need to get into the freezer again, I've connected the door to the security terminal in the meeting room.|n|nLogin: LUCKYMONEY |nPassword: REDARROW |n|nRemember, that's the same account as your own computer.";
add_datacubes[i].Location = vect(367,-2511,-334);
Expand Down Expand Up @@ -841,7 +849,10 @@ function AnyEntryMapFixes()
local ConEventSpeech ces;
local ConEventSetFlag cesf;
local ConEventTrigger cet;
local OrdersTrigger ot;
local #var(prefix)Pigeon pigeon;
local #var(prefix)MaggieChow maggie;
local #var(prefix)Maid maysung;

// if flag Have_ROM, set flags Have_Evidence and KnowsAboutNanoSword?
// or if flag Have_ROM, Gordon Quick should let you into the compound? requires Have_Evidence and MaxChenConvinced
Expand Down Expand Up @@ -953,8 +964,23 @@ function AnyEntryMapFixes()
m.bLocked = false;
m.bHighlight = true;
}

HandleJohnSmithDeath();
FixMaggieMoveSpeed();

if (dxr.flagbase.GetBool('MaxChenConvinced')) {
foreach AllActors(class'#var(prefix)MaggieChow', maggie) {
maggie.LeaveWorld();
break;
}

dxr.flagbase.SetBool('MeetMaySung_Played', true);
foreach AllActors(class'OrdersTrigger', ot, 'MaySungFollows') {
ot.Trigger(None, None);
break;
}
}

break;

case "06_HONGKONG_WANCHAI_CANAL":
Expand Down
Loading

0 comments on commit a3ff10a

Please sign in to comment.