Updates
- Cycle through all available weapons - Ensure phone orientation is fixed landscape
|
@ -7,8 +7,8 @@ android {
|
||||||
applicationId "com.drbeef.dvr"
|
applicationId "com.drbeef.dvr"
|
||||||
minSdkVersion 16
|
minSdkVersion 16
|
||||||
targetSdkVersion 19
|
targetSdkVersion 19
|
||||||
versionCode 3
|
versionCode 6
|
||||||
versionName '1.0.2'
|
versionName '1.0.5'
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
|
|
|
@ -155,58 +155,64 @@ int weapon_preferences[2][NUMWEAPONS+1] = {
|
||||||
|
|
||||||
int P_SwitchWeapon(player_t *player)
|
int P_SwitchWeapon(player_t *player)
|
||||||
{
|
{
|
||||||
int *prefer = weapon_preferences[demo_compatibility!=0]; // killough 3/22/98
|
int prefer = player->readyweapon;//weapon_preferences[demo_compatibility!=0]; // killough 3/22/98
|
||||||
int currentweapon = player->readyweapon;
|
int currentweapon = player->readyweapon;
|
||||||
int newweapon = currentweapon;
|
int newweapon = currentweapon;
|
||||||
int i = NUMWEAPONS+1; // killough 5/2/98
|
int i = NUMWEAPONS+1; // killough 5/2/98
|
||||||
|
|
||||||
// killough 2/8/98: follow preferences and fix BFG/SSG bugs
|
// killough 2/8/98: follow preferences and fix BFG/SSG bugs
|
||||||
|
|
||||||
do
|
//SB: Change to cycle through all (available) weapons
|
||||||
switch (*prefer++)
|
do {
|
||||||
{
|
if (++prefer == NUMWEAPONS+1)
|
||||||
|
{
|
||||||
|
prefer = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (prefer) {
|
||||||
case 1:
|
case 1:
|
||||||
if (!player->powers[pw_strength]) // allow chainsaw override
|
if (!player->powers[pw_strength]) // allow chainsaw override
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 0:
|
||||||
newweapon = wp_fist;
|
newweapon = wp_fist;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if (player->ammo[am_clip])
|
if (player->ammo[am_clip])
|
||||||
newweapon = wp_pistol;
|
newweapon = wp_pistol;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
if (player->weaponowned[wp_shotgun] && player->ammo[am_shell])
|
if (player->weaponowned[wp_shotgun] && player->ammo[am_shell])
|
||||||
newweapon = wp_shotgun;
|
newweapon = wp_shotgun;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
if (player->weaponowned[wp_chaingun] && player->ammo[am_clip])
|
if (player->weaponowned[wp_chaingun] && player->ammo[am_clip])
|
||||||
newweapon = wp_chaingun;
|
newweapon = wp_chaingun;
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
if (player->weaponowned[wp_missile] && player->ammo[am_misl])
|
if (player->weaponowned[wp_missile] && player->ammo[am_misl])
|
||||||
newweapon = wp_missile;
|
newweapon = wp_missile;
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
if (player->weaponowned[wp_plasma] && player->ammo[am_cell] &&
|
if (player->weaponowned[wp_plasma] && player->ammo[am_cell] &&
|
||||||
gamemode != shareware)
|
gamemode != shareware)
|
||||||
newweapon = wp_plasma;
|
newweapon = wp_plasma;
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
if (player->weaponowned[wp_bfg] && gamemode != shareware &&
|
if (player->weaponowned[wp_bfg] && gamemode != shareware &&
|
||||||
player->ammo[am_cell] >= (demo_compatibility ? 41 : 40))
|
player->ammo[am_cell] >= (demo_compatibility ? 41 : 40))
|
||||||
newweapon = wp_bfg;
|
newweapon = wp_bfg;
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
if (player->weaponowned[wp_chainsaw])
|
if (player->weaponowned[wp_chainsaw])
|
||||||
newweapon = wp_chainsaw;
|
newweapon = wp_chainsaw;
|
||||||
break;
|
break;
|
||||||
case 9:
|
case 9:
|
||||||
if (player->weaponowned[wp_supershotgun] && gamemode == commercial &&
|
if (player->weaponowned[wp_supershotgun] && gamemode == commercial &&
|
||||||
player->ammo[am_shell] >= (demo_compatibility ? 3 : 2))
|
player->ammo[am_shell] >= (demo_compatibility ? 3 : 2))
|
||||||
newweapon = wp_supershotgun;
|
newweapon = wp_supershotgun;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
while (newweapon==currentweapon && --i); // killough 5/2/98
|
while (newweapon==currentweapon && --i); // killough 5/2/98
|
||||||
return newweapon;
|
return newweapon;
|
||||||
}
|
}
|
||||||
|
|
|
@ -161,7 +161,6 @@ public class MainActivity
|
||||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||||
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||||
|
|
||||||
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE);
|
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
setContentView(R.layout.activity_main);
|
setContentView(R.layout.activity_main);
|
||||||
|
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 30 KiB |