From 2820b99e6bbee120fb7239fd6ef5a58224c72c34 Mon Sep 17 00:00:00 2001 From: Petr Bartos Date: Thu, 23 Nov 2023 22:00:54 +0100 Subject: [PATCH] Give 999 health cheat --- .../Android/jni/OpenJK/code/game/g_cmds.cpp | 2 +- .../jni/OpenJK/codeJK2/game/g_cmds.cpp | 2 +- z_vr_assets_jka/strings/english/menus_vr.str | 12 ++--- z_vr_assets_jka/strings/french/menus_vr.str | 16 +++---- z_vr_assets_jka/strings/german/menus_vr.str | 16 +++---- z_vr_assets_jka/strings/spanish/menus_vr.str | 18 +++---- z_vr_assets_jka/ui/datapadcheats.menu | 48 +++++++++---------- 7 files changed, 57 insertions(+), 57 deletions(-) diff --git a/Projects/Android/jni/OpenJK/code/game/g_cmds.cpp b/Projects/Android/jni/OpenJK/code/game/g_cmds.cpp index 14801d1..7dfbfed 100644 --- a/Projects/Android/jni/OpenJK/code/game/g_cmds.cpp +++ b/Projects/Android/jni/OpenJK/code/game/g_cmds.cpp @@ -175,7 +175,7 @@ void G_Give( gentity_t *ent, const char *name, const char *args, int argc ) if ( give_all || !Q_stricmp( name, "health") ) { if ( argc == 3 ) - ent->health = Com_Clampi( 1, ent->client->ps.stats[STAT_MAX_HEALTH], atoi( args ) ); + ent->health = Com_Clampi( 1, 999, atoi( args ) ); else ent->health = ent->client->ps.stats[STAT_MAX_HEALTH]; if ( !give_all ) diff --git a/Projects/Android/jni/OpenJK/codeJK2/game/g_cmds.cpp b/Projects/Android/jni/OpenJK/codeJK2/game/g_cmds.cpp index cd8b15e..6c88d8b 100644 --- a/Projects/Android/jni/OpenJK/codeJK2/game/g_cmds.cpp +++ b/Projects/Android/jni/OpenJK/codeJK2/game/g_cmds.cpp @@ -174,7 +174,7 @@ void G_Give( gentity_t *ent, const char *name, const char *args, int argc ) if ( give_all || !Q_stricmp( name, "health") ) { if ( argc == 3 ) - ent->health = Com_Clampi( 1, ent->client->ps.stats[STAT_MAX_HEALTH], atoi( args ) ); + ent->health = Com_Clampi( 1, 999, atoi( args ) ); else ent->health = ent->client->ps.stats[STAT_MAX_HEALTH]; if ( !give_all ) diff --git a/z_vr_assets_jka/strings/english/menus_vr.str b/z_vr_assets_jka/strings/english/menus_vr.str index 1dce83d..f58807c 100644 --- a/z_vr_assets_jka/strings/english/menus_vr.str +++ b/z_vr_assets_jka/strings/english/menus_vr.str @@ -247,18 +247,18 @@ LANG_ENGLISH "Replenish Ammo" REFERENCE CHEATS_GIVE_AMMO_DESC LANG_ENGLISH "Replenishes ammunition." -REFERENCE CHEATS_UNLOCK_SABER_SKILLS_ITEM -LANG_ENGLISH "Unlock Lightsaber Skills" - -REFERENCE CHEATS_UNLOCK_SABER_SKILLS_DESC -LANG_ENGLISH "Unlocks all lightsaber skills." - REFERENCE CHEATS_GIVE_WEAPONS_ITEM LANG_ENGLISH "Give All Weapons" REFERENCE CHEATS_GIVE_WEAPONS_DESC LANG_ENGLISH "Gives all weapons." +REFERENCE CHEATS_GIVE_MAX_HEALTH_ITEM +LANG_ENGLISH "Give Maxed-Out Health" + +REFERENCE CHEATS_GIVE_MAX_HEALTH_DESC +LANG_ENGLISH "Sets health to 999." + REFERENCE CHEATS_UNLIMITED_POWER_ITEM LANG_ENGLISH "Unlimited Force Power" diff --git a/z_vr_assets_jka/strings/french/menus_vr.str b/z_vr_assets_jka/strings/french/menus_vr.str index f759503..820aa66 100644 --- a/z_vr_assets_jka/strings/french/menus_vr.str +++ b/z_vr_assets_jka/strings/french/menus_vr.str @@ -325,14 +325,6 @@ REFERENCE CHEATS_GIVE_AMMO_DESC LANG_ENGLISH "Replenishes ammunition." LANG_FRENCH "#same" -REFERENCE CHEATS_UNLOCK_SABER_SKILLS_ITEM -LANG_ENGLISH "Unlock Lightsaber Skills" -LANG_FRENCH "#same" - -REFERENCE CHEATS_UNLOCK_SABER_SKILLS_DESC -LANG_ENGLISH "Unlocks all lightsaber skills." -LANG_FRENCH "#same" - REFERENCE CHEATS_GIVE_WEAPONS_ITEM LANG_ENGLISH "Give All Weapons" LANG_FRENCH "#same" @@ -341,6 +333,14 @@ REFERENCE CHEATS_GIVE_WEAPONS_DESC LANG_ENGLISH "Gives all weapons." LANG_FRENCH "#same" +REFERENCE CHEATS_GIVE_MAX_HEALTH_ITEM +LANG_ENGLISH "Give Maxed-Out Health" +LANG_FRENCH "#same" + +REFERENCE CHEATS_GIVE_MAX_HEALTH_DESC +LANG_ENGLISH "Sets health to 999." +LANG_FRENCH "#same" + REFERENCE CHEATS_UNLIMITED_POWER_ITEM LANG_ENGLISH "Unlimited Force Power" LANG_FRENCH "#same" diff --git a/z_vr_assets_jka/strings/german/menus_vr.str b/z_vr_assets_jka/strings/german/menus_vr.str index cbef8ed..1537db0 100644 --- a/z_vr_assets_jka/strings/german/menus_vr.str +++ b/z_vr_assets_jka/strings/german/menus_vr.str @@ -325,14 +325,6 @@ REFERENCE CHEATS_GIVE_AMMO_DESC LANG_ENGLISH "Replenishes ammunition." LANG_GERMAN "#same" -REFERENCE CHEATS_UNLOCK_SABER_SKILLS_ITEM -LANG_ENGLISH "Unlock Lightsaber Skills" -LANG_GERMAN "#same" - -REFERENCE CHEATS_UNLOCK_SABER_SKILLS_DESC -LANG_ENGLISH "Unlocks all lightsaber skills." -LANG_GERMAN "#same" - REFERENCE CHEATS_GIVE_WEAPONS_ITEM LANG_ENGLISH "Give All Weapons" LANG_GERMAN "#same" @@ -341,6 +333,14 @@ REFERENCE CHEATS_GIVE_WEAPONS_DESC LANG_ENGLISH "Gives all weapons." LANG_GERMAN "#same" +REFERENCE CHEATS_GIVE_MAX_HEALTH_ITEM +LANG_ENGLISH "Give Maxed-Out Health" +LANG_GERMAN "#same" + +REFERENCE CHEATS_GIVE_MAX_HEALTH_DESC +LANG_ENGLISH "Sets health to 999." +LANG_GERMAN "#same" + REFERENCE CHEATS_UNLIMITED_POWER_ITEM LANG_ENGLISH "Unlimited Force Power" LANG_GERMAN "#same" diff --git a/z_vr_assets_jka/strings/spanish/menus_vr.str b/z_vr_assets_jka/strings/spanish/menus_vr.str index 04c4bb5..4b67b95 100644 --- a/z_vr_assets_jka/strings/spanish/menus_vr.str +++ b/z_vr_assets_jka/strings/spanish/menus_vr.str @@ -325,21 +325,21 @@ REFERENCE CHEATS_GIVE_AMMO_DESC LANG_ENGLISH "Replenishes ammunition." LANG_SPANISH "#same" -REFERENCE CHEATS_UNLOCK_SABER_SKILLS_ITEM -LANG_ENGLISH "Unlock Lightsaber Skills" -LANG_SPANISH "#same" - -REFERENCE CHEATS_UNLOCK_SABER_SKILLS_DESC -LANG_ENGLISH "Unlocks all lightsaber skills." -LANG_SPANISH "#same" - REFERENCE CHEATS_GIVE_WEAPONS_ITEM LANG_ENGLISH "Give All Weapons" LANG_SPANISH "#same" REFERENCE CHEATS_GIVE_WEAPONS_DESC LANG_ENGLISH "Gives all weapons." -LANG_SPANISH "#same" +LANG_SPANISH "#same" + +REFERENCE CHEATS_GIVE_MAX_HEALTH_ITEM +LANG_ENGLISH "Give Maxed-Out Health" +LANG_SPANISH "#same" + +REFERENCE CHEATS_GIVE_MAX_HEALTH_DESC +LANG_ENGLISH "Sets health to 999." +LANG_SPANISH "#same" REFERENCE CHEATS_UNLIMITED_POWER_ITEM LANG_ENGLISH "Unlimited Force Power" diff --git a/z_vr_assets_jka/ui/datapadcheats.menu b/z_vr_assets_jka/ui/datapadcheats.menu index 118020b..a5e1a78 100644 --- a/z_vr_assets_jka/ui/datapadcheats.menu +++ b/z_vr_assets_jka/ui/datapadcheats.menu @@ -165,30 +165,6 @@ style WINDOW_STYLE_EMPTY type ITEM_TYPE_BUTTON rect 340 50 200 20 - text @MENUS_VR_CHEATS_UNLOCK_SABER_SKILLS_ITEM - descText @MENUS_VR_CHEATS_UNLOCK_SABER_SKILLS_DESC - font 2 - textscale 1 - textalignx 100 - textalign ITEM_ALIGN_CENTER - forecolor .509 .609 .847 1 - appearance_slot 1 - visible 1 - - action - { - play "sound/interface/button1.wav" ; - exec "setSaberThrow 2; setSaberDefense 3; setSaberOffense 3;" - } - } - - itemDef - { - name none - group none - style WINDOW_STYLE_EMPTY - type ITEM_TYPE_BUTTON - rect 340 75 200 20 text @MENUS_VR_CHEATS_GIVE_WEAPONS_ITEM descText @MENUS_VR_CHEATS_GIVE_WEAPONS_DESC font 2 @@ -206,6 +182,30 @@ } } + itemDef + { + name none + group none + style WINDOW_STYLE_EMPTY + type ITEM_TYPE_BUTTON + rect 340 75 200 20 + text @MENUS_VR_CHEATS_GIVE_MAX_HEALTH_ITEM + descText @MENUS_VR_CHEATS_GIVE_MAX_HEALTH_DESC + font 2 + textscale 1 + textalignx 100 + textalign ITEM_ALIGN_CENTER + forecolor .509 .609 .847 1 + appearance_slot 1 + visible 1 + + action + { + play "sound/interface/button1.wav" ; + exec "give health 999;" + } + } + // itemDef // { // name none