From ed9534af2b61042ccc9f9512a82f028f46900b89 Mon Sep 17 00:00:00 2001 From: Simon Date: Tue, 15 Oct 2019 22:20:51 +0100 Subject: [PATCH] Console Commands You can now define a selection of commands to run on the console in a commands.lst file. These will be placed in the Console Commands menu. This is particularly useful if you a) just want to cheat or b) need to skip a scene or to a particular map because a mod isn't working correctly. --- .../Android/jni/src/Lambda1VR/VrInputRight.c | 5 - .../jni/src/Xash3D/xash3d/mainui/Android.mk | 1 + .../jni/src/Xash3D/xash3d/mainui/BaseMenu.h | 1 + .../xash3d/mainui/menus/Configuration.cpp | 33 +- .../xash3d/mainui/menus/ConsoleCommands.cpp | 127 ++++++++ Projects/Android/jni/src/hlsdk-xash3d | 2 +- .../drbeef/lambda1vr/GLES3JNIActivity.java | 288 ++++++++++-------- 7 files changed, 288 insertions(+), 169 deletions(-) create mode 100644 Projects/Android/jni/src/Xash3D/xash3d/mainui/menus/ConsoleCommands.cpp diff --git a/Projects/Android/jni/src/Lambda1VR/VrInputRight.c b/Projects/Android/jni/src/Lambda1VR/VrInputRight.c index 869ebb4..1cc7f95 100644 --- a/Projects/Android/jni/src/Lambda1VR/VrInputRight.c +++ b/Projects/Android/jni/src/Lambda1VR/VrInputRight.c @@ -358,11 +358,6 @@ void HandleInput_Right(ovrMobile * Ovr, double displayTime ) (leftTrackedRemoteState_old.Buttons & ovrButton_X)) && (leftTrackedRemoteState_old.Buttons & ovrButton_X)) { sendButtonActionSimple("impulse 100"); - -#ifndef NDEBUG - Cbuf_AddText( "sv_cheats 1\n" ); - Cbuf_AddText( "impulse 101\n" ); -#endif } diff --git a/Projects/Android/jni/src/Xash3D/xash3d/mainui/Android.mk b/Projects/Android/jni/src/Xash3D/xash3d/mainui/Android.mk index 6d37ad1..79a7227 100644 --- a/Projects/Android/jni/src/Xash3D/xash3d/mainui/Android.mk +++ b/Projects/Android/jni/src/Xash3D/xash3d/mainui/Android.mk @@ -52,6 +52,7 @@ LOCAL_SRC_FILES := \ controls/ScrollView.cpp \ menus/AdvancedControls.cpp \ menus/Audio.cpp \ + menus/ConsoleCommands.cpp \ menus/Configuration.cpp \ menus/ConnectionProgress.cpp \ menus/ConnectionWarning.cpp \ diff --git a/Projects/Android/jni/src/Xash3D/xash3d/mainui/BaseMenu.h b/Projects/Android/jni/src/Xash3D/xash3d/mainui/BaseMenu.h index 08d54e1..0289148 100644 --- a/Projects/Android/jni/src/Xash3D/xash3d/mainui/BaseMenu.h +++ b/Projects/Android/jni/src/Xash3D/xash3d/mainui/BaseMenu.h @@ -297,6 +297,7 @@ void UI_AdvControls_Menu( void ); void UI_GameOptions_Menu( void ); void UI_CreateGame_Menu( void ); void UI_Audio_Menu( void ); +void UI_ConsoleCommands_Menu( void ); void UI_Video_Menu( void ); void UI_VidOptions_Menu( void ); void UI_VidModes_Menu( void ); diff --git a/Projects/Android/jni/src/Xash3D/xash3d/mainui/menus/Configuration.cpp b/Projects/Android/jni/src/Xash3D/xash3d/mainui/menus/Configuration.cpp index 0f24483..5265e16 100644 --- a/Projects/Android/jni/src/Xash3D/xash3d/mainui/menus/Configuration.cpp +++ b/Projects/Android/jni/src/Xash3D/xash3d/mainui/menus/Configuration.cpp @@ -36,12 +36,14 @@ public: typedef CMenuFramework BaseClass; CMenuOptions() : CMenuFramework("CMenuOptions") { } + // update dialog CMenuYesNoMessageBox msgBox; }; static CMenuOptions uiOptions; + /* ================= CMenuOptions::Init @@ -66,14 +68,8 @@ void CMenuOptions::_Init( void ) PC_AUDIO, UI_Audio_Menu, QMF_NOTIFY ); AddButton( "Video", "Change screen size, video mode and gamma", PC_VIDEO, UI_Video_Menu, QMF_NOTIFY ); - - // Cheats - Only add these if sv_cheats is enabled - if (EngFuncs::GetCvarFloat("sv_cheats") != 0.0f) { - AddButton("No Clip", "No Clip", PC_CONSOLE, UI_NoClip_Btn, QMF_NOTIFY); - AddButton("God", "God", PC_CONSOLE, UI_God_Btn, QMF_NOTIFY); - AddButton("Give Suit", "Give Suit", PC_CONSOLE, UI_GiveSuit_Btn, QMF_NOTIFY); - AddButton("Give Crowbar", "Give Crowbar", PC_CONSOLE, UI_GiveCrowbar_Btn, QMF_NOTIFY); - } + AddButton( "Console Commands", "Console Commands Menu", + PC_CONSOLE, UI_ConsoleCommands_Menu, QMF_NOTIFY ); #ifndef VR AddButton( "Touch", "Change touch settings and buttons", @@ -103,28 +99,9 @@ CMenuOptions::Menu ================= */ -void UI_NoClip_Btn( void ) -{ - EngFuncs::ClientCmd(TRUE, "noclip"); -} - -void UI_God_Btn( void ) -{ - EngFuncs::ClientCmd(TRUE, "god"); -} - -void UI_GiveSuit_Btn( void ) -{ - EngFuncs::ClientCmd(TRUE, "give item_suit"); -} - -void UI_GiveCrowbar_Btn( void ) -{ - EngFuncs::ClientCmd(TRUE, "give weapon_crowbar"); -} - void UI_Options_Menu( void ) { uiOptions.Show(); } + ADD_MENU( menu_options, UI_Options_Precache, UI_Options_Menu ); diff --git a/Projects/Android/jni/src/Xash3D/xash3d/mainui/menus/ConsoleCommands.cpp b/Projects/Android/jni/src/Xash3D/xash3d/mainui/menus/ConsoleCommands.cpp new file mode 100644 index 0000000..a1c83fa --- /dev/null +++ b/Projects/Android/jni/src/Xash3D/xash3d/mainui/menus/ConsoleCommands.cpp @@ -0,0 +1,127 @@ +/* +Copyright (C) 1997-2001 Id Software, Inc. + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +*/ + +#include "Framework.h" +#include "Slider.h" +#include "Bitmap.h" +#include "PicButton.h" +#include "CheckBox.h" +#include "SpinControl.h" +#include "StringArrayModel.h" + +#define ART_BANNER "gfx/shell/head_advoptions" + +class CMenuConsoleCommands : public CMenuFramework +{ +public: + typedef CMenuFramework BaseClass; + + CMenuConsoleCommands() : CMenuFramework("CMenuConsoleCommands") { } + +private: + void _Init() override; + + void ExecuteCommand( void *pExtra ); +}; + +static CMenuConsoleCommands uiConsoleCommands; + + +static int numCommands = 0; +static char commandTitles[128][128]; +static char commands[128][128]; + +void UI_LoadCustomConsoleCommands( void ) +{ + numCommands = 0; + char *afile = (char *)EngFuncs::COM_LoadFile( "commands.lst", NULL ); + char *pfile = afile; + char token[128]; + + if( !afile ) + return; + + while(( pfile = EngFuncs::COM_ParseFile( pfile, token )) != NULL ) + { + strcpy(commandTitles[numCommands], token); + pfile = EngFuncs::COM_ParseFile( pfile, token ); + + if (pfile == NULL) + break; + + strcpy(commands[numCommands++], token); + } + + EngFuncs::COM_FreeFile( afile ); +} + +/* +================= +CMenuConsoleCommands::Init +================= +*/ +void CMenuConsoleCommands::_Init( void ) +{ + banner.SetPicture( ART_BANNER ); + + AddItem( background ); + AddItem( banner ); + + UI_LoadCustomConsoleCommands(); + for (int i = 0; i < numCommands; ++i) + { + CMenuPicButton *button = AddButton(commandTitles[i], commandTitles[i], PC_CONSOLE, MenuCb( &CMenuConsoleCommands::ExecuteCommand )); + button->onActivated.pExtra = commands[i]; + } + + AddButton( "Done", "Go back to the Main menu", + PC_DONE, VoidCb( &CMenuConsoleCommands::Hide ), QMF_NOTIFY ); +} + +void CMenuConsoleCommands::ExecuteCommand( void *pExtra ) +{ + const char *command = (const char *)pExtra; + if( command[0] ) + { + EngFuncs::ClientCmd(TRUE, command); + } +} + + +/* +================= +UI_ConsoleCommands_Precache +================= +*/ +void UI_ConsoleCommands_Precache( void ) +{ + EngFuncs::PIC_Load( ART_BANNER ); +} + +/* +================= +UI_ConsoleCommands_Menu +================= +*/ +void UI_ConsoleCommands_Menu( void ) +{ + uiConsoleCommands.Show(); +} +ADD_MENU( menu_ConsoleCommands, UI_ConsoleCommands_Precache, UI_ConsoleCommands_Menu ); diff --git a/Projects/Android/jni/src/hlsdk-xash3d b/Projects/Android/jni/src/hlsdk-xash3d index 1afe828..f3a10d2 160000 --- a/Projects/Android/jni/src/hlsdk-xash3d +++ b/Projects/Android/jni/src/hlsdk-xash3d @@ -1 +1 @@ -Subproject commit 1afe828dfc73af6d16af67b3e2c7a8740306a38e +Subproject commit f3a10d2a42970a7334eaac3d06aad9e34ff8ed16 diff --git a/java/com/drbeef/lambda1vr/GLES3JNIActivity.java b/java/com/drbeef/lambda1vr/GLES3JNIActivity.java index a2c8d33..ca30ab8 100644 --- a/java/com/drbeef/lambda1vr/GLES3JNIActivity.java +++ b/java/com/drbeef/lambda1vr/GLES3JNIActivity.java @@ -136,143 +136,8 @@ import static android.system.Os.setenv; public void create() { copy_asset(getFilesDir().getPath(), "extras.pak", false); - copy_asset("/sdcard/xash/valve/", "config.cfg", false); // Copy in case user has deleted their config copy_asset("/sdcard/xash/", "commandline.txt", false); // Copy in case user has deleted their config - //Copy our special sprites - copy_asset("/sdcard/xash/valve/", "sprites/s_stealth.spr", true); - - //Copy modified weapon models - if (!(new File("/sdcard/xash/valve/models/no_copy").exists())) - { - //Colt (A-16) - copy_asset("/sdcard/xash/valve/", "models/v_9mmar.mdl", true); - copy_asset("/sdcard/xash/valve/", "models/p_9mmar.mdl", true); - copy_asset("/sdcard/xash/valve/", "models/w_9mmar.mdl", true); - copy_asset("/sdcard/xash/valve/", "sound/items/clipinsert1.wav", true); - copy_asset("/sdcard/xash/valve/", "sound/items/cliprelease1.wav", true); - copy_asset("/sdcard/xash/valve/", "sound/weapons/t_m4_boltpull.wav", true); - copy_asset("/sdcard/xash/valve/", "sound/weapons/t_m4_deploy.wav", true); - copy_asset("/sdcard/xash/valve/", "sound/weapons/t_m4_m203_in.wav", true); - copy_asset("/sdcard/xash/valve/", "sound/weapons/t_m4_m203_out.wav", true); - copy_asset("/sdcard/xash/valve/", "sound/weapons/t_m4_m203_shell.wav", true); - - //Colt Pistol M1911 - copy_asset("/sdcard/xash/valve/", "models/v_9mmhandgun.mdl", true); - copy_asset("/sdcard/xash/valve/", "models/p_9mmhandgun.mdl", true); - copy_asset("/sdcard/xash/valve/", "models/w_9mmhandgun.mdl", true); - - //357 Python - copy_asset("/sdcard/xash/valve/", "models/v_357.mdl", true); - copy_asset("/sdcard/xash/valve/", "models/p_357.mdl", true); - copy_asset("/sdcard/xash/valve/", "models/w_357.mdl", true); - copy_asset("/sdcard/xash/valve/", "sound/weapons/357_shot1.wav", true); - copy_asset("/sdcard/xash/valve/", "sound/weapons/357_shot2.wav", true); - - //RGD Grenade - copy_asset("/sdcard/xash/valve/", "models/v_grenade.mdl", true); - copy_asset("/sdcard/xash/valve/", "models/w_grenade.mdl", true); - copy_asset("/sdcard/xash/valve/", "models/p_grenade.mdl", true); - copy_asset("/sdcard/xash/valve/", "sound/weapons/grenade_pinpull.wav", true); - copy_asset("/sdcard/xash/valve/", "sound/weapons/grenade_throw.wav", true); - copy_asset("/sdcard/xash/valve/", "sound/weapons/grenade_draw.wav", true); - copy_asset("/sdcard/xash/valve/", "sound/weapons/explode3.wav", true); - copy_asset("/sdcard/xash/valve/", "sound/weapons/explode4.wav", true); - copy_asset("/sdcard/xash/valve/", "sound/weapons/explode5.wav", true); - - //Shotgun Benelli M3 - copy_asset("/sdcard/xash/valve/", "models/v_shotgun.mdl", true); - copy_asset("/sdcard/xash/valve/", "models/p_shotgun.mdl", true); - copy_asset("/sdcard/xash/valve/", "models/w_shotgun.mdl", true); - copy_asset("/sdcard/xash/valve/", "sound/weapons/m3_insertshell.wav", true); - copy_asset("/sdcard/xash/valve/", "sound/weapons/m3_pump.wav", true); - - //Stalker Rocket - copy_asset("/sdcard/xash/valve/", "models/v_rpg.mdl", true); - copy_asset("/sdcard/xash/valve/", "models/p_rpg.mdl", true); - copy_asset("/sdcard/xash/valve/", "models/w_rpg.mdl", true); - copy_asset("/sdcard/xash/valve/", "models/rpgrocket.mdl", true); - copy_asset("/sdcard/xash/valve/", "models/v_rpgammo.mdl", true); - copy_asset("/sdcard/xash/valve/", "sound/weapons/rocket1.wav", true); - copy_asset("/sdcard/xash/valve/", "sound/weapons/rocketfire1.wav", true); - copy_asset("/sdcard/xash/valve/", "sound/weapons/rpg7_reload.wav", true); - - //Satchel - copy_asset("/sdcard/xash/valve/", "models/v_satchel.mdl", true); - copy_asset("/sdcard/xash/valve/", "models/v_satchel_radio.mdl", true); - copy_asset("/sdcard/xash/valve/", "models/w_satchel.mdl", true); - copy_asset("/sdcard/xash/valve/", "models/p_satchel.mdl", true); - copy_asset("/sdcard/xash/valve/", "models/p_satchel_radio.mdl", true); - - //Tripmine - copy_asset("/sdcard/xash/valve/", "models/v_tripmine.mdl", true); - copy_asset("/sdcard/xash/valve/", "models/p_tripmine.mdl", true); - copy_asset("/sdcard/xash/valve/", "sound/weapons/mine_activate.wav", true); - copy_asset("/sdcard/xash/valve/", "sound/weapons/mine_deploy.wav", true); - copy_asset("/sdcard/xash/valve/", "sound/weapons/tripmine_ant.wav", true); - copy_asset("/sdcard/xash/valve/", "sound/weapons/tripmine_button.wav", true); - copy_asset("/sdcard/xash/valve/", "sound/weapons/tripmine_move.wav", true); - - //BMS Crossbow - copy_asset("/sdcard/xash/valve/", "models/v_crossbow.mdl", true); - copy_asset("/sdcard/xash/valve/", "models/p_crossbow.mdl", true); - copy_asset("/sdcard/xash/valve/", "models/w_crossbow.mdl", true); - copy_asset("/sdcard/xash/valve/", "models/w_crossbow_clip.mdl", true); - copy_asset("/sdcard/xash/valve/", "sound/weapons/natianul.wav", true); - copy_asset("/sdcard/xash/valve/", "sound/weapons/xbow.wav", true); - copy_asset("/sdcard/xash/valve/", "sound/weapons/xbow_fire1.wav", true); - copy_asset("/sdcard/xash/valve/", "sound/weapons/xbow_reload1.wav", true); - - - //Egon (Overhaul) - copy_asset("/sdcard/xash/valve/", "models/v_egon.mdl", true); - copy_asset("/sdcard/xash/valve/", "models/p_egon.mdl", true); - copy_asset("/sdcard/xash/valve/", "models/w_egon.mdl", true); - - //Gauss (Overhaul) - copy_asset("/sdcard/xash/valve/", "models/v_gauss.mdl", true); - copy_asset("/sdcard/xash/valve/", "models/p_gauss.mdl", true); - copy_asset("/sdcard/xash/valve/", "models/w_gauss.mdl", true); - copy_asset("/sdcard/xash/valve/", "models/w_gaussammo.mdl", true); - - //HGun (Overhaul) - copy_asset("/sdcard/xash/valve/", "models/v_hgun.mdl", true); - copy_asset("/sdcard/xash/valve/", "models/p_hgun.mdl", true); - copy_asset("/sdcard/xash/valve/", "models/w_hgun.mdl", true); - - //Squeak (Overhaul) - copy_asset("/sdcard/xash/valve/", "models/v_squeak.mdl", true); - copy_asset("/sdcard/xash/valve/", "models/p_squeak.mdl", true); - copy_asset("/sdcard/xash/valve/", "models/w_squeak.mdl", true); - copy_asset("/sdcard/xash/valve/", "models/w_sqknest.mdl", true); - - //Crowbar - copy_asset("/sdcard/xash/valve/", "models/v_crowbar.mdl", true); - copy_asset("/sdcard/xash/valve/", "models/w_crowbar.mdl", true); - copy_asset("/sdcard/xash/valve/", "sound/weapons/cbar_draw.wav", true); - copy_asset("/sdcard/xash/valve/", "sound/weapons/cbar_hit1.wav", true); - copy_asset("/sdcard/xash/valve/", "sound/weapons/cbar_hit2.wav", true); - copy_asset("/sdcard/xash/valve/", "sound/weapons/cbar_hitbod1.wav", true); - copy_asset("/sdcard/xash/valve/", "sound/weapons/cbar_hitbod2.wav", true); - copy_asset("/sdcard/xash/valve/", "sound/weapons/cbar_hitbod3.wav", true); - copy_asset("/sdcard/xash/valve/", "sound/weapons/cbar_miss1.wav", true); - - copy_asset("/sdcard/xash/valve/", "models/v_torch.mdl", true); - } - - //Set default environment - try { - setenv("XASH3D_BASEDIR", "/sdcard/xash/", true); - setenv("XASH3D_ENGLIBDIR", getFilesDir().getParentFile().getPath() + "/lib", true); - setenv("XASH3D_GAMELIBDIR", getFilesDir().getParentFile().getPath() + "/lib", true); - setenv("XASH3D_GAMEDIR", "valve", true); - setenv( "XASH3D_EXTRAS_PAK1", getFilesDir().getPath() + "/extras.pak", true ); - } - catch (Exception e) - { - - } - //Read these from a file and pass through commandLineParams = new String("xash3d -dev 3 -log"); @@ -299,6 +164,159 @@ import static android.system.Os.setenv; } } + String[] params = commandLineParams.split(" "); + + String game = "valve"; + + int i = 0; + for (i = 0; i < params.length; ++i) + { + if (params[i].compareTo("-game") == 0) + { + game = params[i+1]; + } + } + + //game configuration + copy_asset("/sdcard/xash/" + game + "/", "config.cfg", false); // Copy in case user has deleted their config + + //special commands + copy_asset("/sdcard/xash/" + game + "/", "commands.lst", false); // Copy in case user has deleted their config + + //Copy our special sprites + copy_asset("/sdcard/xash/" + game + "/", "sprites/s_stealth.spr", true); + + //Copy modified weapon models + if (!(new File("/sdcard/xash/" + game + "/models/no_copy").exists())) + { + //Colt (A-16) + copy_asset("/sdcard/xash/" + game + "/", "models/v_9mmar.mdl", true); + copy_asset("/sdcard/xash/" + game + "/", "models/p_9mmar.mdl", true); + copy_asset("/sdcard/xash/" + game + "/", "models/w_9mmar.mdl", true); + copy_asset("/sdcard/xash/" + game + "/", "sound/items/clipinsert1.wav", true); + copy_asset("/sdcard/xash/" + game + "/", "sound/items/cliprelease1.wav", true); + copy_asset("/sdcard/xash/" + game + "/", "sound/weapons/t_m4_boltpull.wav", true); + copy_asset("/sdcard/xash/" + game + "/", "sound/weapons/t_m4_deploy.wav", true); + copy_asset("/sdcard/xash/" + game + "/", "sound/weapons/t_m4_m203_in.wav", true); + copy_asset("/sdcard/xash/" + game + "/", "sound/weapons/t_m4_m203_out.wav", true); + copy_asset("/sdcard/xash/" + game + "/", "sound/weapons/t_m4_m203_shell.wav", true); + + //Colt Pistol M1911 + copy_asset("/sdcard/xash/" + game + "/", "models/v_9mmhandgun.mdl", true); + copy_asset("/sdcard/xash/" + game + "/", "models/p_9mmhandgun.mdl", true); + copy_asset("/sdcard/xash/" + game + "/", "models/w_9mmhandgun.mdl", true); + + //357 Python + copy_asset("/sdcard/xash/" + game + "/", "models/v_357.mdl", true); + copy_asset("/sdcard/xash/" + game + "/", "models/p_357.mdl", true); + copy_asset("/sdcard/xash/" + game + "/", "models/w_357.mdl", true); + copy_asset("/sdcard/xash/" + game + "/", "sound/weapons/357_shot1.wav", true); + copy_asset("/sdcard/xash/" + game + "/", "sound/weapons/357_shot2.wav", true); + + //RGD Grenade + copy_asset("/sdcard/xash/" + game + "/", "models/v_grenade.mdl", true); + copy_asset("/sdcard/xash/" + game + "/", "models/w_grenade.mdl", true); + copy_asset("/sdcard/xash/" + game + "/", "models/p_grenade.mdl", true); + copy_asset("/sdcard/xash/" + game + "/", "sound/weapons/grenade_pinpull.wav", true); + copy_asset("/sdcard/xash/" + game + "/", "sound/weapons/grenade_throw.wav", true); + copy_asset("/sdcard/xash/" + game + "/", "sound/weapons/grenade_draw.wav", true); + copy_asset("/sdcard/xash/" + game + "/", "sound/weapons/explode3.wav", true); + copy_asset("/sdcard/xash/" + game + "/", "sound/weapons/explode4.wav", true); + copy_asset("/sdcard/xash/" + game + "/", "sound/weapons/explode5.wav", true); + + //Shotgun Benelli M3 + copy_asset("/sdcard/xash/" + game + "/", "models/v_shotgun.mdl", true); + copy_asset("/sdcard/xash/" + game + "/", "models/p_shotgun.mdl", true); + copy_asset("/sdcard/xash/" + game + "/", "models/w_shotgun.mdl", true); + copy_asset("/sdcard/xash/" + game + "/", "sound/weapons/m3_insertshell.wav", true); + copy_asset("/sdcard/xash/" + game + "/", "sound/weapons/m3_pump.wav", true); + + //Stalker Rocket + copy_asset("/sdcard/xash/" + game + "/", "models/v_rpg.mdl", true); + copy_asset("/sdcard/xash/" + game + "/", "models/p_rpg.mdl", true); + copy_asset("/sdcard/xash/" + game + "/", "models/w_rpg.mdl", true); + copy_asset("/sdcard/xash/" + game + "/", "models/rpgrocket.mdl", true); + copy_asset("/sdcard/xash/" + game + "/", "models/v_rpgammo.mdl", true); + copy_asset("/sdcard/xash/" + game + "/", "sound/weapons/rocket1.wav", true); + copy_asset("/sdcard/xash/" + game + "/", "sound/weapons/rocketfire1.wav", true); + copy_asset("/sdcard/xash/" + game + "/", "sound/weapons/rpg7_reload.wav", true); + + //Satchel + copy_asset("/sdcard/xash/" + game + "/", "models/v_satchel.mdl", true); + copy_asset("/sdcard/xash/" + game + "/", "models/v_satchel_radio.mdl", true); + copy_asset("/sdcard/xash/" + game + "/", "models/w_satchel.mdl", true); + copy_asset("/sdcard/xash/" + game + "/", "models/p_satchel.mdl", true); + copy_asset("/sdcard/xash/" + game + "/", "models/p_satchel_radio.mdl", true); + + //Tripmine + copy_asset("/sdcard/xash/" + game + "/", "models/v_tripmine.mdl", true); + copy_asset("/sdcard/xash/" + game + "/", "models/p_tripmine.mdl", true); + copy_asset("/sdcard/xash/" + game + "/", "sound/weapons/mine_activate.wav", true); + copy_asset("/sdcard/xash/" + game + "/", "sound/weapons/mine_deploy.wav", true); + copy_asset("/sdcard/xash/" + game + "/", "sound/weapons/tripmine_ant.wav", true); + copy_asset("/sdcard/xash/" + game + "/", "sound/weapons/tripmine_button.wav", true); + copy_asset("/sdcard/xash/" + game + "/", "sound/weapons/tripmine_move.wav", true); + + //BMS Crossbow + copy_asset("/sdcard/xash/" + game + "/", "models/v_crossbow.mdl", true); + copy_asset("/sdcard/xash/" + game + "/", "models/p_crossbow.mdl", true); + copy_asset("/sdcard/xash/" + game + "/", "models/w_crossbow.mdl", true); + copy_asset("/sdcard/xash/" + game + "/", "models/w_crossbow_clip.mdl", true); + copy_asset("/sdcard/xash/" + game + "/", "sound/weapons/natianul.wav", true); + copy_asset("/sdcard/xash/" + game + "/", "sound/weapons/xbow.wav", true); + copy_asset("/sdcard/xash/" + game + "/", "sound/weapons/xbow_fire1.wav", true); + copy_asset("/sdcard/xash/" + game + "/", "sound/weapons/xbow_reload1.wav", true); + + + //Egon (Overhaul) + copy_asset("/sdcard/xash/" + game + "/", "models/v_egon.mdl", true); + copy_asset("/sdcard/xash/" + game + "/", "models/p_egon.mdl", true); + copy_asset("/sdcard/xash/" + game + "/", "models/w_egon.mdl", true); + + //Gauss (Overhaul) + copy_asset("/sdcard/xash/" + game + "/", "models/v_gauss.mdl", true); + copy_asset("/sdcard/xash/" + game + "/", "models/p_gauss.mdl", true); + copy_asset("/sdcard/xash/" + game + "/", "models/w_gauss.mdl", true); + copy_asset("/sdcard/xash/" + game + "/", "models/w_gaussammo.mdl", true); + + //HGun (Overhaul) + copy_asset("/sdcard/xash/" + game + "/", "models/v_hgun.mdl", true); + copy_asset("/sdcard/xash/" + game + "/", "models/p_hgun.mdl", true); + copy_asset("/sdcard/xash/" + game + "/", "models/w_hgun.mdl", true); + + //Squeak (Overhaul) + copy_asset("/sdcard/xash/" + game + "/", "models/v_squeak.mdl", true); + copy_asset("/sdcard/xash/" + game + "/", "models/p_squeak.mdl", true); + copy_asset("/sdcard/xash/" + game + "/", "models/w_squeak.mdl", true); + copy_asset("/sdcard/xash/" + game + "/", "models/w_sqknest.mdl", true); + + //Crowbar + copy_asset("/sdcard/xash/" + game + "/", "models/v_crowbar.mdl", true); + copy_asset("/sdcard/xash/" + game + "/", "models/w_crowbar.mdl", true); + copy_asset("/sdcard/xash/" + game + "/", "sound/weapons/cbar_draw.wav", true); + copy_asset("/sdcard/xash/" + game + "/", "sound/weapons/cbar_hit1.wav", true); + copy_asset("/sdcard/xash/" + game + "/", "sound/weapons/cbar_hit2.wav", true); + copy_asset("/sdcard/xash/" + game + "/", "sound/weapons/cbar_hitbod1.wav", true); + copy_asset("/sdcard/xash/" + game + "/", "sound/weapons/cbar_hitbod2.wav", true); + copy_asset("/sdcard/xash/" + game + "/", "sound/weapons/cbar_hitbod3.wav", true); + copy_asset("/sdcard/xash/" + game + "/", "sound/weapons/cbar_miss1.wav", true); + + copy_asset("/sdcard/xash/" + game + "/", "models/v_torch.mdl", true); + } + + //Set default environment + try { + setenv("XASH3D_BASEDIR", "/sdcard/xash/", true); + setenv("XASH3D_ENGLIBDIR", getFilesDir().getParentFile().getPath() + "/lib", true); + setenv("XASH3D_GAMELIBDIR", getFilesDir().getParentFile().getPath() + "/lib", true); + setenv("XASH3D_GAMEDIR", "valve", true); + setenv( "XASH3D_EXTRAS_PAK1", getFilesDir().getPath() + "/extras.pak", true ); + } + catch (Exception e) + { + + } + mNativeHandle = GLES3JNILib.onCreate( this, commandLineParams ); }