Pre-computed floating point numbers can be safely used in the comparison
function, whereas recomputation every time the sort function is called might
lead to a crash when the computed number is slightly differently every time,
because the sort function would return different results for the same faces.
Apparently, the Games Explorer is a failed experiment. Players don't expect
a game to only appear there, lots of games do not bother with it, and
future windows versions don't include it.
Most of the processing was already done by C4MessageInput::ProcessInput and
C4MessageInput::ProcessCommand. Simply move the Lobby-only commands there,
too, and make them work without a Lobby MainDlg. This required almost only
cosmetic changes.
Given that SimpleUDP makes no promises on delivering data anyway, it's okay
to just drop packets silently.
While I'm at it, it's probably a good idea for non-Windows system to
set sockets as non-blocking too, as well as C4NetIOUDP to be more
consistent with its handling of errors along these lines.
I am still completely mystified why this seems to happen so often in
practice. Hopefully the extra logging will give us some clues in
future. And closing the connection immediately gives us a small chance
at recovering from this situation.
In order to get an embedded build ID, add a new CMake cache variable
named OC_BUILD_ID. This variable can contain an arbitrary string, but
it is suggested that you use a hierarchical string starting with your
DNS domain, reversed, as in "com.example.openclonk.arbitrarystring"
(think java packages).
The missing break meant that the freshly created copy of the proplist would
get overwritten by the original, which was thankfully caught and announced
with "internal error: constant proplist has the wrong parent".
Thanks to Zapper for the testcase.
The parser does not know whether the constant proplist it is about to fill
is missing because it was overwritten by a later local/constant, or because
the preparser was interrupted by a script error and didn't store its
proplist. Thus, the parser cannot simply give up at that point, and in
order to keep things simple it creates a throwaway proplist. This proplist
was thrown away too soon, though.
Thanks to Zapper for the testcase.
Conflicts:
src/script/C4AulParse.cpp
Only one scenario (Arena.ocf\Ruins.ocs) was using any of the duplicate entries.
The missing earth definition caused earth borders to liquid to be rectangular sometimes.
A missing fixed conversion let the shape check happen at or around position 1/1 instead of at the actual object position.
Also removed a redundant contact check.
In no-gravity situations, SimFlight would enter an endless
loop when trying to project an unmoving object, waiting for
a collision that would never happen.
Similarly, in negative gravity, SimFlight would continue
calculating objects that left the top boundary of the land-
scape, only aborting the simulation once the coordinates
underflowed to values below the landscape.
Apparently the C standard committee and Microsoft couldn't agree on how
swprintf should work.
We previously tried to work around the resulting breakage, but I just got
the following compilation error. It's really better to avoid that function
entirely. Since we only used it in windows-specific code, the
windows-specific _snwprintf is a nicely compiler-independent replacement.
src/platform/PlatformAbstraction.h: In function ‘int swprintf(wchar_t*, size_t, const wchar_t*, ...)’:
src/platform/PlatformAbstraction.h:243:12: error: redefinition of ‘int swprintf(wchar_t*, size_t, const wchar_t*, ...)’
/usr/lib/gcc/i686-w64-mingw32/4.6/../../../../i686-w64-mingw32/include/swprintf.inl:30:5: error: ‘int swprintf(wchar_t*, size_t, const wchar_t*, ...)’ previously defined here