Skip to content

Commit

Permalink
v1.6.3 Merge pull request #176 from Die4Ever/develop
Browse files Browse the repository at this point in the history
v1.6.3 fix DXRMachines failing to spawn bots, fix TongHasRom trigger, WIP Lay D Denton compatibility
  • Loading branch information
Die4Ever authored Oct 13, 2021
2 parents d4c4d4f + 5f85949 commit 7ab084e
Show file tree
Hide file tree
Showing 14 changed files with 72 additions and 13 deletions.
11 changes: 11 additions & 0 deletions DXRFixes/DeusEx/Classes/Carcass.uc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@ function InitFor(Actor Other)
Super.InitFor(Other);
}

// HACK to fix compatibility with Lay D Denton, see Carcass2.uc
function SetMesh2(mesh m)
{
Mesh2 = m;
}

function SetMesh3(mesh m)
{
Mesh3 = m;
}

function bool _DropItem(Inventory item, Name classname)
{
if( Ammo(item) != None )
Expand Down
12 changes: 12 additions & 0 deletions DXRFixes/DeusEx/Classes/Carcass2.uc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
class Carcass2 injects DeusExCarcass;
// HACK to fix compatibility with Lay D Denton
// Lay D Denton expects the DeusExCarcass class to have Mesh2 and Mesh3 in them, but the engine isn't smart enough to look in the parent class

var(Display) mesh Mesh2; // mesh for secondary carcass
var(Display) mesh Mesh3; // mesh for floating carcass

simulated function PreBeginPlay()
{
SetMesh2(Mesh2);
SetMesh3(Mesh3);
}
4 changes: 4 additions & 0 deletions DXRModules/DeusEx/Classes/DXRFixup.uc
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,7 @@ function HongKong_FirstEntry()
local Button1 b;
local ElevatorMover e;
local #var Mover m;
local FlagTrigger ft;

switch(dxr.localURL)
{
Expand Down Expand Up @@ -848,6 +849,9 @@ function HongKong_FirstEntry()
foreach AllActors(class'#var Mover ', m, 'elevator_door') {
m.bIsDoor = true;// DXRKeys will pick this up later since we're in PreFirstEntry
}
foreach AllActors(class'FlagTrigger', ft, 'MJ12Alert') {
ft.Tag = 'TongHasRom';
}
break;

default:
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 @@ -181,8 +181,8 @@ simulated static function CurrentVersion(optional out int major, optional out in
{
major=1;
minor=6;
patch=2;
build=2;//build can't be higher than 99
patch=3;
build=6;//build can't be higher than 99
}

simulated static function string VersionString(optional bool full)
Expand All @@ -195,7 +195,7 @@ simulated static function string VersionString(optional bool full)
function CheckConfig()
{
local int i;
if( ConfigOlderThan(1,6,0,5) ) {
if( ConfigOlderThan(1,6,3,2) ) {
// setup default difficulties
i=0;
#ifndef hx
Expand Down
22 changes: 19 additions & 3 deletions DXRModules/DeusEx/Classes/DXRMachines.uc
Original file line number Diff line number Diff line change
Expand Up @@ -407,14 +407,30 @@ function Actor SpawnBot(class<Actor> c, Name datacubeTag)
return a;
}
function Actor SpawnNewActor(class<Actor> c, optional vector target, optional float mindist, optional float maxdist)
function Actor _SpawnNewActor(class<Actor> c, optional vector target, optional float mindist, optional float maxdist)
{
local Actor a;
local vector loc;
loc = GetRandomPositionFine(target, mindist, maxdist);
a = Spawn(c,,, loc );
if( a == None ) warning("SpawnNewActor "$c$" failed at "$loc);
else if( ScriptedPawn(a) != None ) class'DXRNames'.static.GiveRandomName(dxr, ScriptedPawn(a) );
if( ScriptedPawn(a) != None ) class'DXRNames'.static.GiveRandomName(dxr, ScriptedPawn(a) );
if( a == None ) warning("_SpawnNewActor "$c$" failed at "$loc);
else info("_SpawnNewActor "$a$" at ("$loc$")");
return a;
}
function Actor SpawnNewActor(class<Actor> c, optional vector target, optional float mindist, optional float maxdist)
{
local Actor a;
local int i;
for(i=0; i<10; i++) {
a = _SpawnNewActor(c, target, mindist, maxdist);
if( a != None ) return a;
}
return a;
}
Expand Down
7 changes: 6 additions & 1 deletion DXRVanilla/DeusEx/Classes/MenuSelectDifficulty.uc
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,15 @@ function BindControls(bool writing, optional string action)

if(writing) {
if( action == "ADVANCED" ) NewGameSetup(difficulty);
else InvokeNewGameScreen(difficulty, InitDxr());
else _InvokeNewGameScreen(difficulty, InitDxr());
}
}

function InvokeNewGameScreen(float difficulty)
{
_InvokeNewGameScreen(difficulty, InitDxr());
}

function NewGameSetup(float difficulty)
{
local DXRMenuSetupRando newGame;
Expand Down
2 changes: 1 addition & 1 deletion DXRando/DeusEx/Classes/DXRMenuBase.uc
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ function DXRando InitDxr()
return dxr;
}

function InvokeNewGameScreen(float difficulty, DXRando dxr)
function _InvokeNewGameScreen(float difficulty, DXRando dxr)
{
local DXRMenuScreenNewGame newGame;

Expand Down
2 changes: 1 addition & 1 deletion DXRando/DeusEx/Classes/DXRMenuSetupRando.uc
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ function BindControls(bool writing, optional string action)
Slider(id, f.settings.max_weapon_shottime, 0, 300, writing);
id++;

if( action == "NEXT" ) InvokeNewGameScreen(combatDifficulty, InitDxr());
if( action == "NEXT" ) _InvokeNewGameScreen(combatDifficulty, InitDxr());
}

function SetDifficulty(float newDifficulty)
Expand Down
Binary file modified DeusEx.u
Binary file not shown.
2 changes: 1 addition & 1 deletion HXRandomizer.int
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[Public]
Object=(Name=HXRandomizer.HXRandoGameInfo,Class=Class,MetaClass=HX.HXGameInfo,Description="Deus Ex Randomizer HX")
Object=(Name=HXRandomizer.HXRandoGameInfo,Class=Class,MetaClass=HX.HXGameInfo,Description="Deus Ex Randomizer HX",GameName="HX Randomized Coop Game")
Binary file modified HXRandomizer.u
Binary file not shown.
2 changes: 1 addition & 1 deletion compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
print(repr(args))

if args.profile is None:
args.profile = "default"
args.profile = "all"

rerun = ""
while rerun != "exit":
Expand Down
5 changes: 3 additions & 2 deletions compiler/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ def run(args):
try:
with open('compiler_settings.json') as f:
settings = json.load(f)
except:
pass
except FileNotFoundError as e:
e.strerror += '\n\nERROR: You need to copy compiler_settings.example.json to compiler_settings.json and adjust the paths.'
raise

merged = default_settings
for p in settings:
Expand Down
10 changes: 10 additions & 0 deletions compiler_settings.example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"default": {
"source_path": "C:/Program Files (x86)/Steam/steamapps/common/Deus Ex Backup/",
"out_dir": "C:/Program Files (x86)/Steam/steamapps/common/Deus Ex/"
},
"hx": {
"source_path": "C:/Program Files (x86)/Steam/steamapps/common/Deus Ex HX Backup/",
"out_dir": "C:/Program Files (x86)/Steam/steamapps/common/Deus Ex HX/"
}
}

0 comments on commit 7ab084e

Please sign in to comment.