Author Topic: [DONE] [Feedback] No line of fire indicator  (Read 4819 times)

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8616
    • View Profile
[DONE] [Feedback] No line of fire indicator
« on: July 04, 2018, 12:26:56 pm »
http://volutar.myds.me/patches.html I think OXCE would greatly benefit from those :)

oh man, that no LoF indicator would be amazing.

So, I looked into this... the main idea is pretty simple and elegant, there are however some serious bugs in volutar's implementation:

1/ not all calls of TileEngine.canTargetUnit() were updated (specifically in AIModule)... so AI is basically broken with wrong parameters being passed

2/ not all places in Map.drawTerrain() were updated... the objects are not always highlighted when causing no LOF

3/ targeting empty tiles (without any parts) is slightly broken, in special cases

4/ highlighting no LOF tiles when targeting empty tiles doesn't work at all (e.g. when shooting out from skyranger into air on 2nd level through skyranger walls)... although there are comments in the code that it was specifically implemented... it wasn't... or was forgotten in the middle of the implementation... or maybe it depends on other commits?

5/ there's a change in handling arcing shots, which may have unwanted side-effects... I am not 100% sure here, I will have to discuss with Warboy... I will probably just remove it, not sure what its purpose is supposed to be

6/ uninitialized variable when shooting into darkness

PS: also no idea what patch format was used, but my git could not import anything (after trying really hard)... I had to rewrite the whole code manually :/
« Last Edit: August 03, 2018, 12:33:33 pm by Meridian »

KZad Bhat

  • Guest
Re: No line of fire indicator
« Reply #1 on: July 04, 2018, 02:55:49 pm »
If this was meant to deal with the no line of fire issue when an obvious line of fire is most definitely there, I've thought of a procedure that could help with direct firing.

You could define 8 points, one in each corner of the target box, that define the hit box, and draw a line from each of those 8 points of the shooter to the 8 points of their target. The will not only be a less troublesome way of determining if there really is a line of fire, but also gives a built in cover mechanic. Each line that strikes a barrier adds some cover to the target. This would also add to the visual cover of darkness. As it gets darker, fewer lines need to be blocked in order to make the target non-visible to the shooter.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8616
    • View Profile
Re: No line of fire indicator
« Reply #2 on: July 04, 2018, 03:01:02 pm »
This was meant to highlight an obstacle that is in the way.

I am not changing the vanilla targeting mechanics, ever.
Same reason as here: https://openxcom.org/forum/index.php/topic,3413.msg41489.html#msg41489

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8616
    • View Profile
Re: [WIP] [Feedback] No line of fire indicator
« Reply #3 on: July 31, 2018, 04:19:06 pm »
.

Offline Nord

  • Commander
  • *****
  • Posts: 1637
  • The Gate is open.
    • View Profile
Re: [WIP] [Feedback] No line of fire indicator
« Reply #4 on: July 31, 2018, 05:22:55 pm »
I dont know what to say...
From one side, it will greatly improve UI.
But from other - it will greatly decrease level of realism, or, to say correctly, immersion.
I think however each one can decide - to use this, or not.

Offline Yankes

  • Commander
  • *****
  • Posts: 3207
    • View Profile
Re: [WIP] [Feedback] No line of fire indicator
« Reply #5 on: August 01, 2018, 01:01:52 am »
I dont know what to say...
From one side, it will greatly improve UI.
But from other - it will greatly decrease level of realism, or, to say correctly, immersion.
I think however each one can decide - to use this, or not.
"Shoot alien A!"
"Sorry Sir, I do not see him!"
"Why?"
"Wall block LoF"
"What wall? you should see him!"
"This wall" (wall blip)
"Oh... I see..."

Offline Ethereal

  • Commander
  • *****
  • Posts: 625
    • View Profile
Re: [WIP] [Feedback] No line of fire indicator
« Reply #6 on: August 01, 2018, 02:35:50 am »
I only have one question, how will it work with "forceFire: true"?

Offline Nord

  • Commander
  • *****
  • Posts: 1637
  • The Gate is open.
    • View Profile
Re: [WIP] [Feedback] No line of fire indicator
« Reply #7 on: August 01, 2018, 05:10:04 am »
I only have one question, how will it work with "forceFire: true"?
Kaboom! Blinkin wall destroyed.

Offline Ethereal

  • Commander
  • *****
  • Posts: 625
    • View Profile
Re: [WIP] [Feedback] No line of fire indicator
« Reply #8 on: August 01, 2018, 08:35:04 am »
Kaboom! Blinkin wall destroyed.

Yep! And still it is possible to calculate whether it is worth shooting - whether there will be enough charges and action points to get the opponent? This is great!

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8616
    • View Profile
Re: [WIP] [Feedback] No line of fire indicator
« Reply #9 on: August 01, 2018, 08:40:06 am »
There will be no blinking at force fire (ctrl+click)... LOF checks are not done.

And also without it, only first obstacles(s) are highlighted.
E.g. if you shoot via 2 walls, only the first will blink.

Offline new_civilian

  • Commander
  • *****
  • Posts: 725
    • View Profile
Re: [DONE] [Feedback] No line of fire indicator
« Reply #10 on: August 03, 2018, 12:43:35 pm »
I like that feature! And high-lighting the first obstacle is enough, usually one can destroy only one wall anyway when firing, so it is no problem at all.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8616
    • View Profile
Re: [DONE] [Feedback] No line of fire indicator
« Reply #11 on: November 19, 2018, 02:22:07 pm »
This is now also available in OXC... fingers crossed.