From a075faa8dd914a36ee0ebb8142c0bfd2dea403e4 Mon Sep 17 00:00:00 2001 From: Die4Ever Date: Sun, 27 Aug 2023 10:49:58 -0500 Subject: [PATCH] fixed datalink trigger interrupts? --- DXRVanilla/DeusEx/Classes/DataLinkPlay.uc | 83 +++++++++++++++++++++-- 1 file changed, 76 insertions(+), 7 deletions(-) diff --git a/DXRVanilla/DeusEx/Classes/DataLinkPlay.uc b/DXRVanilla/DeusEx/Classes/DataLinkPlay.uc index 651b4ed25..eedfc1a73 100644 --- a/DXRVanilla/DeusEx/Classes/DataLinkPlay.uc +++ b/DXRVanilla/DeusEx/Classes/DataLinkPlay.uc @@ -3,6 +3,8 @@ class DataLinkPlay injects DataLinkPlay; var transient float speechFastEndTime; var transient bool restarting; +var DatalinkTrigger dataLinkTriggerQueue[16]; + function bool PushDataLink( Conversation queueCon ) { // queue up the incoming message @@ -107,7 +109,7 @@ state WaitForSpeech // has finished. We want to play the next event. function Timer() { - dolog("Timer GotoState WaitForSpeech SpeechFinished"); + //dolog("Timer GotoState WaitForSpeech SpeechFinished"); GotoState( 'WaitForSpeech', 'SpeechFinished' ); } @@ -159,14 +161,14 @@ Begin: function Timer() { - dolog("start Timer"); + //dolog("start Timer"); Super.Timer(); - dolog("end Timer"); + //dolog("end Timer"); } function dolog(string m) { - log(self@con.conName@GetStateName()@m); + log(self@con.conName@GetStateName()@datalinkTrigger@datalinkTrigger.datalinkTag@m); } function SetInterruptedFlag() @@ -192,22 +194,89 @@ function SetPlayedFlag() function ActorDestroyed(Actor destroyedActor) { - dolog("ActorDestroyed" @ destroyedActor); + //dolog("ActorDestroyed" @ destroyedActor); Super.ActorDestroyed(destroyedActor); } function JumpToConversation( Conversation jumpCon, String startLabel ) { - dolog("JumpToConversation" @ jumpCon.conName @ startLabel); + //dolog("JumpToConversation" @ jumpCon.conName @ startLabel); Super.JumpToConversation(jumpCon, startLabel); } function EEventAction SetupEventSpeech( ConEventSpeech event, out String nextLabel ) { - dolog("SetupEventSpeech" @ event @ nextLabel); + //dolog("SetupEventSpeech" @ event @ nextLabel); return Super.SetupEventSpeech(event, nextLabel); } +/* +function Bool FireNextDataLink() +{ + local Bool bResult; + + dolog("FireNextDataLink"); + bResult = False; + + con = PopDataLink(); + startCon = con; + + if ( con != None ) + { + if(!StartConversation(player, invokeActor)) { + dolog("FireNextDataLink failed"); + InsertDataLink(con); + startCon = None; + con = None; + return false; + } + bResult = True; + } + + return bResult; +} +*/ + +function SetTrigger(DataLinkTrigger newDatalinkTrigger) +{ + local int i; + dolog("SetTrigger " $ newDatalinkTrigger); + /*Super.SetTrigger(newDatalinkTrigger); + + if(newDatalinkTrigger.datalinkTag == con.conName || newDatalinkTrigger.datalinkTag == startCon.conName) { + datalinkTrigger = newDatalinkTrigger; + return; + }*/ + + for(i=0; i