Author Topic: [Confirm Fix] Double dealing end turn  (Read 1685 times)

ushas

  • Hero Member
  • *****
  • Posts: 661
[Confirm Fix] Double dealing end turn
« on: July 13, 2017, 10:15:22 PM »
(v17, linux)

Problem: Sometimes more enemies move at once, even stand on the same tile during that phase. Then some of them can act the 2nd time. Or it looks like an ally skipped a turn. Also saw units in a looped run animation between turns.

How to reproduce: Easiest is probably the initial mission. Or an ally mission. But it's reproducible on others too.
1) Start movement to the farthest point possible (so it will auto end turn once the unit gets there, not sure if necessary)
2) During the movement phase click on End Turn button (several times might be more sure)
3) Voila, if done well (aka clicked furiously enough) you can see enemies pulling this cheat.

Another option is to use the end turn key during (2). Perhaps more than once. That way I also managed to lock in endless animation two allies in a row, see attached picture. It doesn't break their next turn though.

On the initial mission with Sam + 2 churchers the usual scenario is both foes moving at once and then each having also normal turn on top of that, before I can get to Sam. It doesn't happen always that way with different configuration.

Speculations:
-- Perhaps there is some window of opportunity when the game remembers one or more of those turn ending commands (together with the auto end turn). So it might happen or look like that it skips our next turn.
-- Perhaps there is some [end turn - move] connection or so, as so far I've seen this happen only if there was movement to be done (in case of enemies if they were to move). But that can be simply an effect of perception.
 

PS: For a brief moment I really thought that you were implementing all those suggestions from the beginning of the pacing thread  ;D This one, for a change, sometimes looks like the pre-calculation Nomad requested - as it often happens on initial turns of the battle, more enemies at once closing up... Then I recalled seeing this during v16 too.

In other words, any sufficiently advanced bug... 8)
« Last Edit: July 26, 2017, 09:12:04 AM by Daithi »

ushas

  • Hero Member
  • *****
  • Posts: 661
Re: [Fix Req] Double dealing end turn
« Reply #1 on: July 15, 2017, 01:04:58 PM »
Seems like the shortcut lets me end the turn in the middle of the movement and easily bugs allies (the animation loop), whereas the button is more like locked and I usually see finishing the move till the last tile and then enemies can be bugged. Maybe there is some brief period in the beginning as mouse-traveling takes time. Or simply more things at play.
-> The takeaway is that the key and the button are somehow different.

If it helps anything, when an ally in a running loop happen this is in the log:
Code: [Select]
BattleControlScript.EndCharacterTurn. Player. Can turn be ended: False
BattleControlScript.EndCharacterTurn. Can end turn: False
NullReferenceException: Object reference not set to an instance of an object
  at CharacterMovementScript.HandleMovement () [0x00000] in <filename unknown>:0
  at CharacterMovementScript.Update () [0x00000] in <filename unknown>:0


As for can-desynchronize-queue missions + prematurely ordering end turn (key & button), no bleeding nor fire used:
-- on the bank robbery it didn't have any desynchronizing impact on the queue.
-- on the blackmail mission the queue ended up desynchronized, but I doubt this was the cause
-> The preliminary conclusion is inconclusive


Unrelated suggestion: would be viable to add a toggle in the options menu for the turn auto-ending? I would prefer to have it all manual. 

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1249
Re: [Fix Req] Double dealing end turn
« Reply #2 on: July 17, 2017, 09:03:26 AM »
Good info. I'll probably tackle this one first thing in V19 - it will give me a bit more time to catch any resulting errors (like end turn being locked) before releasing a version.

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1249
Re: [Fix Req] Double dealing end turn
« Reply #3 on: July 26, 2017, 09:05:36 AM »
Fixed issue with button & click. Will leave this as a confirm fix.

ushas

  • Hero Member
  • *****
  • Posts: 661
Re: [Confirm Fix] Double dealing end turn
« Reply #4 on: July 26, 2017, 03:57:46 PM »
Perhaps move the last one into a new thread then? That wasn't caused by me clicking on end turn or using the key, happened after the enemy was interrupted in overwatch. But it's possible I've overlooked something with end-turning.