Disable all g_dialogue-dependent ACS behaviour in netgame conditions

Actual solution to Test Run dialogue in servers
This commit is contained in:
toaster 2023-09-17 13:50:32 +01:00
parent e854ce53f5
commit 815e125188
2 changed files with 36 additions and 0 deletions

View file

@ -681,6 +681,12 @@ bool CallFunc_DialogueWaitDismiss(ACSVM::Thread *thread, const ACSVM::Word *argV
(void)argV; (void)argV;
(void)argC; (void)argC;
// TODO when we move away from g_dialogue
if (netgame)
{
return false;
}
g_dialogue.SetDismissable(true); g_dialogue.SetDismissable(true);
thread->state = { thread->state = {
@ -703,6 +709,12 @@ bool CallFunc_DialogueWaitText(ACSVM::Thread *thread, const ACSVM::Word *argV, A
(void)argV; (void)argV;
(void)argC; (void)argC;
// TODO when we move away from g_dialogue
if (netgame)
{
return false;
}
g_dialogue.SetDismissable(false); g_dialogue.SetDismissable(false);
thread->state = { thread->state = {
@ -1977,6 +1989,12 @@ bool CallFunc_DialogueSetSpeaker(ACSVM::Thread *thread, const ACSVM::Word *argV,
(void)argC; (void)argC;
// TODO when we move away from g_dialogue
if (netgame)
{
return false;
}
map = thread->scopeMap; map = thread->scopeMap;
skinStr = map->getString(argV[0]); skinStr = map->getString(argV[0]);
@ -2015,6 +2033,12 @@ bool CallFunc_DialogueSetCustomSpeaker(ACSVM::Thread *thread, const ACSVM::Word
(void)argC; (void)argC;
// TODO when we move away from g_dialogue
if (netgame)
{
return false;
}
map = thread->scopeMap; map = thread->scopeMap;
nametagStr = map->getString(argV[0]); nametagStr = map->getString(argV[0]);
@ -2096,6 +2120,12 @@ bool CallFunc_DialogueNewText(ACSVM::Thread *thread, const ACSVM::Word *argV, AC
(void)argC; (void)argC;
// TODO when we move away from g_dialogue
if (netgame)
{
return false;
}
map = thread->scopeMap; map = thread->scopeMap;
textStr = map->getString(argV[0]); textStr = map->getString(argV[0]);

View file

@ -301,6 +301,12 @@ bool Environment::checkTag(ACSVM::Word type, ACSVM::Word tag)
case ACS_TAGTYPE_DIALOGUE: case ACS_TAGTYPE_DIALOGUE:
{ {
// TODO when we move away from g_dialogue
if (netgame)
{
return true;
}
if (tag == 0) // cheeky reuse if (tag == 0) // cheeky reuse
{ {
// wait for dismissal // wait for dismissal