From 798ad469103d342288ae9ab08b7d863f0d0bf002 Mon Sep 17 00:00:00 2001 From: dGr8LookinSparky Date: Tue, 31 Mar 2020 11:15:36 -0400 Subject: [PATCH] tremulous: fix the bucket system for QVMs. --- default-assets | 2 +- src/filesystem/fs_tremulous.cpp | 4 ++-- src/game/bg_misc.c | 2 +- src/qcommon/common.cpp | 2 +- src/sdl/sdl_glimp.cpp | 2 +- src/ui/ui_shared.c | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/default-assets b/default-assets index 933da8120..14b5732e8 160000 --- a/default-assets +++ b/default-assets @@ -1 +1 @@ -Subproject commit 933da812052806f3454bae5a8da51b8944d1e442 +Subproject commit 14b5732e839265a0544c7e2bba16f2c50bd85a59 diff --git a/src/filesystem/fs_tremulous.cpp b/src/filesystem/fs_tremulous.cpp index b6ed43844..52aff4113 100644 --- a/src/filesystem/fs_tremulous.cpp +++ b/src/filesystem/fs_tremulous.cpp @@ -47,8 +47,8 @@ struct core_resource_s { #define CORE_RESOURCES_1_3 \ {0, "core_game_dll"}, /* Core dll defined by FS_CORE_GAME_DLL_NAME */ \ - 1246283756, /* trem13/vms-gpp-v1.3.0-alpha.0.14.11.pk3 */ \ - -1758827386 /* trem13/data-v1.3.0-alpha.0.14.11.pk3 */ \ + -15297494, /* trem13/vms-gpp-v1.3.0-alpha.0.14.11.pk3 */ \ + -1117796085 /* trem13/data-v1.3.0-alpha.0.14.11.pk3 */ \ #define CORE_RESOURCES_GPP \ -1154612609, /* gpp/vms-gpp1.pk3 */ \ diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c index ae3eb2200..2fd6e09d8 100644 --- a/src/game/bg_misc.c +++ b/src/game/bg_misc.c @@ -4004,7 +4004,7 @@ void BG_Bucket_Remove_Item_From_Bucket( } void* BG_Bucket_Select_A_Random_Item(unsigned int bucket_handle) { - Q_Bucket_Select_A_Random_Item(bucket_handle); + return Q_Bucket_Select_A_Random_Item(bucket_handle); } void BG_Bucket_Select_A_Specific_Item(unsigned int bucket_handle, void* item) { diff --git a/src/qcommon/common.cpp b/src/qcommon/common.cpp index 1931abfbc..673f7ad21 100644 --- a/src/qcommon/common.cpp +++ b/src/qcommon/common.cpp @@ -3935,7 +3935,7 @@ void Com_Bucket_Remove_Item_From_Bucket( } void* Com_Bucket_Select_A_Random_Item(unsigned int bucket_handle) { - Q_Bucket_Select_A_Random_Item(bucket_handle); + return Q_Bucket_Select_A_Random_Item(bucket_handle); } void Com_Bucket_Select_A_Specific_Item(unsigned int bucket_handle, void* item) { diff --git a/src/sdl/sdl_glimp.cpp b/src/sdl/sdl_glimp.cpp index 9ea4034f4..51b7e7ea2 100644 --- a/src/sdl/sdl_glimp.cpp +++ b/src/sdl/sdl_glimp.cpp @@ -156,7 +156,7 @@ static void GLimp_DetectAvailableModes(void) return; } - modes = (SDL_Rect*)SDL_calloc( (size_t)numSDLModes, sizeof( SDL_Rect ) ); + modes = (SDL_Rect*)SDL_calloc( (size_t)numSDLModes + 1, sizeof( SDL_Rect ) ); if ( !modes ) { ri.Error( ERR_FATAL, "Out of memory" ); diff --git a/src/ui/ui_shared.c b/src/ui/ui_shared.c index a4a7de935..4efb9adf0 100644 --- a/src/ui/ui_shared.c +++ b/src/ui/ui_shared.c @@ -1943,7 +1943,7 @@ void Script_playLoopedBucket(itemDef_t *item, char **args) DC->setCVar(selected_list_cvar, selected_list_cvar_string); } - if(val) { + if(val[0] != '\0') { strcpy(play_looped_sound_path, va("%s/%s", sound_bucket_directory, val)); DC->stopBackgroundTrack(); DC->startBackgroundTrack(play_looped_sound_path, play_looped_sound_path);