Use custom config with weapon adjustment for OpenArena

This commit is contained in:
Petr Bartos 2022-04-09 20:56:40 +02:00
parent bef1e32a2c
commit 84984d30e7
2 changed files with 81 additions and 2 deletions

View file

@ -0,0 +1,75 @@
bind LEFTARROW +moveleft
bind RIGHTARROW +moveright
sensitivity 100
set in_joystick 1
set r_externalGLSL 1
set r_stereoEnabled 1
set r_mode -2
set cg_runpitch 0
set cg_runroll 0
set cg_bobup 0
set cg_bobpitch 0
set cg_bobroll 0
set cg_weaponbob 0
set sv_pure 0
set sv_master1 "13.36.227.32:27950"
set vr_weapon_adjustment_1 "1.0,0,12,-13,-36,0,100"
set vr_weapon_adjustment_2 "1.0,-6,6,-3,0,0,0"
set vr_weapon_adjustment_3 "0.8,-6,8,-8,0,0,0"
set vr_weapon_adjustment_4 "1.0,-5,7,-4,0,0,0"
set vr_weapon_adjustment_5 "1.0,-5,6,-4,0,0,0"
set vr_weapon_adjustment_6 "0.8,-3,10,8,0,0,-10"
set vr_weapon_adjustment_7 "0.8,-5,8,0,0,0,0"
set vr_weapon_adjustment_8 "0.9,-4,8,-2,0,0,0"
set vr_weapon_adjustment_9 "1.0,-7,10,-4,0,0,0"
//////////////////////////////////////////////////////////////////////////////////////////////////
// //
// Custom Button mappings - ONLY put overrides of defaults in here, such as alt key mappings. //
// //
// Contained sample mapping corresponds to default control schema. Note that by mapping //
// thumbstick diagonals, thumbstick switches to 8-way mode requiring more precise input! //
// //
// To activate mapping, do not forget to remove "//" (marking commented out / inactive line). //
// Also note that custom mappings will be overridden by defaults until game restart in case //
// controls are changed from in-game menu. //
// //
//////////////////////////////////////////////////////////////////////////////////////////////////
// set vr_button_map_A "+moveup"
// set vr_button_map_A_ALT ""
// set vr_button_map_B "+movedown"
// set vr_button_map_B_ALT ""
// set vr_button_map_X "+button2"
// set vr_button_map_X_ALT ""
// set vr_button_map_Y "+button3"
// set vr_button_map_Y_ALT ""
// set vr_button_map_SECONDARYTHUMBSTICK "+scores"
// set vr_button_map_SECONDARYTHUMBSTICK_ALT ""
// set vr_button_map_PRIMARYTHUMBSTICK ""
// set vr_button_map_PRIMARYTHUMBSTICK_ALT ""
// set vr_button_map_SECONDARYTRIGGER "+moveup"
// set vr_button_map_SECONDARYTRIGGER_ALT ""
// set vr_button_map_PRIMARYTRIGGER "+attack"
// set vr_button_map_PRIMARYTRIGGER_ALT ""
// set vr_button_map_SECONDARYGRIP "+weapon_stabilise"
// set vr_button_map_SECONDARYGRIP_ALT ""
// set vr_button_map_PRIMARYGRIP "+weapon_select"
// set vr_button_map_PRIMARYGRIP_ALT ""
// set vr_button_map_RTHUMBFORWARD "weapnext"
// set vr_button_map_RTHUMBFORWARD_ALT ""
// set vr_button_map_RTHUMBFORWARDRIGHT ""
// set vr_button_map_RTHUMBFORWARDRIGHT_ALT ""
// set vr_button_map_RTHUMBRIGHT "turnright"
// set vr_button_map_RTHUMBRIGHT_ALT ""
// set vr_button_map_RTHUMBBACKRIGHT ""
// set vr_button_map_RTHUMBBACKRIGHT_ALT ""
// set vr_button_map_RTHUMBBACK "weapprev"
// set vr_button_map_RTHUMBBACK_ALT ""
// set vr_button_map_RTHUMBBACKLEFT ""
// set vr_button_map_RTHUMBBACKLEFT_ALT ""
// set vr_button_map_RTHUMBLEFT "turnleft"
// set vr_button_map_RTHUMBLEFT_ALT ""
// set vr_button_map_RTHUMBFORWARDLEFT ""
// set vr_button_map_RTHUMBFORWARDLEFT_ALT ""

View file

@ -106,7 +106,7 @@ public class MainActivity extends SDLActivity // implements KeyEvent.Callback
//If open arena is installed then copy necessary stuff
if (new File("/sdcard/ioquake3Quest/baseoa").exists()) {
copy_asset("/sdcard/ioquake3Quest/baseoa", "autoexec.cfg", false);
copy_asset("/sdcard/ioquake3Quest/baseoa", "autoexec_oa.cfg", "autoexec.cfg", false);
copy_asset("/sdcard/ioquake3Quest/baseoa", "pakQ3Q.pk3", true);
}
@ -152,6 +152,10 @@ public class MainActivity extends SDLActivity // implements KeyEvent.Callback
}
public void copy_asset(String path, String name, boolean force) {
copy_asset(path, name, name, force);
}
public void copy_asset(String path, String name, String newName, boolean force) {
File f = new File(path + "/" + name);
if (!f.exists() || force) {
@ -159,7 +163,7 @@ public class MainActivity extends SDLActivity // implements KeyEvent.Callback
String fullname = path + "/" + name;
String directory = fullname.substring(0, fullname.lastIndexOf("/"));
new File(directory).mkdirs();
_copy_asset(name, path + "/" + name);
_copy_asset(name, path + "/" + targetName);
}
}