Skip to content

Commit

Permalink
Merge pull request #656 from Die4Ever/develop
Browse files Browse the repository at this point in the history
v2.6.1 Hotfix
  • Loading branch information
Die4Ever authored Mar 24, 2024
2 parents 0794f5c + fb406fb commit 437afda
Show file tree
Hide file tree
Showing 12 changed files with 194 additions and 99 deletions.
4 changes: 2 additions & 2 deletions DXRCore/DeusEx/Classes/DXRVersion.uc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ simulated static function CurrentVersion(optional out int major, optional out in
{
major=2;
minor=6;
patch=0;
build=6;//build can't be higher than 99
patch=1;
build=1;//build can't be higher than 99
}

simulated static function bool VersionIsStable()
Expand Down
4 changes: 2 additions & 2 deletions DXRMissions/DeusEx/Classes/DXRMissionsVandenberg.uc
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ function AfterMoveGoalToLocation(Goal g, GoalLocation Loc)
else if (g.name=="Backup Power Keypad") {
GlowUp(g.actors[0].a, 255);
}
else if (g.name=="Missile Computer" && Loc.name != "Computer Room") {
else if (g.name=="Launch Control Computer" && Loc.name != "Control Room") {
foreach AllActors(class'#var(prefix)DataLinkTrigger', dt) {
if(dt.name=='DataLinkTrigger1' || dt.name=='DataLinkTrigger6') {
dt.Destroy();
Expand All @@ -361,7 +361,7 @@ function AfterMoveGoalToLocation(Goal g, GoalLocation Loc)
}
}

if (g.name=="Missile Computer") {
if (g.name=="Launch Control Computer") {
g.actors[1].a.Tag = 'klax'; // trigger the DataLinkTrigger immediately
foreach AllActors(class'#var(DeusExPrefix)Mover', door, 'computerdoors') {
door.MoverEncroachType = ME_IgnoreWhenEncroach;
Expand Down
8 changes: 5 additions & 3 deletions DXRModules/DeusEx/Classes/DXREvents.uc
Original file line number Diff line number Diff line change
Expand Up @@ -2789,6 +2789,8 @@ function ExtendedTests()
local string helpText;
local int i;

Super.ExtendedTests();

//Make sure all bingo goals have help text
for (i=0;i<ArrayCount(bingo_options);i++){
if (bingo_options[i].event!=""){
Expand Down Expand Up @@ -2889,7 +2891,7 @@ defaultproperties
bingo_options(76)=(event="Greasel_ClassDead",desc="Kill %s Greasels",max=5,missions=50272)
bingo_options(77)=(event="support1",desc="Blow up a gas station",max=1,missions=4096)
bingo_options(78)=(event="UNATCOTroop_ClassDead",desc="Kill %s UNATCO Troopers",max=15,missions=318)
bingo_options(79)=(event="Terrorist_ClassDead",desc="Kill %s NSF Terrorists",max=15,missions=62)
bingo_options(79)=(event="Terrorist_ClassDead",desc="Kill %s NSF Terrorists",max=15,missions=46)
bingo_options(80)=(event="MJ12Troop_ClassDead",desc="Kill %s MJ12 Troopers",max=25,missions=57188)
bingo_options(81)=(event="MJ12Commando_ClassDead",desc="Kill %s MJ12 Commandos",max=10,missions=56384)
bingo_options(82)=(event="Karkian_ClassDead",desc="Kill %s Karkians",max=5,missions=49248)
Expand All @@ -2902,7 +2904,7 @@ defaultproperties
bingo_options(89)=(event="HumanStompDeath",desc="Stomp %s humans to death",max=3)
bingo_options(90)=(event="Rat_ClassDead",desc="Kill %s rats",max=30,missions=53118)
bingo_options(91)=(event="UNATCOTroop_ClassUnconscious",desc="Knock out %s UNATCO Troopers",max=15,missions=318)
bingo_options(92)=(event="Terrorist_ClassUnconscious",desc="Knock out %s NSF Terrorists",max=15,missions=62)
bingo_options(92)=(event="Terrorist_ClassUnconscious",desc="Knock out %s NSF Terrorists",max=15,missions=46)
bingo_options(93)=(event="MJ12Troop_ClassUnconscious",desc="Knock out %s MJ12 Troopers",max=25,missions=57204)
bingo_options(94)=(event="MJ12Commando_ClassUnconscious",desc="Knock out %s MJ12 Commandos",max=2,missions=56384)
bingo_options(95)=(event="purge",desc="Release the gas in the MJ12 Helibase",max=1,missions=64)
Expand Down Expand Up @@ -3026,7 +3028,7 @@ defaultproperties
bingo_options(200)=(event="FlowersForTheLab",desc="Bring some flowers to brighten up the lab",max=1,missions=64)
bingo_options(201)=(event="BurnTrash",desc="Burn %s bags of trash",max=25,missions=57182)
bingo_options(202)=(event="M07MeetJaime_Played",desc="Meet Jaime in Hong Kong",max=1,missions=96)
bingo_options(203)=(event="Terrorist_peeptime",desc="Watch Terrorists for %s seconds",max=30,missions=62)
bingo_options(203)=(event="Terrorist_peeptime",desc="Watch Terrorists for %s seconds",max=30,missions=46)
bingo_options(204)=(event="UNATCOTroop_peeptime",desc="Watch UNATCO Troopers for %s seconds",max=30,missions=318)
bingo_options(205)=(event="MJ12Troop_peeptime",desc="Watch MJ12 Troopers for %s seconds",max=30,missions=57204)
bingo_options(206)=(event="MJ12Commando_peeptime",desc="Watch MJ12 Commandos for %s seconds",max=15,missions=56384)
Expand Down
63 changes: 49 additions & 14 deletions DXRModules/DeusEx/Classes/DXREventsBase.uc
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,7 @@ simulated function PlayerAnyEntry(#var(PlayerPawn) player)
CheckBingoWin(dxr,data.NumberOfBingos());
} else {
SetGlobalSeed("bingo"$dxr.flags.bingoBoardRoll);
_CreateBingoBoard(data);
_CreateBingoBoard(data, dxr.flags.settings.starting_map, dxr.flags.bingo_duration);
}
}

Expand All @@ -952,22 +952,23 @@ simulated function CreateBingoBoard()
dxr.flags.SaveFlags();
SetGlobalSeed("bingo"$dxr.flags.bingoBoardRoll);
data = class'PlayerDataItem'.static.GiveItem(player());
_CreateBingoBoard(data);
_CreateBingoBoard(data, dxr.flags.settings.starting_map, dxr.flags.bingo_duration);
}

simulated function _CreateBingoBoard(PlayerDataItem data)
simulated function _CreateBingoBoard(PlayerDataItem data, int starting_map, int bingo_duration, optional bool bTest)
{
local int x, y, i;
local string event, desc;
local int progress, max, missions, starting_mission_mask, starting_mission, end_mission_mask, end_mission, maybe_mission_mask, masked_missions;
local int progress, max, missions, starting_mission_mask, starting_mission, end_mission_mask, end_mission, maybe_mission_mask, masked_missions, maybe_masked_missions;
local int options[ArrayCount(bingo_options)], num_options, slot, free_spaces;
local bool bPossible;
local float f;

starting_mission = class'DXRStartMap'.static.GetStartMapMission(dxr.flags.settings.starting_map);
starting_mission_mask = class'DXRStartMap'.static.GetStartingMissionMask(dxr.flags.settings.starting_map);
maybe_mission_mask = class'DXRStartMap'.static.GetMaybeMissionMask(dxr.flags.settings.starting_map);
if (dxr.flags.bingo_duration!=0){
end_mission = starting_mission+dxr.flags.bingo_duration-1; //The same mission is the first mission
starting_mission = class'DXRStartMap'.static.GetStartMapMission(starting_map);
starting_mission_mask = class'DXRStartMap'.static.GetStartingMissionMask(starting_map);
maybe_mission_mask = class'DXRStartMap'.static.GetMaybeMissionMask(starting_map);
if (bingo_duration!=0){
end_mission = starting_mission + bingo_duration - 1; //The same mission is the first mission

//Missions 7 and 13 don't exist, so don't count them
if (starting_mission<7 && end_mission>=7){
Expand All @@ -984,20 +985,41 @@ simulated function _CreateBingoBoard(PlayerDataItem data)
num_options = 0;
for(x=0; x<ArrayCount(bingo_options); x++) {
if(bingo_options[x].event == "") continue;
masked_missions = bingo_options[x].missions & maybe_mission_mask;
if(masked_missions != 0) { // maybe?
if(class'DXRStartMap'.static.BingoGoalPossible(bingo_options[x].event,dxr.flags.settings.starting_map,end_mission)) {
maybe_masked_missions = bingo_options[x].missions & maybe_mission_mask;
masked_missions = bingo_options[x].missions & starting_mission_mask & end_mission_mask;
if(maybe_masked_missions != 0 && masked_missions == 0) { // maybe?
bPossible = class'DXRStartMap'.static.BingoGoalPossible(bingo_options[x].event,starting_map,end_mission);
if(bTest) {
l("Maybe BingoGoalPossible " $ bingo_options[x].event @ bPossible @ starting_map @ end_mission);
}
if(bPossible) {
options[num_options++] = x;
continue;
}
}
masked_missions = bingo_options[x].missions & starting_mission_mask & end_mission_mask;
if(bingo_options[x].missions!=0 && masked_missions == 0) continue;
if(class'DXRStartMap'.static.BingoGoalImpossible(bingo_options[x].event,dxr.flags.settings.starting_map,end_mission)) continue;
if(class'DXRStartMap'.static.BingoGoalImpossible(bingo_options[x].event,starting_map,end_mission)) {
if(bTest) {
l("BingoGoalImpossible " $ bingo_options[x].event @ starting_map @ end_mission);
}
continue;
}
options[num_options++] = x;
}

l("_CreateBingoBoard found " $ num_options $ " options");
if(bTest) {
l("starting_mission == " $ starting_mission $ ", end_mission == " $ end_mission);
l("starting_mission_mask == " $ starting_mission_mask $ ", end_mission_mask == " $ end_mission_mask $ ", maybe_mission_mask == " $ maybe_mission_mask);
l( "#" $ starting_map @ class'DXRStartMap'.static.GetStartingMapNameCredits(starting_map) @ "(" $ bingo_duration @ end_mission $ ") " $ num_options $ " possible bingo goals" );
for(x=0; x<num_options; x++) {
i = options[x];
l( " " $ bingo_options[i].event $ " - " $ bingo_options[i].desc );
}
test(num_options > 50, "_CreateBingoBoard more than 50 options for " $ starting_map);
l("----------------------------------");
return;
}

for(x=0; x<ArrayCount(mutually_exclusive); x++) {
if(mutually_exclusive[x].e1 == "") continue;
Expand Down Expand Up @@ -1263,6 +1285,19 @@ function RunTests()
testint(BingoActiveMission(3, (1<<15)), 0, "BingoActiveMission false");
}

function ExtendedTests()
{
local int i;
local string mapName, friendlyName;

for(i=0; i<160; i++) {
mapName = class'DXRStartMap'.static._GetStartMap(i, friendlyName);
if(friendlyName == "") continue;
l( "#" $ i @ friendlyName @ mapName $ " bingo goals test:" );
_CreateBingoBoard(None, i, 1, true);
}
}

defaultproperties
{
bingo_win_countdown=-1
Expand Down
Loading

0 comments on commit 437afda

Please sign in to comment.