mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
Rename getinput() to P_GetInput(), add bounds checking for a few arrays used for weapon drawing that use kickback_pic as an index.
git-svn-id: https://svn.eduke32.com/eduke32@3902 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
6516a29778
commit
214baa9475
3 changed files with 15 additions and 6 deletions
|
@ -11806,7 +11806,7 @@ MAIN_LOOP_RESTART:
|
|||
if (g_networkMode != NET_DEDICATED_SERVER)
|
||||
{
|
||||
CONTROL_ProcessBinds();
|
||||
getinput(myconnectindex);
|
||||
P_GetInput(myconnectindex);
|
||||
}
|
||||
|
||||
avg.fvel += loc.fvel;
|
||||
|
|
|
@ -2479,6 +2479,9 @@ void P_DisplayWeapon(int32_t snum)
|
|||
else if ((*kb) < 20)
|
||||
gun_pos -= 9*((*kb)-14); //D
|
||||
|
||||
if (*kb >= ARRAY_SIZE(throw_frames))
|
||||
break;
|
||||
|
||||
G_DrawWeaponTile(weapon_xoffset+190-(p->look_ang>>1),looking_arc+250-gun_pos,HANDTHROW+throw_frames[(*kb)],gs,o,pal,0);
|
||||
}
|
||||
}
|
||||
|
@ -2493,12 +2496,12 @@ void P_DisplayWeapon(int32_t snum)
|
|||
{
|
||||
static uint8_t remote_frames[] = {0,1,1,2,1,1,0,0,0,0,0};
|
||||
|
||||
if (*kb >= ARRAY_SIZE(remote_frames))
|
||||
break;
|
||||
|
||||
weapon_xoffset = -48;
|
||||
guniqhudid = cw;
|
||||
// if ((*kb))
|
||||
G_DrawWeaponTile(weapon_xoffset+150-(p->look_ang>>1),looking_arc+258-gun_pos,HANDREMOTE+remote_frames[(*kb)],gs,o,pal,0);
|
||||
// else
|
||||
// G_DrawWeaponTile(weapon_xoffset+150-(p->look_ang>>1),looking_arc+258-gun_pos,HANDREMOTE,gs,o,pal,0);
|
||||
guniqhudid = 0;
|
||||
}
|
||||
break;
|
||||
|
@ -2510,6 +2513,9 @@ void P_DisplayWeapon(int32_t snum)
|
|||
{
|
||||
static uint8_t cycloidy[] = {0,4,12,24,12,4,0};
|
||||
|
||||
if (*kb >= ARRAY_SIZE(cycloidy))
|
||||
break;
|
||||
|
||||
i = ksgn((*kb)>>2);
|
||||
|
||||
if (p->hbomb_hold_delay)
|
||||
|
@ -2547,6 +2553,9 @@ void P_DisplayWeapon(int32_t snum)
|
|||
{
|
||||
static uint8_t cat_frames[] = { 0,0,1,1,2,2 };
|
||||
|
||||
if (*kb%6 >= ARRAY_SIZE(cat_frames))
|
||||
break;
|
||||
|
||||
if (doanim)
|
||||
{
|
||||
weapon_xoffset += rand()&3;
|
||||
|
@ -2666,7 +2675,7 @@ int32_t g_myAimMode = 0, g_myAimStat = 0, g_oldAimStat = 0;
|
|||
int32_t mouseyaxismode = -1;
|
||||
int32_t g_emuJumpTics = 0;
|
||||
|
||||
void getinput(int32_t snum)
|
||||
void P_GetInput(int32_t snum)
|
||||
{
|
||||
int32_t j, daang;
|
||||
static ControlInfo info[2];
|
||||
|
|
|
@ -350,7 +350,7 @@ static inline void P_PalFrom(DukePlayer_t *p, uint8_t f, uint8_t r, uint8_t g, u
|
|||
}
|
||||
|
||||
int32_t A_GetHitscanRange(int32_t i);
|
||||
void getinput(int32_t snum);
|
||||
void P_GetInput(int32_t snum);
|
||||
void P_AddAmmo(int32_t weapon,DukePlayer_t *p,int32_t amount);
|
||||
void P_AddWeapon(DukePlayer_t *p,int32_t weapon);
|
||||
void P_AddWeaponNoSwitch(DukePlayer_t *p,int32_t weapon);
|
||||
|
|
Loading…
Reference in a new issue