It would be great if this was fixed, Karadoc. X-Com tactical engine is ingenious, but it has a few bugs like this.
Ok. I've started looking into it now. I haven't spotted anything that's obviously wrong. The algorithms make sense, it looks like it should probably work. But there are a couple of things that I think are a bit strange. For example, it seems to forbid projectiles from hitting their target on the way up. They can only hit on the way down. I don't know why they'd make a rule like that - but I don't think its the source of our problem.
Anyway, I've got a couple of ideas and checks that that I'd like to do, but unfortunately I'm having trouble getting the thing to build.
I've used cmake to create mingw makefiles, but it's telling me
*** No rule to make target 'C:/tools/MinGW/lib/libSDL_mixer.dll.a -lwinmm'
It seems to think that libSDL_mixer.dll.a -lwinmm is a single thing, whereas to me that's meant to be two separate libraries. (And the SDL stuff does exist in that path.) I then manually edited the makefiles to fix it so that SDL_mixer and winmm were treated separately. That got it a bit further along, but then there were a bunch of undefined symbols in the final linking. So that's where I'm currently at. I'll try wrestling with it again another time.
I am interested in game mechanics, logic, and coding; but trying to fix build problems related to dependences and linking is frustrating for me. I suppose it is for everyone. I'd rather not have to completely delete all my compilers and libraries and everything just so that I can follow someone else's build instructions line-for-line; but that's what it might come to.
[edit]
I've successfully worked through the quagmire of linking problems. Just in case someone else has similar issues, I'll briefly describe what I did.
Firstly, my original problem was caused by what looks like a mistake in CMakeLists.txt.
Line 442 of CMakeLists.txt says
set ( SDLMIXER_LIBRARY "${SDLMIXER_LIBRARY} -lwinmm" )
Presumably that's wrong. I don't see how that could ever work correctly. That's what makes "make" think there is a dependency with a weird two-part name which it doesn't know how to build. So I got rid of that line.
Secondly, there were a stack of missing functions in linking phase. I don't really know what belongs to what, so I added stuff based on guesswork and internet searches until everything worked. I ended up with this:
#(original) target_link_libraries ( openxcom ${system_libs} ${SDLIMAGE_LIBRARY} ${SDLMIXER_LIBRARY} ${SDLGFX_LIBRARY} ${SDL_LIBRARY} ${OPENGL_gl_LIBRARY} debug ${YAMLCPP_LIBRARY_DEBUG} optimized ${YAMLCPP_LIBRARY} )
target_link_libraries ( openxcom ${system_libs} ${SDLIMAGE_LIBRARY} ${SDLMIXER_LIBRARY} -lwinmm ${SDLGFX_LIBRARY} ${SDL_LIBRARY} ${OPENGL_gl_LIBRARY} debug ${YAMLCPP_LIBRARY_DEBUG} optimized ${YAMLCPP_LIBRARY} -lz -lpng -lvorbisfile -lvorbis -logg -limagehlp -lDbghelp )
Thirdly, after all that, it finally compiled - but I discovered that I was actually using the wrong branch. I was on the master branch whereas I should have been on `oxce2.9-plus-proto`. I tried stashing my changes to apply them to the correct branch, but the branches were too different for the merge to work. So I had to do them again manually.
(Also, in latest version of oxce2.9-plus-proto, savegame/CraftWeapon.cpp is missing `#include <cmath>`, which it needs for std::floor.)
And finally, with the correct branch, successfully compiled and linked, I found that the game ran really slowly. I guess it's because it compiles a debug version by default. So I told cmake to make a 'Release' version. That fixed the speed issue. I'm just mentioning that because it occurs to me that some of the stuff I added to the linker was probably only needed for the debug version; such as -Dbghelp.
In any case, I've finally got the thing built and ready to play. My intention is to just tweak things that I think look suspicious, and play through my usual game without any particular focus on testing.
As I said before, I haven't spotted any obvious mistakes, but there are a lot of things I would have done differently if I was writing it myself. So I'll start by just changing minor things and see if it makes any difference. I'll let you (someone) know if I learn anything important.