aliens

Author Topic: [FIXED] Turn with zero cost by cancelling a move  (Read 1503 times)

Offline karadoc

  • Colonel
  • ****
  • Posts: 232
    • View Profile
[FIXED] Turn with zero cost by cancelling a move
« on: April 22, 2024, 11:04:44 am »
It is possible to make a unit turn around without paying any TU cost for turning. You can do this by clicking to move in a direction you want to face, but then immediately right-clicking to cancel the move. So that's left-click once to select a movement path anywhere in the direction you want to face, then left-click again to confirm the move followed immediately by right-click to cancel. The left and right click should be almost at the same time, with as little gap as you can manage.

This doesn't work for a single click of rotation (i.e. 45 degrees), because in that case the unit will take a step before the move is cancelled. But it does work for any turn larger that that. You can make the unit turn around on the spot without them taking the first step of the move and without paying any time units. (And if you do want to only turn 1 click, you can just turn to face the other direction, then turn back again.)

It doesn't seem to work for 2x2 units. I've only been able to do it for normal size units.

From what I understand, this is likely to be a OXC bug also - but I don't have OXC currently so I haven't checked to confirm.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9393
    • View Profile
Re: Turn with zero cost by cancelling a move
« Reply #1 on: April 22, 2024, 11:17:38 am »
I can fix this by removing the "cancel movement" feature... but I guess you will not like that.

PS: the turning cost is really zero while moving, so I can't change that

Offline karadoc

  • Colonel
  • ****
  • Posts: 232
    • View Profile
Re: Turn with zero cost by cancelling a move
« Reply #2 on: April 22, 2024, 11:27:53 am »
No. I think completely removing the cancel move would be bad. But I think making the first step uncancelable would be a good fix.

I haven't checked the code myself, but I'm a bit curious as to why the exploit doesn't work for 2x2 units. There might be another idea for a fix there too.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9393
    • View Profile
Re: [FIXED] Turn with zero cost by cancelling a move
« Reply #3 on: February 15, 2025, 12:54:07 pm »

Offline Delian

  • Commander
  • *****
  • Posts: 645
    • View Profile
Re: [FIXED] Turn with zero cost by cancelling a move
« Reply #4 on: February 15, 2025, 01:05:04 pm »
This solution makes my gameplay experience worse. Could the early cancel, instead of it being ignored, instead be delayed to happen after 1 tile has been traversed?
« Last Edit: February 15, 2025, 02:10:46 pm by Delian »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9393
    • View Profile
Re: [FIXED] Turn with zero cost by cancelling a move
« Reply #5 on: February 15, 2025, 01:52:49 pm »
Can you describe your gameplay a bit more precisely?


I had to decrease xcom movement speed to minimum and try really hard to use LMB and RMB simultaneously to even reproduce the issue.
I can't see how anyone would perform this without specifically aiming for the bug abuse.
The human reaction time (realizing you made a mistake + using the RMB) is higher than the time it takes before the unit makes a first step.

Offline Delian

  • Commander
  • *****
  • Posts: 645
    • View Profile
Re: [FIXED] Turn with zero cost by cancelling a move
« Reply #6 on: February 15, 2025, 02:09:32 pm »
I play with medium player movement speed. Because the movement is slow, it's easy for me to cancel the movement even on the first step. I often make 1-tile running steps, so instead of turning, I do the move+free turn, to save on TU. There's no human reaction time involved if you know in advance that you'll gonna cancel the move. However, due to this change it becomes uncertain whether the 1-step cancel will work or not, and it forces me to smash RMB multiple times just to be sure it was cancelled.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9393
    • View Profile
Re: [FIXED] Turn with zero cost by cancelling a move
« Reply #7 on: February 15, 2025, 02:25:28 pm »
So basically you found yet another abuse of the cancel move feature, to perform an (unsupported) 1-tile run.

Well, two bugs fixed with one stone, right?

Offline Delian

  • Commander
  • *****
  • Posts: 645
    • View Profile
Re: [FIXED] Turn with zero cost by cancelling a move
« Reply #8 on: February 15, 2025, 03:41:18 pm »
Ctrl for 1-tile distances is reserved for straffing so... I dunno why they couldn't use shift for running and ctrl for straffing.

https://github.com/Delian0/OpenXcom/commit/b53a4fc00a9e993ffd30a808e994c3f996ea1cc2

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3425
    • View Profile
Re: [FIXED] Turn with zero cost by cancelling a move
« Reply #9 on: February 15, 2025, 03:43:44 pm »
But this is bit "exploit" as running should be for at least 2 tiles, at least this was intention if I recall correclty

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9393
    • View Profile
Re: [FIXED] Turn with zero cost by cancelling a move
« Reply #10 on: February 15, 2025, 03:48:25 pm »
I've added one tile running using ctrl+alt+click, so that you don't have to break your fingers performing the cancel maneuver.
Also, so that Androiders don't moan we discriminate them.

https://github.com/MeridianOXC/OpenXcom/commit/72dc1bc6ac733bab4c4ac056efc21df3014629b4

Try to not talk about this too much (for your own good).
If this evolves into a drama between one tile runners and one tile walkers, I will be on the side of the one tile walkers and one tile running will disappear for good.

Ctrl for 1-tile distances is reserved for straffing so... I dunno why they couldn't use shift for running and ctrl for straffing.

They could, probably they didn't want to.

Offline Delian

  • Commander
  • *****
  • Posts: 645
    • View Profile
Re: [FIXED] Turn with zero cost by cancelling a move
« Reply #11 on: February 15, 2025, 03:59:50 pm »
Thanks a lot!