From e33d67575781b503e41edd63d53f4c1ea706e072 Mon Sep 17 00:00:00 2001 From: BjossiAlfreds Date: Mon, 12 Aug 2024 16:32:45 +0000 Subject: [PATCH 1/4] Fixed spawntemp data leaking into mid-level spawned entities --- src/game/g_spawn.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/game/g_spawn.c b/src/game/g_spawn.c index bd44a686..363459b4 100644 --- a/src/game/g_spawn.c +++ b/src/game/g_spawn.c @@ -700,6 +700,9 @@ SpawnEntities(const char *mapname, char *entities, const char *spawnpoint) ED_CallSpawn(ent); } + /* in case the last entity in the entstring has spawntemp fields */ + memset(&st, 0, sizeof(st)); + gi.dprintf("%i entities inhibited.\n", inhibit); G_FindTeams(); From 21d5d010b59d75594c7acec89b73f84c829b2b99 Mon Sep 17 00:00:00 2001 From: atsb <44937323+atsb@users.noreply.github.com> Date: Sat, 17 Aug 2024 09:31:51 +0200 Subject: [PATCH 2/4] GL4: Enable sliders for overbrights, colours and intensity This will match the vk and gl3 menu sliders for their respective video modes. --- src/client/menu/videomenu.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/src/client/menu/videomenu.c b/src/client/menu/videomenu.c index 8d46eed9..cc82203d 100644 --- a/src/client/menu/videomenu.c +++ b/src/client/menu/videomenu.c @@ -44,6 +44,7 @@ static cvar_t *r_vsync; static cvar_t *gl_anisotropic; static cvar_t *gl_msaa_samples; static cvar_t *gl3_colorlight; +static cvar_t *gl4_colorlight; static cvar_t *vk_dynamic; static menuframework_s s_opengl_menu; @@ -56,11 +57,14 @@ static menuslider_s s_brightness_slider; static menuslider_s s_fov_slider; static menuslider_s s_gl1_intensity_slider; static menuslider_s s_gl3_intensity_slider; +static menuslider_s s_gl4_intensity_slider; static menuslider_s s_vk_intensity_slider; static menuslider_s s_gl1_overbrightbits_slider; static menuslider_s s_gl3_overbrightbits_slider; +static menuslider_s s_gl4_overbrightbits_slider; static menuslider_s s_vk_overbrightbits_slider; static menulist_s s_gl3_colorlight_list; +static menulist_s s_gl4_colorlight_list; static menulist_s s_vk_dynamic_list; static menulist_s s_fs_box; static menulist_s s_vsync_list; @@ -591,6 +595,32 @@ VID_MenuInit(void) s_gl3_colorlight_list.itemnames = yesno_names; s_gl3_colorlight_list.curvalue = (gl3_colorlight->value != 0); } + if (strcmp(vid_renderer->string, "gl4") == 0) + { + s_gl4_intensity_slider.generic.type = MTYPE_SLIDER; + s_gl4_intensity_slider.generic.name = "color intensity"; + s_gl4_intensity_slider.generic.x = 0; + s_gl4_intensity_slider.generic.y = (y += 10); + s_gl4_intensity_slider.cvar = "gl4_intensity"; + s_gl4_intensity_slider.minvalue = 0.1f; + s_gl4_intensity_slider.maxvalue = 5.0f; + + s_gl4_overbrightbits_slider.generic.type = MTYPE_SLIDER; + s_gl4_overbrightbits_slider.generic.name = "overbrights"; + s_gl4_overbrightbits_slider.generic.x = 0; + s_gl4_overbrightbits_slider.generic.y = (y += 10); + s_gl4_overbrightbits_slider.cvar = "gl4_overbrightbits"; + s_gl4_overbrightbits_slider.minvalue = 0.1f; + s_gl4_overbrightbits_slider.maxvalue = 5.0f; + + gl4_colorlight = Cvar_Get("gl4_colorlight", "1", CVAR_ARCHIVE); + s_gl4_colorlight_list.generic.type = MTYPE_SPINCONTROL; + s_gl4_colorlight_list.generic.name = "color light"; + s_gl4_colorlight_list.generic.x = 0; + s_gl4_colorlight_list.generic.y = (y += 10); + s_gl4_colorlight_list.itemnames = yesno_names; + s_gl4_colorlight_list.curvalue = (gl4_colorlight->value != 0); + } else if (strcmp(vid_renderer->string, "vk") == 0) { s_vk_intensity_slider.generic.type = MTYPE_SLIDER; @@ -790,6 +820,12 @@ VID_MenuInit(void) Menu_AddItem(&s_opengl_menu, (void *)&s_gl3_overbrightbits_slider); Menu_AddItem(&s_opengl_menu, (void *)&s_gl3_colorlight_list); } + else if (strcmp(vid_renderer->string, "gl4") == 0) + { + Menu_AddItem(&s_opengl_menu, (void *)&s_gl4_intensity_slider); + Menu_AddItem(&s_opengl_menu, (void *)&s_gl4_overbrightbits_slider); + Menu_AddItem(&s_opengl_menu, (void *)&s_gl4_colorlight_list); + } else if (strcmp(vid_renderer->string, "vk") == 0) { Menu_AddItem(&s_opengl_menu, (void *)&s_vk_intensity_slider); From d7dd4e40a4ed30a451ba57d0ea2d06863d0c4bf4 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sat, 17 Aug 2024 15:55:24 +0100 Subject: [PATCH 3/4] AI, HuntTarget fix runtime warning. `Conditional jump or move depends on unitialised value(s)...HuntTarget (g_ai.c:423)...` --- src/game/g_ai.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/game/g_ai.c b/src/game/g_ai.c index 0d568741..4d3488d0 100644 --- a/src/game/g_ai.c +++ b/src/game/g_ai.c @@ -419,6 +419,10 @@ HuntTarget(edict_t *self) { VectorSubtract(self->enemy->s.origin, self->s.origin, vec); } + else + { + VectorClear(vec); + } self->ideal_yaw = vectoyaw(vec); From 6066b3c97967ada440ee5cb5cd4bb1064f62d076 Mon Sep 17 00:00:00 2001 From: Yamagi Date: Sun, 18 Aug 2024 16:29:21 +0200 Subject: [PATCH 4/4] Another round of changes to the Github workflows. * Build ref_gles1 only on Linux, it's of limited use under MacOS and Win. * Fetch openal-soft from Github, the other mirror had several connection problems in the past. * Always include the latest curl.dll in Windows builds. Since this isn't a stripped down build of curl, it's better to have it up to date. * Make sure that we are on Ubuntu 22.04. Otherwise the binaries wouldn't work on newer distros when `ubuntu-latest` becomes Ubuntu 24.04. * Fix some typos. --- .github/workflows/linux.yml | 4 ++-- .github/workflows/macos.yml | 1 - .github/workflows/win32.yml | 9 ++++----- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index d951976f..1122397a 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -14,8 +14,8 @@ concurrency: group: ${{github.workflow}}-${{github.event_name == 'pull_request' && github.head_ref || github.sha}} cancel-in-progress: true jobs: - build_ubuntu_x64_64: - runs-on: ubuntu-latest + build_ubuntu_x86_64: + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 8db094bf..8577a3ab 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -32,7 +32,6 @@ jobs: run: | # Public runners come with 3 CPUs. gmake -j3 - gmake -j3 ref_gles1 - name: Create testbuild package run: | # Create release directory tree diff --git a/.github/workflows/win32.yml b/.github/workflows/win32.yml index c1ebdd65..467c0844 100644 --- a/.github/workflows/win32.yml +++ b/.github/workflows/win32.yml @@ -44,7 +44,6 @@ jobs: run: | # Public runners come with 2 CPUs. make -j2 - make -j2 ref_gles1 - name: Create testbuild package shell: msys2 {0} run: | @@ -71,13 +70,13 @@ jobs: unzip -o SDL2-2.30.6-win32-x86.zip cp SDL2.dll publish/quake2-win32-${{github.sha}}/ # openal-soft - wget -c https://www.openal-soft.org/openal-binaries/openal-soft-1.23.1-bin.zip + wget -c https://github.com/kcat/openal-soft/releases/download/1.23.1/openal-soft-1.23.1-bin.zip unzip -o openal-soft-1.23.1-bin.zip cp openal-soft-1.23.1-bin/bin/Win32/soft_oal.dll publish/quake2-win32-${{github.sha}}/openal32.dll # curl (releases use a custom build curl.dll) - wget -c https://curl.se/windows/dl-8.9.1_1/curl-8.9.1_1-win32-mingw.zip - unzip -o curl-8.9.1_1-win32-mingw.zip - cp curl-8.9.1_1-win32-mingw/bin/libcurl.dll publish/quake2-win32-${{github.sha}}/curl.dll + wget -c -O curl-mingw-latest.zip "https://curl.se/windows/latest.cgi?p=win32-mingw.zip" + unzip -o curl-mingw-latest.zip + cp curl-*-win32-mingw/bin/libcurl.dll publish/quake2-win32-${{github.sha}}/curl.dll - name: Upload testbuild package uses: actions/upload-artifact@v4 with: