From 1af91dc4111f9b683af02d4aa6dd6d96c20b7f07 Mon Sep 17 00:00:00 2001 From: Grant Bagwell Date: Wed, 12 Apr 2023 18:12:07 +0200 Subject: [PATCH] Changes to TBDC Different menu text + added vanilla mode --- .../jni/OpenJK/codeJK2/game/NPC_stats.cpp | 6 +- .../jni/OpenJK/codeJK2/game/bg_pmove.cpp | 4 +- .../jni/OpenJK/codeJK2/game/g_combat.cpp | 4 +- .../OpenJK/codeJK2/game/wp_blaster_rifle.cpp | 2 +- .../jni/OpenJK/codeJK2/game/wp_bowcaster.cpp | 4 +- .../OpenJK/codeJK2/game/wp_bryar_pistol.cpp | 2 +- .../jni/OpenJK/codeJK2/game/wp_demp2.cpp | 2 +- .../jni/OpenJK/codeJK2/game/wp_repeater.cpp | 4 +- .../codeJK2/game/wp_rocket_launcher.cpp | 2 +- z_vr_assets_jko/strip/menus_vr.sp | 17 ++- z_vr_assets_jko/ui/ingamesetup.menu | 119 +++++++++++------- z_vr_assets_jko/ui/setup.menu | 71 ++++++++--- 12 files changed, 161 insertions(+), 76 deletions(-) diff --git a/Projects/Android/jni/OpenJK/codeJK2/game/NPC_stats.cpp b/Projects/Android/jni/OpenJK/codeJK2/game/NPC_stats.cpp index b0deacc..3f78846 100644 --- a/Projects/Android/jni/OpenJK/codeJK2/game/NPC_stats.cpp +++ b/Projects/Android/jni/OpenJK/codeJK2/game/NPC_stats.cpp @@ -1085,7 +1085,7 @@ qboolean NPC_ParseParms( const char *NPCName, gentity_t *NPC ) } //Override scale due to TBDC - if(g_TeamBeefDirectorsCut->value) + if(g_TeamBeefDirectorsCut->integer == 1) { if(!Q_stricmp( NPCName, "STOfficer" )) { @@ -1269,7 +1269,7 @@ qboolean NPC_ParseParms( const char *NPCName, gentity_t *NPC ) if ( !Q_stricmp( token, "}" ) ) { //Override scale due to TBDC - if(g_TeamBeefDirectorsCut->value) + if(g_TeamBeefDirectorsCut->integer == 1) { if(!Q_stricmp( NPCName, "STOfficer" )) { @@ -2319,7 +2319,7 @@ void NPC_LoadParms( void ) char npcs_filename[64]; Com_sprintf(npcs_filename, sizeof(npcs_filename), "ext_data/%s.cfg", - g_TeamBeefDirectorsCut->integer ? "npcs" : "npcs_og"); + g_TeamBeefDirectorsCut->integer != 0 ? "npcs" : "npcs_og"); char *buffer, *holdChar, *marker; char npcExtensionListBuf[2048]; // The list of file names read in diff --git a/Projects/Android/jni/OpenJK/codeJK2/game/bg_pmove.cpp b/Projects/Android/jni/OpenJK/codeJK2/game/bg_pmove.cpp index 484bd3c..e1de0b8 100644 --- a/Projects/Android/jni/OpenJK/codeJK2/game/bg_pmove.cpp +++ b/Projects/Android/jni/OpenJK/codeJK2/game/bg_pmove.cpp @@ -8407,11 +8407,11 @@ static void PM_Weapon( void ) } PM_AddEvent( EV_FIRE_WEAPON ); - if(pm->ps->weapon == WP_BRYAR_PISTOL && g_TeamBeefDirectorsCut->value) + if(pm->ps->weapon == WP_BRYAR_PISTOL && g_TeamBeefDirectorsCut->integer == 1) { addTime = TBDC_BRYAR_PISTOL_FIRERATE; } - else if(pm->ps->weapon == WP_BLASTER && g_TeamBeefDirectorsCut->value) + else if(pm->ps->weapon == WP_BLASTER && g_TeamBeefDirectorsCut->integer == 1) { addTime = TBDC_BLASTER_FIRERATE; } diff --git a/Projects/Android/jni/OpenJK/codeJK2/game/g_combat.cpp b/Projects/Android/jni/OpenJK/codeJK2/game/g_combat.cpp index f46f29e..92333a4 100644 --- a/Projects/Android/jni/OpenJK/codeJK2/game/g_combat.cpp +++ b/Projects/Android/jni/OpenJK/codeJK2/game/g_combat.cpp @@ -4995,7 +4995,7 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker, vec3_ knockback = 0; } // figure momentum add, even if the damage won't be taken - if ( knockback && (!(dflags&DAMAGE_DEATH_KNOCKBACK) || g_TeamBeefDirectorsCut->value)) //&& targ->client + if ( knockback && (!(dflags&DAMAGE_DEATH_KNOCKBACK) || g_TeamBeefDirectorsCut->integer == 1)) //&& targ->client { G_ApplyKnockback( targ, newDir, knockback ); G_CheckKnockdown( targ, attacker, newDir, dflags, mod ); @@ -5352,7 +5352,7 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker, vec3_ {//special case because this is shotgun-ish damage, we need to multiply the knockback knockback *= 12;//*6 for 6 flechette shots } - else if(g_TeamBeefDirectorsCut->value) + else if(g_TeamBeefDirectorsCut->integer == 1) { knockback *= 2; } diff --git a/Projects/Android/jni/OpenJK/codeJK2/game/wp_blaster_rifle.cpp b/Projects/Android/jni/OpenJK/codeJK2/game/wp_blaster_rifle.cpp index 28b86ff..a873970 100644 --- a/Projects/Android/jni/OpenJK/codeJK2/game/wp_blaster_rifle.cpp +++ b/Projects/Android/jni/OpenJK/codeJK2/game/wp_blaster_rifle.cpp @@ -55,7 +55,7 @@ static void WP_FireBlasterMissile( gentity_t *ent, vec3_t start, vec3_t dir, qbo } } - if(ent->client && ent->client->ps.clientNum == 0 && g_TeamBeefDirectorsCut->value) + if(ent->client && ent->client->ps.clientNum == 0 && g_TeamBeefDirectorsCut->integer == 1) { velocity = TBDC_BLASTER_VELOCITY; } diff --git a/Projects/Android/jni/OpenJK/codeJK2/game/wp_bowcaster.cpp b/Projects/Android/jni/OpenJK/codeJK2/game/wp_bowcaster.cpp index 6833bc8..5c326c2 100644 --- a/Projects/Android/jni/OpenJK/codeJK2/game/wp_bowcaster.cpp +++ b/Projects/Android/jni/OpenJK/codeJK2/game/wp_bowcaster.cpp @@ -100,7 +100,7 @@ static void WP_BowcasterMainFire( gentity_t *ent ) for ( int i = 0; i < count; i++ ) { // create a range of different velocities - if(ent->client && ent->client->ps.clientNum == 0 && g_TeamBeefDirectorsCut->value) + if(ent->client && ent->client->ps.clientNum == 0 && g_TeamBeefDirectorsCut->integer == 1) { vel = TBDC_BOWCASTER_VELOCITY * ( Q_flrand(-1.0f, 1.0f) * BOWCASTER_VEL_RANGE + 1.0f );; } @@ -170,7 +170,7 @@ static void WP_BowcasterAltFire( gentity_t *ent ) WP_TraceSetStart( ent, start, vec3_origin, vec3_origin );//make sure our start point isn't on the other side of a wall float velocity = BOWCASTER_VELOCITY; - if(ent->client && ent->client->ps.clientNum == 0 && g_TeamBeefDirectorsCut->value) + if(ent->client && ent->client->ps.clientNum == 0 && g_TeamBeefDirectorsCut->integer == 1) { velocity = TBDC_BOWCASTER_VELOCITY; } diff --git a/Projects/Android/jni/OpenJK/codeJK2/game/wp_bryar_pistol.cpp b/Projects/Android/jni/OpenJK/codeJK2/game/wp_bryar_pistol.cpp index 27f10cb..b5935b6 100644 --- a/Projects/Android/jni/OpenJK/codeJK2/game/wp_bryar_pistol.cpp +++ b/Projects/Android/jni/OpenJK/codeJK2/game/wp_bryar_pistol.cpp @@ -73,7 +73,7 @@ void WP_FireBryarPistol( gentity_t *ent, qboolean alt_fire ) } float velocity = BRYAR_PISTOL_VEL; - if(ent->client && ent->client->ps.clientNum == 0 && g_TeamBeefDirectorsCut->value) + if(ent->client && ent->client->ps.clientNum == 0 && g_TeamBeefDirectorsCut->integer == 1) { velocity = TBDC_BRYAR_PISTOL_VEL; } diff --git a/Projects/Android/jni/OpenJK/codeJK2/game/wp_demp2.cpp b/Projects/Android/jni/OpenJK/codeJK2/game/wp_demp2.cpp index 8e239ea..6a0d443 100644 --- a/Projects/Android/jni/OpenJK/codeJK2/game/wp_demp2.cpp +++ b/Projects/Android/jni/OpenJK/codeJK2/game/wp_demp2.cpp @@ -56,7 +56,7 @@ static void WP_DEMP2_MainFire( gentity_t *ent ) WP_TraceSetStart( ent, start, vec3_origin, vec3_origin );//make sure our start point isn't on the other side of a wall float velocity = DEMP2_VELOCITY; - if(ent->client && ent->client->ps.clientNum == 0 && g_TeamBeefDirectorsCut->value) + if(ent->client && ent->client->ps.clientNum == 0 && g_TeamBeefDirectorsCut->integer == 1) { velocity = TBDC_DEMP2_VELOCITY; } diff --git a/Projects/Android/jni/OpenJK/codeJK2/game/wp_repeater.cpp b/Projects/Android/jni/OpenJK/codeJK2/game/wp_repeater.cpp index 9a78d38..d39c6ab 100644 --- a/Projects/Android/jni/OpenJK/codeJK2/game/wp_repeater.cpp +++ b/Projects/Android/jni/OpenJK/codeJK2/game/wp_repeater.cpp @@ -45,7 +45,7 @@ static void WP_RepeaterMainFire( gentity_t *ent, vec3_t dir, vec3_t start ) WP_TraceSetStart( ent, start, vec3_origin, vec3_origin );//make sure our start point isn't on the other side of a wall float velocity = REPEATER_VELOCITY; - if(ent->client && ent->client->ps.clientNum == 0 && g_TeamBeefDirectorsCut->value) + if(ent->client && ent->client->ps.clientNum == 0 && g_TeamBeefDirectorsCut->integer == 1) { velocity = TBDC_REPEATER_VELOCITY; } @@ -114,7 +114,7 @@ static void WP_RepeaterAltFire( gentity_t *ent ) else { float velocity = REPEATER_ALT_VELOCITY; - if(ent->client && ent->client->ps.clientNum == 0 && g_TeamBeefDirectorsCut->value) + if(ent->client && ent->client->ps.clientNum == 0 && g_TeamBeefDirectorsCut->integer == 1) { velocity = TBDC_REPEATER_ALT_VELOCITY; } diff --git a/Projects/Android/jni/OpenJK/codeJK2/game/wp_rocket_launcher.cpp b/Projects/Android/jni/OpenJK/codeJK2/game/wp_rocket_launcher.cpp index 0292d4f..f553490 100644 --- a/Projects/Android/jni/OpenJK/codeJK2/game/wp_rocket_launcher.cpp +++ b/Projects/Android/jni/OpenJK/codeJK2/game/wp_rocket_launcher.cpp @@ -149,7 +149,7 @@ void WP_FireRocket( gentity_t *ent, qboolean alt_fire ) int damage = weaponData[WP_ROCKET_LAUNCHER].damage; float vel = ROCKET_VELOCITY; - if(ent->client && ent->client->ps.clientNum == 0 && g_TeamBeefDirectorsCut->value) + if(ent->client && ent->client->ps.clientNum == 0 && g_TeamBeefDirectorsCut->integer == 1) { vel = TBDC_ROCKET_VELOCITY; } diff --git a/z_vr_assets_jko/strip/menus_vr.sp b/z_vr_assets_jko/strip/menus_vr.sp index d5af9f4..eb8a928 100644 --- a/z_vr_assets_jko/strip/menus_vr.sp +++ b/z_vr_assets_jko/strip/menus_vr.sp @@ -3,7 +3,7 @@ CONFIG W:\bin\striped.cfg ID 100 REFERENCE MENUS_VR DESCRIPTION "VR Menu Localizations" -COUNT 158 +COUNT 161 INDEX 0 { REFERENCE COMMON_CONTROLS_ITEM @@ -794,3 +794,18 @@ INDEX 157 REFERENCE MODS_WARNING_CONFIRM TEXT_LANGUAGE1 "Continue" } +INDEX 158 +{ + REFERENCE TBDC_BUMMSER + TEXT_LANGUAGE1 "Slower NPCs (Easy)-Vanilla Player Guns" +} +INDEX 159 +{ + REFERENCE TBDC_BAGGYG + TEXT_LANGUAGE1 "Vanilla NPCs (Hard)-Stronger Player Guns" +} +INDEX 160 +{ + REFERENCE TBDC_VANILLA + TEXT_LANGUAGE1 "Vanilla NPCs and Guns" +} \ No newline at end of file diff --git a/z_vr_assets_jko/ui/ingamesetup.menu b/z_vr_assets_jko/ui/ingamesetup.menu index 5dcc383..3ce2251 100644 --- a/z_vr_assets_jko/ui/ingamesetup.menu +++ b/z_vr_assets_jko/ui/ingamesetup.menu @@ -2713,39 +2713,74 @@ // DIFFICULTY FIELDS // //---------------------------------------------------------------------------------------------- - itemDef - { - name none - group difficulty - type ITEM_TYPE_YESNO - text @MENUS_VR_DIRECTORS_CUT_ITEM - cvar "g_TeamBeefDirectorsCut" - rect 315 191 300 20 - textalign ITEM_ALIGN_RIGHT - textalignx 151 - textaligny -2 - font 2 - textscale 0.8 - forecolor 1 1 1 1 - visible 0 - // appearance_slot 2 - descText @MENUS_VR_DIRECTORS_CUT_DESC - action - { - play sound/interface/button1 - } + itemDef + { + name none + group difficulty + type ITEM_TYPE_TEXT + style WINDOW_STYLE_EMPTY + text @MENUS_VR_DIRECTORS_CUT_ITEM + rect 315 191 300 20 + textalign ITEM_ALIGN_LEFT + textalignx 0 + textaligny -2 + font 2 + textscale 0.8 + forecolor 1 1 1 1 + visible 0 + mouseenter + { - mouseenter - { - show highlight2 - } + } + mouseexit + { - mouseexit - { - hide highlight2 - } + } + action + { - } + } + } + + itemDef + { + name none + group difficulty + type ITEM_TYPE_MULTI + text " " + cvar "g_TeamBeefDirectorsCut" + cvarFloatList + { + @MENUS_VR_TBDC_BUMMSER 0 + @MENUS_VR_TBDC_BAGGYG 1 + @MENUS_VR_TBDC_VANILLA 2 + } + rect 315 211 300 20 + textalign ITEM_ALIGN_LEFT + textalignx 0 + textaligny -2 + font 2 + textscale 0.8 + forecolor 1 1 1 1 + visible 0 + // appearance_slot 2 + descText @MENUS_VR_DIRECTORS_CUT_DESC + action + { + play sound/interface/button1 + } + + mouseenter + { + show highlight3 + } + + mouseexit + { + hide highlight3 + } + + } itemDef { @@ -2754,7 +2789,7 @@ type ITEM_TYPE_YESNO text @MENUS_VR_LASER_AUTODEFLECTING_ITEM cvar "g_saberAutoDeflect1stPerson" - rect 315 231 300 20 + rect 315 251 300 20 textalign ITEM_ALIGN_RIGHT textalignx 151 textaligny -2 @@ -2771,12 +2806,12 @@ mouseenter { - show highlight4 + show highlight5 } mouseexit { - hide highlight4 + hide highlight5 } } @@ -2795,7 +2830,7 @@ @MENUS_VR_SABER_REALISM_CRITICAL 2 @MENUS_VR_SABER_REALISM_INSTANT 3 } - rect 315 251 300 20 + rect 315 271 300 20 textalign ITEM_ALIGN_RIGHT textalignx 151 textaligny -2 @@ -2812,12 +2847,12 @@ mouseenter { - show highlight5 + show highlight6 } mouseexit { - hide highlight5 + hide highlight6 } } @@ -2834,7 +2869,7 @@ @MENUS_VR_FENCING_SPEED_DEFAULT 1.2 @MENUS_VR_FENCING_SPEED_FASTER 1.3 } - rect 315 271 300 20 + rect 315 291 300 20 textalign ITEM_ALIGN_RIGHT textalignx 151 textaligny -2 @@ -2851,12 +2886,12 @@ mouseenter { - show highlight6 + show highlight7 } mouseexit { - hide highlight6 + hide highlight7 } } @@ -2874,7 +2909,7 @@ @MENUS2_JEDI_KNIGHT 2 @MENUS1_JEDI_MASTER 3 } - rect 315 311 300 20 + rect 315 331 300 20 textalign ITEM_ALIGN_RIGHT textalignx 151 textaligny -2 @@ -2891,11 +2926,11 @@ mouseenter { - show highlight8 + show highlight9 } mouseexit { - hide highlight8 + hide highlight9 } } diff --git a/z_vr_assets_jko/ui/setup.menu b/z_vr_assets_jko/ui/setup.menu index d479bd0..16651d5 100644 --- a/z_vr_assets_jko/ui/setup.menu +++ b/z_vr_assets_jko/ui/setup.menu @@ -2809,16 +2809,51 @@ // DIFFICULTY FIELDS // //---------------------------------------------------------------------------------------------- - itemDef + itemDef + { + name none + group difficulty + type ITEM_TYPE_TEXT + style WINDOW_STYLE_EMPTY + text @MENUS_VR_DIRECTORS_CUT_ITEM + rect 315 191 300 20 + textalign ITEM_ALIGN_LEFT + textalignx 0 + textaligny -2 + font 2 + textscale 0.8 + forecolor 1 1 1 1 + visible 0 + mouseenter + { + + } + mouseexit + { + + } + action + { + + } + } + + itemDef { name none group difficulty - type ITEM_TYPE_YESNO - text @MENUS_VR_DIRECTORS_CUT_ITEM - cvar "g_TeamBeefDirectorsCut" - rect 315 191 300 20 - textalign ITEM_ALIGN_RIGHT - textalignx 151 + type ITEM_TYPE_MULTI + text " " + cvar "g_TeamBeefDirectorsCut" + cvarFloatList + { + @MENUS_VR_TBDC_BUMMSER 0 + @MENUS_VR_TBDC_BAGGYG 1 + @MENUS_VR_TBDC_VANILLA 2 + } + rect 315 211 300 20 + textalign ITEM_ALIGN_LEFT + textalignx 0 textaligny -2 font 2 textscale 0.8 @@ -2833,12 +2868,12 @@ mouseenter { - show highlight2 + show highlight3 } mouseexit { - hide highlight2 + hide highlight3 } } @@ -2850,7 +2885,7 @@ type ITEM_TYPE_YESNO text @MENUS_VR_LASER_AUTODEFLECTING_ITEM cvar "g_saberAutoDeflect1stPerson" - rect 315 231 300 20 + rect 315 251 300 20 textalign ITEM_ALIGN_RIGHT textalignx 151 textaligny -2 @@ -2867,12 +2902,12 @@ mouseenter { - show highlight4 + show highlight5 } mouseexit { - hide highlight4 + hide highlight5 } } @@ -2891,7 +2926,7 @@ @MENUS_VR_SABER_REALISM_CRITICAL 2 @MENUS_VR_SABER_REALISM_INSTANT 3 } - rect 315 251 300 20 + rect 315 271 300 20 textalign ITEM_ALIGN_RIGHT textalignx 151 textaligny -2 @@ -2908,12 +2943,12 @@ mouseenter { - show highlight5 + show highlight6 } mouseexit { - hide highlight5 + hide highlight6 } } @@ -2930,7 +2965,7 @@ @MENUS_VR_FENCING_SPEED_DEFAULT 1.2 @MENUS_VR_FENCING_SPEED_FASTER 1.3 } - rect 315 271 300 20 + rect 315 311 300 20 textalign ITEM_ALIGN_RIGHT textalignx 151 textaligny -2 @@ -2947,12 +2982,12 @@ mouseenter { - show highlight6 + show highlight8 } mouseexit { - hide highlight6 + hide highlight8 } }