diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-11-24 16:33:11 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-11-24 16:33:11 +0000 |
commit | faddeff65d652bda3291eba255955adb17f1aa19 (patch) | |
tree | 4352e6d85ce48c7c8d96159fad4d3dd90602a70a /games-strategy/scorched3d/files | |
parent | 0e7b1da874d923b9f006e0000023f5fa528140a8 (diff) |
gentoo auto-resync : 24:11:2023 - 16:33:11
Diffstat (limited to 'games-strategy/scorched3d/files')
4 files changed, 221 insertions, 0 deletions
diff --git a/games-strategy/scorched3d/files/scorched3d-44-hang-fast-machines.patch b/games-strategy/scorched3d/files/scorched3d-44-hang-fast-machines.patch new file mode 100644 index 000000000000..4773081b6f31 --- /dev/null +++ b/games-strategy/scorched3d/files/scorched3d-44-hang-fast-machines.patch @@ -0,0 +1,53 @@ +diff -up scorched/src/common/coms/ComsLoadLevelMessage.cpp~ scorched/src/common/coms/ComsLoadLevelMessage.cpp +--- scorched/src/common/coms/ComsLoadLevelMessage.cpp~ 2014-08-01 18:47:31.000000000 +0200 ++++ scorched/src/common/coms/ComsLoadLevelMessage.cpp 2020-08-13 21:33:59.895250469 +0200 +@@ -108,6 +108,49 @@ bool ComsLoadLevelMessage::loadState(Sco +
+ bool ComsLoadLevelMessage::loadTanks(ScorchedContext &context)
+ {
++ /*
++ * There is a timing bug which shows on really fast machines
++ * where the client starts talking to the server before the
++ * server initial setup is done.
++ * In sofar as I have managed to debug this, the following
++ * happens on slower machines, aka the GOOD case:
++ *
++ * Server TankAddSimAction::invokeAction() new Tank "(Bot) Fred"
++ * Server TankAddSimAction::invokeAction() new Tank "(Bot) Ted"
++ * Server TankAddSimAction::invokeAction() new Tank "Player 1"
++ * Server TankAddSimAction::invokeAction() new Tank "Spectator"
++ * Client TankAddSimAction::invokeAction() new Tank "(Bot) Fred"
++ * Client TankAddSimAction::invokeAction() new Tank "(Bot) Ted"
++ * Client TankAddSimAction::invokeAction() new Tank "Player 1"
++ * Client TankAddSimAction::invokeAction() new Tank "Spectator"
++ *
++ * Note the server internally creates all tanks before the
++ * client does and thus before the client starts sending
++ * messages related to these tanks to the server.
++ *
++ * On a fast enough system (i7-10610U) the following order
++ * has been observed instead:
++ *
++ * Server TankAddSimAction::invokeAction() new Tank "(Bot) Fred"
++ * Server TankAddSimAction::invokeAction() new Tank "(Bot) Ted"
++ * Client TankAddSimAction::invokeAction() new Tank "(Bot) Fred"
++ * Client TankAddSimAction::invokeAction() new Tank "(Bot) Ted"
++ * Client TankAddSimAction::invokeAction() new Tank "Player 1"
++ * Client TankAddSimAction::invokeAction() new Tank "Spectator"
++ * Server TankAddSimAction::invokeAction() new Tank "Player 1"
++ * Server TankAddSimAction::invokeAction() new Tank "Spectator"
++ *
++ * Note the server creates the "Player 1" and "Spectator"
++ * tanks after the client, this causes the server to ignore
++ * some initial messages from the client related to these
++ * tanks, after which things get stuck, breaking non-networked
++ * games on fast machines.
++ *
++ * The sleep below is an ugly but effective workaround for this
++ * issue.
++ */
++ SDL_Delay(100);
++
+ NetBufferReader reader(tanksBuffer_);
+
+ // Add any new tanks
diff --git a/games-strategy/scorched3d/files/scorched3d-44-help.patch b/games-strategy/scorched3d/files/scorched3d-44-help.patch new file mode 100644 index 000000000000..4da81a9a53a9 --- /dev/null +++ b/games-strategy/scorched3d/files/scorched3d-44-help.patch @@ -0,0 +1,12 @@ +diff -up scorched/src/common/common/DefinesScorched.cpp.orig scorched/src/common/common/DefinesScorched.cpp +--- scorched/src/common/common/DefinesScorched.cpp.orig 2009-02-15 15:11:18.000000000 +0100 ++++ scorched/src/common/common/DefinesScorched.cpp 2009-02-16 14:28:53.000000000 +0100 +@@ -58,7 +58,7 @@ void S3D::showURL(const std::string &url + std::string buffer = S3D::formatStringBuffer("open %s", url.c_str());
+ system(buffer.c_str());
+ #else
+- std::string buffer = S3D::formatStringBuffer("firefox %s", url.c_str());
++ std::string buffer = S3D::formatStringBuffer("xdg-open %s", url.c_str());
+ system(buffer.c_str());
+ #endif // __DARWIN__
+ #endif // _WIN32
diff --git a/games-strategy/scorched3d/files/scorched3d-44-openal-pkgconfig.patch b/games-strategy/scorched3d/files/scorched3d-44-openal-pkgconfig.patch new file mode 100644 index 000000000000..2e1f4bac98a0 --- /dev/null +++ b/games-strategy/scorched3d/files/scorched3d-44-openal-pkgconfig.patch @@ -0,0 +1,137 @@ +Description: make use of pkg-config instead of openal-config +From: Reinhard Tartler <siretart@tauware.de> +Date: Sun, 28 Jun 2009 20:04:31 +0200 +Subject: openal-pkgconfig +Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=533973 + +--- + configure-al.m4 | 118 ++------------------------------------------------------ + 1 file changed, 4 insertions(+), 114 deletions(-) + +diff --git a/configure-al.m4 b/configure-al.m4 +index e37c20b..5250f0d 100644 +--- a/configure-al.m4 ++++ b/configure-al.m4 +@@ -1,118 +1,8 @@ + dnl Checking for OpenAL +-AC_ARG_WITH([openal-static], +- AC_HELP_STRING([--with-openal-static], +- [enable static linking for openal (default no)]), +- [use_static_openal=${withval}],,) +-AC_ARG_ENABLE(openaltest, +- [ --disable-openaltest Do not try to compile and run a test OpenAL program], +- , enable_openaltest=yes) +-AC_MSG_CHECKING(for OpenAL support) +-AC_PATH_PROG(OPENAL_CONFIG, openal-config, no) +-if test x$OPENAL_CONFIG = xno; then +- echo "The openal-config script installed by OpenAL could not be found" +- echo "Make sure openal-config is in your path, or set the OPENAL_CONFIG" +- echo "environment variable to the full path to openal-config." +- echo "Trying pkg-config instead." +- +- AC_PATH_PROG(PKG_CONFIG, pkg-config, no) +- if test x$PKG_CONFIG = xno; then +- echo "The pkg-config script could not be found" +- echo "Make sure pkg-config is in your path, or set the PKG_CONFIG" +- echo "environment variable to the full path to pkg-config." +- +- AC_MSG_ERROR([*** Can't find the openal library. Try: http://www.openal.org/]) +- else +- OPENAL_CONFIG="$PKG_CONFIG openal"; +- fi +-fi +- +-if test x"$use_static_openal" = x"yes"; then +- AL_LIBS="/usr/local/lib/libopenal.a" +-else +- AL_LIBS="`$OPENAL_CONFIG --libs`" +-fi +- +-AL_CFLAGS="`$OPENAL_CONFIG --cflags`" +- +-AC_MSG_RESULT(yes) +- +-AC_MSG_CHECKING(for Freealut support) +-AC_PATH_PROG(FREEALUT_CONFIG, freealut-config, no) +-if test x$FREEALUT_CONFIG = xno; then +- echo "*** Warning: The freealut-config script installed by OpenAL could not be found." +- echo "*** The alut library is required, however some older OpenAL distribitions may include it." +- echo "*** If Scorched3D fails to link check alut is in the link line." +- echo "*** Alternatively, make sure freealut-config is in your path, or set the FREEALUT_CONFIG" +- echo "*** environment variable to the full path to openal-config." +-else +- +- AL_LIBS="$AL_LIBS `$FREEALUT_CONFIG --libs`" +- AL_CFLAGS="$AL_CFLAGS `$FREEALUT_CONFIG --cflags`" +- +- AC_MSG_RESULT(yes) +-fi +- +-AC_MSG_CHECKING(for OpenAL compilation) +-if test "x$enable_openaltest" = "xyes" ; then +- +- ac_save_CFLAGS="$CFLAGS" +- ac_save_LIBS="$LIBS" +- CFLAGS="$CFLAGS $AL_CFLAGS" +- LIBS="$AL_LIBS $LIBS" +- +- AC_TRY_COMPILE([ +-#ifdef __APPLE__ +- #include <OpenAL/al.h> +- #include <OpenAL/alc.h> +-#else +- #include <AL/al.h> +- #include <AL/alut.h> +- #include <AL/alc.h> +-#endif +- +- ],[ +- ],[ +- have_openal=yes +- ],[ +- echo "*** Failed to compile using the OpenAL library." +- echo "*** CFLAGS = $AL_CFLAGS"; +- AC_MSG_ERROR([*** Check the OpenAL library is correctly installed.]) +- ]) +- +- AC_TRY_LINK([ +-#ifdef __APPLE__ +- #include <OpenAL/al.h> +- #include <OpenAL/alc.h> +-#else +- #include <AL/al.h> +- #include <AL/alut.h> +- #include <AL/alc.h> +-#endif +- +- int main(int argc, char *argv[]) +- { +- alutInit(argc, argv); +- return 0; +- } +-#undef main +-#define main K_and_R_C_main +- +- ],[ +- ],[ +- have_openal=yes +- ],[ +- echo "*** Compiled but failed to link using the OpenAL library." +- echo "*** LIBS = $AL_LIBS"; +- echo "*** Check the OpenAL library is on the LD_LIBRARY_PATH"; +- AC_MSG_ERROR([*** Check the OpenAL library is correctly installed.]) +- ]) +- +- CFLAGS="$ac_save_CFLAGS" +- LIBS="$ac_save_LIBS" +- +- AC_MSG_RESULT(yes) +-fi +- ++PKG_CHECK_MODULES([OPENAL], [openal]) ++PKG_CHECK_MODULES([FREEALUT], [freealut]) ++AL_CFLAGS="$OPENAL_CFLAGS $FREEALUT_CFLAGS" ++AL_LIBS="$OPENAL_LIBS $FREEALUT_LIBS" + AC_SUBST(AL_CFLAGS) + AC_SUBST(AL_LIBS) + diff --git a/games-strategy/scorched3d/files/scorched3d-44-wxgtk32.patch b/games-strategy/scorched3d/files/scorched3d-44-wxgtk32.patch new file mode 100644 index 000000000000..9ee0b8c34b58 --- /dev/null +++ b/games-strategy/scorched3d/files/scorched3d-44-wxgtk32.patch @@ -0,0 +1,19 @@ +--- a/src/launcher/scorched/main.cpp ++++ b/src/launcher/scorched/main.cpp +@@ -26,6 +26,7 @@ + #include <graph/OptionsDisplay.h>
+ #include <wx/wx.h>
+ #include <wx/utils.h>
++#include <wx/sizer.h>
+ #include <locale.h>
+ #include <math.h>
+ #include <signal.h>
+@@ -86,6 +87,8 @@ int main(int argc, char *argv[]) + ScorchedParams::instance()->getSDLInitVideo() = true;
+ }
+
++ wxSizerFlags::DisableConsistencyChecks();
++
+ #ifdef _WIN32
+ wxEntry((WXHINSTANCE) (HINSTANCE) GetModuleHandle(NULL),
+ (WXHINSTANCE) NULL, "", SW_SHOWNORMAL);
|