project-navigation
Personal tools

Author Topic: Infrared glasses don't work !!!  (Read 6956 times)

Offline anonymissimus

  • Sergeant
  • *****
  • Posts: 347
    • View Profile
Infrared glasses don't work !!!
« on: April 30, 2014, 09:45:09 pm »
I think I never spotted an enemy so far with them. Their range at least hasn't changed.
I just had a situation where I really should have seen the enemy. A unit of mine got killed on the other side of a wall (standing alone without reaction fire...my fault) and the next turn the suicidal kerrblade runner immediately came around the corner, as expected (and died from reaction fire), so it really still was around the position where my dead unit was. I looked several times with infrared glasses, there was only one thin wall and my dead unit short way on the other side. So there's something wrong here or am I missing something ?
The unit was a Taman, just in case non-infrared visible units exist, but even blood spiders are, despite being fully robotic.

ufoai 2.5 amd 64
self compiled from git@5a41b99e06e942608d48b63914df4d2dc5076ae7
ubuntu precise
« Last Edit: May 21, 2014, 07:06:35 pm by anonymissimus »

Offline anonymissimus

  • Sergeant
  • *****
  • Posts: 347
    • View Profile
Re: Infrared glasses don't work !!!
« Reply #1 on: May 21, 2014, 07:23:30 pm »
Okay, so I'm sure that I'm right about this now.
What really confuses me is why nobody discovered or reported this huge issue previously though ?! Is it so hard to arrange situations where you should see units ?
Fixing this bug will greatly reduce difficulty in 2.5 again, which everyone complains about, as these IR goggles are the main way of knowing that an enemy is about to ambush you, so that you can kill it before it's got a chance to kill you, or flee, or prepare for the ambush.
Attached is a save with one of the harvester missions - as it's not possible to save during missions, a more deterministic way of reproduction is not possible. On this particular map, in 2.4, it was so that most or all of the enemies stayed in the UFO, and one could look into it with IR goggles to detect positions, weapons, their number and so on, before luring them out one-by-one or in small groups. It does no longer work that well, but I very likely should have seen that one Taman that was still in the UFO.

Offline MonkeyHead

  • Squad Leader
  • ****
  • Posts: 127
    • View Profile
Re: Infrared glasses don't work !!!
« Reply #2 on: May 21, 2014, 11:25:32 pm »
FWIW, I can say that this is not an issue in 2.6 - enemies are spottable from behind cover and through single walls if you are "close" when you activate the IR goggles, or move to within a short range which I have not really determined - this is most useful before breaching buildings/UFO's through doors or before going down stairs, for fairly obvious reasons, or in forward CQ units acting as spotters for troops armed with coil guns and bolter rifles. So, yeah, they seem to work as intended in 2.6

Offline anonymissimus

  • Sergeant
  • *****
  • Posts: 347
    • View Profile
Re: Infrared glasses don't work !!!
« Reply #3 on: May 22, 2014, 01:05:34 am »
Okay...then I speculate that there's something that depends on my particular circumstances (UI settings, perhaps ? Should I post the config.cfg ?) or something about the way I'm doing this seems wrong. Have there been changes to the way IR goggles work or are used since 2.4 ?

EDIT
Well, they don't work for me in 2.6 as well. I tested it on an africa_small skirmish. Stood directly besides one of the huts, looked into it with the glasses: nothing. Then moved into it with another unit in the same turn to look, guess what: a civilian. Arranging basically the same works in 2.4, and I was even farther away when using the glasses. And I used an unmodified settings file, except for no fullscreen.
It is necessary to regenerate the map a few times until you discover actually a civilian in the hut you previously inspected with the glasses, and until a suitable hut is near enough to your starting position, and you also need to make sure that you certainly should have seen any unit in the hut (look more than once with the glasses in different directions, with several units perhaps).
« Last Edit: May 22, 2014, 03:03:03 am by anonymissimus »

Offline MonkeyHead

  • Squad Leader
  • ****
  • Posts: 127
    • View Profile
