mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
Android fixes: let the player climb stairs while crouched and fix the quick switch function of the weapon wheel. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4994 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
21fbf2e9df
commit
c486256e01
1 changed files with 14 additions and 4 deletions
|
@ -3095,6 +3095,7 @@ static void P_ChangeWeapon(DukePlayer_t *p, int32_t weapon)
|
|||
if (i != -2)
|
||||
p->curr_weapon = weapon;
|
||||
|
||||
|
||||
p->random_club_frame = 0;
|
||||
|
||||
if (p->weapon_pos == 0)
|
||||
|
@ -3115,15 +3116,19 @@ static void P_ChangeWeapon(DukePlayer_t *p, int32_t weapon)
|
|||
|
||||
if (p->holster_weapon)
|
||||
{
|
||||
#ifdef __ANDROID__
|
||||
CONTROL_Android_SetLastWeapon(p->last_weapon);
|
||||
#endif
|
||||
|
||||
p->weapon_pos = WEAPON_POS_RAISE;
|
||||
p->holster_weapon = 0;
|
||||
p->last_weapon = -1;
|
||||
}
|
||||
|
||||
#ifdef __ANDROID__
|
||||
if (curr_weapon != p->curr_weapon &&
|
||||
// p->last_weapon != -1 &&
|
||||
!(PWEAPON(snum, curr_weapon, WorksLike) == HANDREMOTE_WEAPON && PWEAPON(snum, p->curr_weapon, WorksLike) == HANDBOMB_WEAPON) &&
|
||||
!(PWEAPON(snum, curr_weapon, WorksLike) == HANDBOMB_WEAPON && PWEAPON(snum, p->curr_weapon, WorksLike) == HANDREMOTE_WEAPON))
|
||||
CONTROL_Android_SetLastWeapon(PWEAPON(snum, curr_weapon, WorksLike) == HANDREMOTE_WEAPON ? (int)HANDBOMB_WEAPON : curr_weapon);
|
||||
#endif
|
||||
|
||||
p->kickback_pic = 0;
|
||||
|
||||
P_SetWeaponGamevars(snum, p);
|
||||
|
@ -4954,6 +4959,11 @@ HORIZONLY:
|
|||
if (psectlotag == ST_1_ABOVE_WATER || p->spritebridge == 1) i = p->autostep_sbw;
|
||||
else i = p->autostep;
|
||||
|
||||
#ifdef EDUKE32_TOUCH_DEVICES
|
||||
if (TEST_SYNC_KEY(sb_snum, SK_CROUCH))
|
||||
i = p->autostep_sbw;
|
||||
#endif
|
||||
|
||||
if (p->cursectnum >= 0 && sector[p->cursectnum].lotag == ST_2_UNDERWATER) k = 0;
|
||||
else k = 1;
|
||||
|
||||
|
|
Loading…
Reference in a new issue