mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
Two new player structure members: "autostep" and "autostep_sbw".
These control the maximum difference in height between two sectors that the player will automatically traverse without needing to jump. The latter controls the special case when the player's sector's lotag is ST_1_ABOVE_WATER or p->spritebridge == 1. BYTEVERSION bumped. git-svn-id: https://svn.eduke32.com/eduke32@3100 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
3366df0dbd
commit
2066656aed
7 changed files with 25 additions and 5 deletions
|
@ -57,7 +57,7 @@ extern "C" {
|
|||
#define VOLUMEONE (g_Shareware == 1)
|
||||
|
||||
// increase by 3, because atomic GRP adds 1, and Shareware adds 2
|
||||
#define BYTEVERSION_JF 249
|
||||
#define BYTEVERSION_JF 252
|
||||
|
||||
#define BYTEVERSION_13 27
|
||||
#define BYTEVERSION_14 116
|
||||
|
|
|
@ -971,6 +971,8 @@ const memberlabel_t PlayerLabels[]=
|
|||
{ "max_shield_amount", PLAYER_MAX_SHIELD_AMOUNT, 0, 0 },
|
||||
{ "max_ammo_amount", PLAYER_MAX_AMMO_AMOUNT, LABEL_HASPARM2, MAX_WEAPONS },
|
||||
{ "last_quick_kick", PLAYER_LAST_QUICK_KICK, 0, 0 },
|
||||
{ "autostep", PLAYER_AUTOSTEP, 0, 0 },
|
||||
{ "autostep_sbw", PLAYER_AUTOSTEP_SBW, 0, 0 },
|
||||
{ "", -1, 0, 0 } // END OF LIST
|
||||
};
|
||||
|
||||
|
|
|
@ -319,6 +319,8 @@ enum PlayerLabel_t
|
|||
PLAYER_MAX_SHIELD_AMOUNT,
|
||||
PLAYER_MAX_AMMO_AMOUNT,
|
||||
PLAYER_LAST_QUICK_KICK,
|
||||
PLAYER_AUTOSTEP,
|
||||
PLAYER_AUTOSTEP_SBW,
|
||||
PLAYER_END
|
||||
};
|
||||
|
||||
|
|
|
@ -1524,7 +1524,11 @@ static void __fastcall VM_GetPlayer(register int32_t lVar1, register int32_t lLa
|
|||
case PLAYER_MAX_AMMO_AMOUNT:
|
||||
Gv_SetVarX(lVar2, ps->max_ammo_amount[lParm2]); return;
|
||||
case PLAYER_LAST_QUICK_KICK:
|
||||
Gv_SetVarX(lVar2, ps->last_quick_kick);
|
||||
Gv_SetVarX(lVar2, ps->last_quick_kick); return;
|
||||
case PLAYER_AUTOSTEP:
|
||||
Gv_SetVarX(lVar2, ps->autostep); return;
|
||||
case PLAYER_AUTOSTEP_SBW:
|
||||
Gv_SetVarX(lVar2, ps->autostep_sbw);
|
||||
return;
|
||||
|
||||
default:
|
||||
|
@ -1871,7 +1875,11 @@ static void __fastcall VM_SetPlayer(int32_t lVar1, int32_t lLabelID, int32_t lVa
|
|||
case PLAYER_MAX_AMMO_AMOUNT:
|
||||
ps->max_ammo_amount[lParm2]=lVar1; return;
|
||||
case PLAYER_LAST_QUICK_KICK:
|
||||
ps->last_quick_kick=lVar1;
|
||||
ps->last_quick_kick=lVar1; return;
|
||||
case PLAYER_AUTOSTEP:
|
||||
ps->autostep=lVar1; return;
|
||||
case PLAYER_AUTOSTEP_SBW:
|
||||
ps->autostep_sbw=lVar1;
|
||||
return;
|
||||
|
||||
default:
|
||||
|
@ -3806,6 +3814,10 @@ static int32_t __fastcall VM_AccessPlayerX(int32_t iPlayer, int32_t lLabelID, in
|
|||
return ps->max_ammo_amount[lParm2];
|
||||
case PLAYER_LAST_QUICK_KICK:
|
||||
return ps->last_quick_kick;
|
||||
case PLAYER_AUTOSTEP:
|
||||
return ps->autostep;
|
||||
case PLAYER_AUTOSTEP_SBW:
|
||||
return ps->autostep_sbw;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -5172,8 +5172,8 @@ void P_ProcessInput(int32_t snum)
|
|||
}
|
||||
|
||||
HORIZONLY:
|
||||
if (psectlotag == ST_1_ABOVE_WATER || p->spritebridge == 1) i = (4L<<8);
|
||||
else i = (20L<<8);
|
||||
if (psectlotag == ST_1_ABOVE_WATER || p->spritebridge == 1) i = p->autostep_sbw;
|
||||
else i = p->autostep;
|
||||
|
||||
if (p->cursectnum >= 0 && sector[p->cursectnum].lotag == ST_2_UNDERWATER) k = 0;
|
||||
else k = 1;
|
||||
|
|
|
@ -147,6 +147,7 @@ typedef struct {
|
|||
int32_t truefz, truecz, player_par;
|
||||
int32_t randomflamex, exitx, exity;
|
||||
int32_t runspeed, max_player_health, max_shield_amount;
|
||||
int32_t autostep, autostep_sbw;
|
||||
|
||||
uint32_t interface_toggle_flag;
|
||||
|
||||
|
|
|
@ -1670,6 +1670,9 @@ static void resetpspritevars(char g)
|
|||
g_player[j].ps->frag_ps = j;
|
||||
actor[i].owner = i;
|
||||
|
||||
g_player[j].ps->autostep = (20L<<8);
|
||||
g_player[j].ps->autostep_sbw = (4L<<8);
|
||||
|
||||
actor[i].bposx = g_player[j].ps->bobposx = g_player[j].ps->opos.x = g_player[j].ps->pos.x = s->x;
|
||||
actor[i].bposy = g_player[j].ps->bobposy = g_player[j].ps->opos.y = g_player[j].ps->pos.y = s->y;
|
||||
actor[i].bposz = g_player[j].ps->opos.z = g_player[j].ps->pos.z = s->z;
|
||||
|
|
Loading…
Reference in a new issue