Callers expect sane Player_num, but on failure, it is invalid.
Returning a failure status causes net_udp_level_sync to fault using
Players[Player_num].connected, so throw an exception instead.
Rework movie loading to fix loading built-in robot movies. The previous
code always ignored loading the last entry in the movie array, which was
blank until 18f6919b33. The last entry
was unused after d38a3d1362, so it was
removed, which caused the code to skip the robots entry.
Commit d38a3d1362 broke unloading add-on
movies by removing the strcpy which saved their name. Add code to save
the name to extra_robot_movie_mission and call it when switching
missions.
Reported by btb: https://github.com/dxx-rebirth/dxx-rebirth/pull/17
Merge Mac OS X specific fixes from btb. The Windows and Linux builds
are unaffected. The OS X changes look sane, but cannot be tested here.
Changes not specific to OS X were previously committed separately.
Requested by btb: https://github.com/dxx-rebirth/dxx-rebirth/pull/12
Visual Studio 2013 Update 4 and Clang 3.4 fail to parse
valptridx_template_t related argument lists because they misinterpret
the unspecialized inner template name as a reference to the current
specialization. This seems to be nonconforming in C++11.
All gcc versions supported by Rebirth parse this sample program
correctly, but neither Visual Studio nor clang accept it.
template <template <typename> class>
struct A
{
};
template <typename>
struct B
{
B(A<B>);
};
In <https://stackoverflow.com/questions/17687459/clang-not-accepting-use-of-template-template-parameter-when-using-crtp>, a user saw a similar failure and received the answer:
Your code is legal.
From the C++11 Standard, section 14.6.1:
Like normal (non-template) classes, class templates have an injected-class-name (Clause 9). The injected-class-name can be used as a template-name or a type-name. When it is used with a template-argument-list, as a template-argument for a template template-parameter, or as the final identifier in the elaborated-type- specifier of a friend class template declaration, it refers to the class template itself.
Looks like your version of clang is still implementing the old rule.
This failure was first seen with Visual Studio 2013, but ignored because
Visual Studio has so many other problems parsing Rebirth. Now that it
has been reported to affect clang as well, a workaround is clearly
needed. A fix was suggested by btb
<2f9543f981>,
but that fix breaks gcc.
Rewrite the valptridx_template_t parameter passing to avoid mentioning
unspecialized template names as template parameters while defining the
class used as the parameter.
Reported by btb (clang): https://github.com/dxx-rebirth/dxx-rebirth/pull/12