Re: Infrared glasses don't work !!!
« Reply #4 on: May 22, 2014, 11:31:51 pm »
Hmm. I have to say that I have only ever spotted aliens with the IR goggles, not civvies. Maybe something is up there. It is fairly rare for the enemy to start near you and in cover. Near you, yes, but probably in full vision (if they arent the other side of the map). As a result, by the time they come into what I think is the range for IR detection they are probably not hidden all that well.

Offline anonymissimus

  • Sergeant
  • *****
  • Posts: 347
    • View Profile
Re: Infrared glasses don't work !!!
« Reply #5 on: May 23, 2014, 01:04:27 am »
All right.
I have just managed to get them working in 2.5 for the first time, perhaps because I used a debug build (which means building with debugging symbols I suppose/hope ?)
Previously to that, I checked out the 2.4 branch, in the resulting self-built binary they didn't work for me, albeit in the 2.4 version I got from the repository they always worked.
Thus I now think that undefined behavior of some sort must be involved, which leads to them randomly working or not working. This also quickly explains why they happen to work for MonkeyHead and why none reported it yet.

Is it supposed to depend somehow on the build configuration such as whether uforadiant is build ? it doesn't make sense to me, but just in case. That's one of the things I changed during my trials.

EDIT
Yes, I can toggle in 2.5 between not working and working by using ./configure --enable-release or just ./configure (then it builds with debug). Clearly UB.
« Last Edit: May 23, 2014, 01:38:25 am by anonymissimus »

Offline DarkRain

  • Project Coder
  • Captain
  • ***
  • Posts: 746
    • View Profile
Re: Infrared glasses don't work !!!
« Reply #6 on: May 25, 2014, 11:37:53 pm »
Yes, I can confirm, furthermore: As they're implemented IR Googles shouldn't work, but the trace function returns incorrect values in *both* release and dev builds, but only in dev builds that makes the ir googles work purely by accident
Unfortunately I'm not very (read: 'at all') familiar with the tracing code...

Offline Duke

  • Administrator
  • PHALANX veteran
  • *****
  • Posts: 1037
    • View Profile
Re: Infrared glasses don't work !!!
« Reply #7 on: May 26, 2014, 12:57:53 pm »
DarkRain, which trace (src, line) do you mean in particular ?
Thought it was a rendering issue.

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Infrared glasses don't work !!!
« Reply #8 on: May 26, 2014, 06:32:15 pm »
can you define the accident a little bit more?

Offline DarkRain

  • Project Coder
  • Captain
  • ***
  • Posts: 746
    • View Profile
Re: Infrared glasses don't work !!!
« Reply #9 on: May 26, 2014, 09:32:23 pm »
I'm talking about the call to G_Trace in g_combat.cpp:927, I put some more details in the tracker...

Anyway, upon further investigation it seems that the tracing code isn't at fault, but the start and end vectors get mangled before they are passed to G_Trace haven't had the chance to look more into it

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools

Offline DarkRain

  • Project Coder
  • Captain
  • ***
  • Posts: 746
    • View Profile
Re: Infrared glasses don't work !!!
« Reply #11 on: May 31, 2014, 04:06:55 am »
commit 03f2e00 should fix this one

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Infrared glasses don't work !!!
« Reply #12 on: May 31, 2014, 02:55:21 pm »
cool. can you maybe also backport that to 2.5?

Offline anonymissimus

  • Sergeant
  • *****
  • Posts: 347
    • View Profile
Re: Infrared glasses don't work !!!
« Reply #13 on: May 31, 2014, 04:30:08 pm »
commit 03f2e00 should fix this one
Confirmed that they work in a release built on 2.5 for me now.

Offline DarkRain

  • Project Coder
  • Captain
  • ***
  • Posts: 746
    • View Profile
Re: Infrared glasses don't work !!!
« Reply #14 on: May 31, 2014, 05:46:12 pm »
@Mattn: Already done, in fact 03f2e00 is in the 2.5 branch, b99ad9e is the one in master

@anonymissimus: Cool, and thanks for your report