mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-16 01:11:28 +00:00
In 'tip' display code, extrapolate four more values of the y coord table.
Also, for tip_incs values greater or equal than the number of elements in this table, return early reporting that the hand has been drawn, so that the otherwise selected weapon is not drawn. git-svn-id: https://svn.eduke32.com/eduke32@3630 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
e63874d011
commit
cbfd2eb438
2 changed files with 11 additions and 3 deletions
|
@ -25,5 +25,6 @@ enda
|
|||
define CYCLOIDHEAD 490
|
||||
// Will have a flat-sprite-on-floor shadow and be an autoaim target.
|
||||
useractor 1 CYCLOIDHEAD 10
|
||||
ifpdistl 1024 tip
|
||||
state killme
|
||||
enda
|
||||
|
|
|
@ -2020,14 +2020,20 @@ static int32_t P_DisplayTip(int32_t gs,int32_t snum)
|
|||
-84,-108,-108,-108,-108,
|
||||
-108,-108,-108,-108,-108,
|
||||
-108,-96,-72,-64,-32,
|
||||
-16
|
||||
-16, /* EDuke32: */ 0, 16, 32, 48,
|
||||
// At y coord 64, the hand is already not shown.
|
||||
};
|
||||
|
||||
const DukePlayer_t *const ps = g_player[snum].ps;
|
||||
|
||||
if (ps->tipincs == 0 || ps->tipincs >= ARRAY_SIZE(tip_y))
|
||||
if (ps->tipincs == 0)
|
||||
return 0;
|
||||
|
||||
// Report that the tipping hand has been drawn so that the otherwise
|
||||
// selected weapon is not drawn.
|
||||
if (ps->tipincs >= ARRAY_SIZE(tip_y))
|
||||
return 1;
|
||||
|
||||
looking_arc = klabs(ps->look_ang)/9;
|
||||
looking_arc -= (ps->hard_landing<<3);
|
||||
|
||||
|
@ -2961,7 +2967,8 @@ static int32_t P_DoCounters(DukePlayer_t *p)
|
|||
if (p->invdisptime > 0)
|
||||
p->invdisptime--;
|
||||
|
||||
if (p->tipincs > 0) p->tipincs--;
|
||||
if (p->tipincs > 0)
|
||||
p->tipincs--;
|
||||
|
||||
if (p->last_pissed_time > 0)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue