keeperfx icon indicating copy to clipboard operation
keeperfx copied to clipboard

Non-dynamic lights are off-center

Open Loobinex opened this issue 1 year ago • 2 comments

Bug has been there since the original game: image

KeeperFX with a non-dynamic light: image

KeeperFX with a dynamic light: image

Notice the non-dynamic lights display to the north-west(always, independent of camera location).

Loobinex avatar Nov 24 '23 18:11 Loobinex

https://github.com/dkfans/keeperfx/blob/master/src/light_data.c#L754

It would seem that these values are wrong.

Dynamic lights calculate the diagonal length to determine lighting. Static lights take them from the last field in this array.

AdamPlenty avatar Nov 25 '23 08:11 AdamPlenty

hmm in the original game those values were calculated, but since we couldn't get the rewritten version to work properly, and it always calculated the same table anyways, we just took the output and put it into that table directly instead of calculating it

PieterVdc avatar Nov 26 '23 21:11 PieterVdc