Openapoc: Alien Assault Ship cannot be targetted (or even hit)

Created on 3 Jan 2019  路  10Comments  路  Source: OpenApoc/OpenApoc

For some reason, the assault UFO cannot be targetted or hit by vehicles in the game
Shots go right through without damaging
The UFO cannot be selected or targeted
image

!BUG! MEDIUM PRIORITY Help Wanted Verified / Replicated

Most helpful comment

Usually they are still bugged, but today they worked. Here is a save of them just showing up, and I was able to shoot them down.
save_Ambushing UFO.zip

All 10 comments

save_SuperHuman 2.zip
Savegame attached, the alien assault ship cannot be targetted by any vehicle
(It was artificially crashed with debug command, but could not be targetted before this either)

Another instance of this problem, mid battle...
Interestingly the Griffon AFV does try to hit the assault ship, but cannot do so
save_SuperHuman 1B.zip

I found this today as well. My craft also didn't seem to hit it when shooting at it (after being left stationary).
save_Cant Target Assault UFO.zip

To add more: I crashed two of these with the debug command, but they still cannot be targeted and therefore a mission into them still cannot be done. This prevents further research for Retaliator and Annihilator.

this bug serious and can break gameplay .coz ufo appears in the game quite early and often. And this UFO is not even possible to destroy using debug Hotkeys !!!!

So it looks like the VehicleType voxelMapsLOS and voxelMaps generated by the dataextractor are completely empty....

Yeah, the extraction logic looks wrong:

In InitialGameStateExtractor::extractVehicles():

The v.loftemps_height of the assault ship is 16 - so as it's a 1x1x1 unit then the loftemps should completely fill the height of the unit (probably expected, as it appears visually "tall" while other UFOs tend to be thinner but wider).

That then means that the "freeSpace" variable is 0.

So "start" is set to (0+1)/2, truncated to 0.
and "end" is ((v.size_z * 16) - (freespace / 2 )) % 16
=((1 * 16) - (0 / 2)) % 16
=((16)-(0) )% 16
= 16 % 16
= 0

So when filling the voxel maps: (v.loftemps_index = 120), locStart = 0 and locEnd = 0, so none of the voxelMapsLOS or voxelMaps slices get filled in at all.

Usually they are still bugged, but today they worked. Here is a save of them just showing up, and I was able to shoot them down.
save_Ambushing UFO.zip

Thanks for the confirmation this has been fixed Paddywhacker
I'll confirm tomorrow myself (in bed atm) and close the issue accordingly

Thanks to JonnyH also for submitting the PR that appears to have sorted this out <3

Guess I'll close this then :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

FilmBoy84 picture FilmBoy84  路  3Comments

BeornTB picture BeornTB  路  3Comments

FilmBoy84 picture FilmBoy84  路  3Comments

emc2 picture emc2  路  3Comments

Quickmind01 picture Quickmind01  路  3Comments