mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-20 18:42:26 +00:00
- Duke: extended neartag wrapper to use 32 bit integers as return values.
This commit is contained in:
parent
887279f8a5
commit
de7a06bea4
4 changed files with 15 additions and 9 deletions
|
@ -205,12 +205,15 @@ inline int hitscan(int x, int y, int z, int16_t sectnum, int32_t vx, int32_t vy,
|
|||
}
|
||||
|
||||
inline void neartag(int32_t xs, int32_t ys, int32_t zs, int16_t sectnum, int16_t ange,
|
||||
int16_t* neartagsector, int16_t* neartagwall, DDukeActor** neartagsprite,
|
||||
int* neartagsector, int* neartagwall, DDukeActor** neartagsprite,
|
||||
int32_t* neartaghitdist, int32_t neartagrange, uint8_t tagsearch)
|
||||
{
|
||||
int16_t nts;
|
||||
::neartag(xs, ys, zs, sectnum, ange, neartagsector, neartagwall, &nts, neartaghitdist, neartagrange, tagsearch);
|
||||
int16_t ntsec, ntwal;
|
||||
::neartag(xs, ys, zs, sectnum, ange, &ntsec, &ntwal, &nts, neartaghitdist, neartagrange, tagsearch);
|
||||
*neartagsprite = nts == -1 ? nullptr : &hittype[nts];
|
||||
*neartagsector = ntsec;
|
||||
*neartagwall = ntwal;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2490,14 +2490,16 @@ int ParseState::parse(void)
|
|||
insptr++;
|
||||
if( g_sp->sector()->lotag == 0 )
|
||||
{
|
||||
int16_t neartagsector, neartagwall;
|
||||
int neartagsector, neartagwall;
|
||||
DDukeActor* neartagsprite;
|
||||
int32_t neartaghitdist;
|
||||
neartag(g_sp->x, g_sp->y, g_sp->z - (32 << 8), g_sp->sectnum, g_sp->ang, &neartagsector, &neartagwall, &neartagsprite, &neartaghitdist, 768L, 1);
|
||||
if( neartagsector >= 0 && isanearoperator(sector[neartagsector].lotag) )
|
||||
if( (sector[neartagsector].lotag&0xff) == ST_23_SWINGING_DOOR || sector[neartagsector].floorz == sector[neartagsector].ceilingz )
|
||||
if( (sector[neartagsector].lotag&16384) == 0 )
|
||||
if ((sector[neartagsector].lotag & 32768) == 0)
|
||||
if (neartagsector >= 0)
|
||||
{
|
||||
auto sectp = §or[neartagsector];
|
||||
if (isanearoperator(sectp->lotag))
|
||||
if ((sectp->lotag & 0xff) == ST_23_SWINGING_DOOR || sectp->floorz == sectp->ceilingz)
|
||||
if ((sectp->lotag & 16384) == 0 && (sectp->lotag & 32768) == 0)
|
||||
{
|
||||
DukeSectIterator it(neartagsector);
|
||||
DDukeActor* a2;
|
||||
|
@ -2510,6 +2512,7 @@ int ParseState::parse(void)
|
|||
if (a2 == nullptr)
|
||||
operatesectors(neartagsector, g_ac);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case concmd_ifinspace:
|
||||
|
|
|
@ -1494,7 +1494,7 @@ void checksectors_d(int snum)
|
|||
int i = -1, oldz;
|
||||
struct player_struct* p;
|
||||
int j, hitscanwall;
|
||||
short neartagsector, neartagwall;
|
||||
int neartagsector, neartagwall;
|
||||
DDukeActor* neartagsprite;
|
||||
int neartaghitdist;
|
||||
|
||||
|
|
|
@ -2439,7 +2439,7 @@ void checksectors_r(int snum)
|
|||
int i = -1, oldz;
|
||||
struct player_struct* p;
|
||||
int hitscanwall;
|
||||
short neartagsector, neartagwall;
|
||||
int neartagsector, neartagwall;
|
||||
DDukeActor* neartagsprite;
|
||||
int neartaghitdist;
|
||||
|
||||
|
|
Loading…
Reference in a new issue