mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 00:41:55 +00:00
Better stupid names for stupid macros in stupid function
git-svn-id: https://svn.eduke32.com/eduke32@7670 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
c3f7c26708
commit
605d88bb41
1 changed files with 13 additions and 16 deletions
|
@ -2799,20 +2799,18 @@ badindex:
|
|||
|
||||
vInstruction(CON_IFCANSHOOTTARGET):
|
||||
{
|
||||
#define CHECK(x) \
|
||||
#define CHECK_PICNUM(x) \
|
||||
if ((unsigned)x < MAXSPRITES && sprite[x].picnum == vm.pSprite->picnum) \
|
||||
{ \
|
||||
VM_CONDITIONAL(0); \
|
||||
dispatch(); \
|
||||
}
|
||||
|
||||
#define CHECK2(x) \
|
||||
do \
|
||||
{ \
|
||||
vm.pSprite->ang += x; \
|
||||
tw = A_CheckHitSprite(vm.spriteNum, &temphit); \
|
||||
vm.pSprite->ang -= x; \
|
||||
} while (0)
|
||||
#define CHECK_HIT_SPRITE(x) \
|
||||
vm.pSprite->ang += x; \
|
||||
tw = A_CheckHitSprite(vm.spriteNum, &temphit); \
|
||||
vm.pSprite->ang -= x;
|
||||
|
||||
if (vm.playerDist > 1024)
|
||||
{
|
||||
int16_t temphit;
|
||||
|
@ -2832,20 +2830,19 @@ badindex:
|
|||
angDiff = 48;
|
||||
}
|
||||
|
||||
|
||||
if (tw > dist)
|
||||
{
|
||||
CHECK(temphit);
|
||||
CHECK2(angDiff);
|
||||
CHECK_PICNUM(temphit);
|
||||
CHECK_HIT_SPRITE(angDiff);
|
||||
|
||||
if (tw > dist)
|
||||
{
|
||||
CHECK(temphit);
|
||||
CHECK2(-angDiff);
|
||||
CHECK_PICNUM(temphit);
|
||||
CHECK_HIT_SPRITE(-angDiff);
|
||||
|
||||
if (tw > 768)
|
||||
{
|
||||
CHECK(temphit);
|
||||
CHECK_PICNUM(temphit);
|
||||
VM_CONDITIONAL(1);
|
||||
dispatch();
|
||||
}
|
||||
|
@ -2853,8 +2850,8 @@ badindex:
|
|||
}
|
||||
}
|
||||
VM_CONDITIONAL(1);
|
||||
#undef CHECK
|
||||
#undef CHECK2
|
||||
#undef CHECK_PICNUM
|
||||
#undef CHECK_HIT_SPRITE
|
||||
}
|
||||
dispatch();
|
||||
|
||||
|
|
Loading…
Reference in a new issue