noxworld-dev / opennox

OpenNox main repository.
GNU General Public License v3.0
458 stars 25 forks source link

Archer on the route to Stravas misses his shot on the explosive barrel #658

Closed comradeshook closed 8 months ago

comradeshook commented 8 months ago

nox3

As per title, this annoying asshole misses his initial shot intended to detonate the barrel in this room. Possibly related to #657 ?

Playing on Windows, GOG version, v1.9.0 alpha12.

Evengard commented 8 months ago

Offtop: I actually remember fixing that bug when it was C only, the guy was shooting in a completely wrong direction. Was something to do with float calculations... Maybe Go skewed that again somehow.

Kinda a regression! xD

dennwc commented 8 months ago

I think this time it's different. This archer was only a bit off probably, similar to #657.

comradeshook commented 8 months ago

If memory serves, he did shoot in a north-ish direction, so that would check out. I say the following without knowing how things actually work, but perhaps something to do with scripted targeting? They're all unerringly accurate when playing normally, it's only these scripted sequences that bug out.

Evengard commented 8 months ago

Wait, what? North? That's exactly the same way the bug in C behaved, iirc

Evengard commented 8 months ago

https://github.com/noxworld-dev/opennox/commit/555eba598269414b0e3bedba98a6e12cc445b9a2 Check that commit @dennwc, may be related

dennwc commented 8 months ago

Haven't checked yet, but here's the commit porting that function: 122875acd0fbf77f27697fa804fe3f395541af10

dennwc commented 8 months ago

Fixed via https://github.com/noxworld-dev/opennox/commit/a0bb1dcd072854100c05174a36b90aff1b53ef46 :man_facepalming: I hate C pointer rules :sweat_smile:

comradeshook commented 8 months ago

Oh right by the way @dennwc, would this also fix monsters not turning towards you when they hear you? Otherwise i got another issue to add and document :V I'm wondering because they were all steadfastly turned north, much like how the archer and urchins fired north, so maybe the issues are/were related.

dennwc commented 8 months ago

No, the one I fixed only affects scripted monsters firing. Can you please open a new ticket for this?

comradeshook commented 8 months ago

Yep yep, coming right up. Just need to secure a good repro. :v

comradeshook commented 8 months ago

Hmm, in retrospect, i think it might actually be #512 that i ran into, enemies did turn around like they should when i fell down after the necromancer in Field of Valor. I'll keep an eye out though, in case i run into something similar again.