From 7b917023fc9eebc3afa6339d91adca6878d42455 Mon Sep 17 00:00:00 2001 From: Gerald Buttinger Date: Wed, 6 Mar 2024 22:52:18 +0100 Subject: [PATCH] feat: add weapon offsets for Block-Quake mod --- Quake/vr.c | 11 +++++++++++ Quake/vr.h | 3 ++- Quake/vr_menu.c | 1 + README.md | 10 ++++++++++ 4 files changed, 24 insertions(+), 1 deletion(-) diff --git a/Quake/vr.c b/Quake/vr.c index 65c76de86..c4f7601e0 100644 --- a/Quake/vr.c +++ b/Quake/vr.c @@ -657,6 +657,17 @@ void InitAllWeaponCVars() InitWeaponCVars(i++, "progs/v_multi2.mdl", "-7.2", "4", "18.2", "0.32"); //multirocket - same as rocket InitWeaponCVars(i++, "progs/v_plasma.mdl", "-3.1", "4.4", "14.2", "0.37"); //plasma - same as lightning } + // Block Quake models (https://kebby-quake.itch.io/block-quake) + else if (vr_gunmodeloffsets.value == VR_GUNMODELOFFSETS_BLOCKQUAKE) { + InitWeaponCVars(i++, "progs/v_axe.mdl", "-9", "38", "45", "0.2"); //axe + InitWeaponCVars(i++, "progs/v_shot.mdl", "-7", "6.8", "35.5", "0.2"); //shotgun + InitWeaponCVars(i++, "progs/v_shot2.mdl", "-5.6", "10.2", "42", "0.2"); //supershotgun + InitWeaponCVars(i++, "progs/v_nail.mdl", "-9", "15", "40", "0.2"); //nailgun + InitWeaponCVars(i++, "progs/v_nail2.mdl", "-6", "13.5", "39", "0.2"); //supernailgun + InitWeaponCVars(i++, "progs/v_rock.mdl", "0", "11.8", "72", "0.2"); //grenade + InitWeaponCVars(i++, "progs/v_rock2.mdl", "26", "13.8", "69", "0.2"); //rocket + InitWeaponCVars(i++, "progs/v_light.mdl", "-9", "13.5", "51", "0.2"); //lightning + } // Vanilla models else { //vanilla weapons diff --git a/Quake/vr.h b/Quake/vr.h index 2bfc53f28..8b6fd0084 100644 --- a/Quake/vr.h +++ b/Quake/vr.h @@ -26,7 +26,8 @@ #define VR_GUNMODELOFFSETS_ENHANCED 1 // Gun model offset defaults for enhanced models pack (https://quakeone.com/forum/quake-mod-releases/finished-works/283295-osjc-s-enhanced-quake1-model-conversions-pack-v1) #define VR_GUNMODELOFFSETS_AUTHENTIC 2 // Gun model offset defaults for authentic models pack (https://github.com/NightFright2k19/quake_authmdl) #define VR_GUNMODELOFFSETS_PLAGUE 3 // Gun model offset defaults for plague's models pack (https://github.com/NightFright2k19/quake_authmdl) -#define VR_MAX_GUNMODELOFFSETS VR_GUNMODELOFFSETS_PLAGUE +#define VR_GUNMODELOFFSETS_BLOCKQUAKE 4 // Gun model offset defaults for Block Quake's model pack (https://kebby-quake.itch.io/block-quake) +#define VR_MAX_GUNMODELOFFSETS VR_GUNMODELOFFSETS_BLOCKQUAKE void VID_VR_Init(); void VID_VR_Shutdown(); diff --git a/Quake/vr_menu.c b/Quake/vr_menu.c index af9c1ff0f..020d9746d 100644 --- a/Quake/vr_menu.c +++ b/Quake/vr_menu.c @@ -173,6 +173,7 @@ static void VR_MenuPrintOptionValue(int cx, int cy, int option) case VR_GUNMODELOFFSETS_ENHANCED: value_string = "Enhanced"; break; case VR_GUNMODELOFFSETS_AUTHENTIC: value_string = "Authentic"; break; case VR_GUNMODELOFFSETS_PLAGUE: value_string = "Plague"; break; + case VR_GUNMODELOFFSETS_BLOCKQUAKE: value_string = "Block-Quake"; break; } break; case VR_OPTION_GUNANGLE: printAsStr(vr_gunangle); break; diff --git a/README.md b/README.md index 0c7a536df..c9af05fdb 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,14 @@ There are also 3 mods available containing enhanced models for enemies and weapo This pack contains considerably more models as the one above - including converted ones from the Re-Release, but some weapons look worse than Plague's Weapon Pack and the Enhanced Model Conversion Pack linked above. To use them with QuakeSpasm-OpenVR, extract it into your `Quake` folder and rename the `pakz.pak` files by changing the `z` to a number higher then the highest existing `pak`-file inside your `id1`, `hipnotic`, and `rogue` folders. You will notice, that the weapon offsets and scaling will be off. To switch to the correct offsets, access the `VR Options` in Quake's main menu and switch `Gun Model Offsets` from `Vanilla` to `Authentic`. (Note that you will have to do that for each expansion/add-on you load, since Quake writes separate configs per mod.) +- [__Block-Quake__](https://kebby-quake.itch.io/block-quake): + + A total conversion mod for Quake featuring familiar plastic blocks. + + To use them with QuakeSpasm-OpenVR, extract `blockquake_vanilla.pak` into your `id1` (or any mod) subfolder and rename it to a number higher then the highest existing `pak`-file inside your `id1` folder. If you are using `pak` files from vanilla Quake this will be `pak2.pak`, and if you're using the Re-Release, it will be `pak1.pak`. + + You will notice, that the weapon offsets and scaling will be off. To switch to the correct offsets, access the `VR Options` in Quake's main menu and switch `Gun Model Offsets` to `Block-Quake`. (Note that you will have to do that for each expansion/add-on you load, since Quake writes separate configs per mod.) + You can also use multiple MODs in conjunction. E.g. load the Authentic pack first as e.g. `pak1.pak` to get the wide arrange of models and then the Plague's Weapon Pack second e.g. as `pak2.pak` to get the better VR-optimized weapon models. Of course you have to set `Gun Model Offsets` to `Plague` in this case. ### Controls @@ -120,6 +128,7 @@ All mission packs, add-ons and mods (supported by QuakeSpasm) should work out of - Arcane Dimensions (be sure to place it in a `ad` subfolder) - [Alkaline](https://alkalinequake.wordpress.com/) (be sure to place it in a `alk` subfolder) - [Slave Zero X: Episode Enyo](https://poppyworks.itch.io/episode-enyo) (be sure to place it in a `enyo` subfolder) +- [Block-Quake](https://kebby-quake.itch.io/block-quake) (be sure to set `Gun Model Offsets` in the `VR Options` to `Block-Quake`) - etc. As usual, expansion packs and mods are placed inside subfolders and then launched by stating the subfolder via the `game` parameter (e.g. `quakespasm-openvr.exe -game hipnotic`). @@ -166,6 +175,7 @@ Quake's weapons don't seem to be particularly consistently sized or offset. To w - Vanilla Quake, Scourge of Armagon and Dissolution of Eternity weapons (including the VR versions of Plague's weapon pack and Enhanced and Authentic Model Packs - [see info above for details](#enhanced-models)!) - Arcane Dimensions weapons (be sure to use folder-name `ad` and start game with `-game ad` to have them applied, [see info above for use of VR weapons](#enhanced-models)) - Alkaline weapons (be sure to use folder-name `alk` and start game with `-game alk` to have them applied, [see info above for use of VR weapons](#enhanced-models)) +- Weapons for [Block-Quake](https://kebby-quake.itch.io/block-quake) (set `Gun Model Offsets` in the `VR Options` to `Block-Quake`). - Weapons for Slave Zero X: Episode Enyo (be sure to use folder-name `enyo` and start game with `-game enyo` to have them applied). - Underdark Overbright's axe (be sure to use folder-name `udob` and start game with `-game udob` to have them applied) - The Spiritworld's and axe (be sure to use folder-name `spiritworld` and start game with `-game spiritworld` to have them applied)