mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-16 01:11:28 +00:00
- VectorScan
This commit is contained in:
parent
0466186440
commit
626deed960
5 changed files with 9 additions and 6 deletions
|
@ -6924,7 +6924,7 @@ void actFireVector(DBloodActor* shooter, int a2, int a3, int a4, int a5, int a6,
|
|||
assert(vectorType >= 0 && vectorType < kVectorMax);
|
||||
const VECTORDATA* pVectorData = &gVectorData[vectorType];
|
||||
int nRange = pVectorData->maxDist;
|
||||
int hit = VectorScan(pShooter, a2, a3, a4, a5, a6, nRange, 1);
|
||||
int hit = VectorScan(shooter, a2, a3, a4, a5, a6, nRange, 1);
|
||||
if (hit == 3)
|
||||
{
|
||||
auto hitactor = gHitInfo.hitactor;
|
||||
|
|
|
@ -900,7 +900,7 @@ static void unicultThinkChase(DBloodActor* actor)
|
|||
else if (weaponType == kGenDudeWeaponHitscan && hscn)
|
||||
{
|
||||
if (genDudeAdjustSlope(actor, dist, weaponType)) break;
|
||||
VectorScan(pSprite, 0, 0, bcos(pSprite->ang), bsin(pSprite->ang), actor->dudeSlope, dist, 1);
|
||||
VectorScan(actor, 0, 0, bcos(pSprite->ang), bsin(pSprite->ang), actor->dudeSlope, dist, 1);
|
||||
if (actor == gHitInfo.hitactor) break;
|
||||
|
||||
bool immune = nnExtIsImmune(hitactor, gVectorData[curWeapon].dmgType);
|
||||
|
@ -960,7 +960,7 @@ static void unicultThinkChase(DBloodActor* actor)
|
|||
if (hit == 4 && weaponType == kGenDudeWeaponHitscan && hscn)
|
||||
{
|
||||
bool masked = (pHWall->cstat & CSTAT_WALL_MASKED);
|
||||
if (masked) VectorScan(pSprite, 0, 0, bcos(pSprite->ang), bsin(pSprite->ang), actor->dudeSlope, dist, 1);
|
||||
if (masked) VectorScan(actor, 0, 0, bcos(pSprite->ang), bsin(pSprite->ang), actor->dudeSlope, dist, 1);
|
||||
|
||||
//viewSetSystemMessage("WALL VHIT: %d", gHitInfo.hitwall);
|
||||
if ((actor != gHitInfo.hitactor) && (pHWall->type != kWallGib || !masked || pXHWall == NULL || !pXHWall->triggerVector || pXHWall->locked))
|
||||
|
|
|
@ -424,8 +424,11 @@ int HitScan(DBloodActor *actor, int z, int dx, int dy, int dz, unsigned int nMas
|
|||
return -1;
|
||||
}
|
||||
|
||||
int VectorScan(spritetype *pSprite, int nOffset, int nZOffset, int dx, int dy, int dz, int nRange, int ac)
|
||||
int VectorScan(DBloodActor *actor, int nOffset, int nZOffset, int dx, int dy, int dz, int nRange, int ac)
|
||||
{
|
||||
assert(actor != NULL);
|
||||
auto pSprite = &actor->s();
|
||||
|
||||
int nNum = 256;
|
||||
assert(pSprite != NULL);
|
||||
gHitInfo.clearObj();
|
||||
|
|
|
@ -82,7 +82,7 @@ int GetWallAngle(walltype* pWall);
|
|||
void GetWallNormal(int nWall, int *pX, int *pY);
|
||||
bool IntersectRay(int wx, int wy, int wdx, int wdy, int x1, int y1, int z1, int x2, int y2, int z2, int *ix, int *iy, int *iz);
|
||||
int HitScan(DBloodActor *pSprite, int z, int dx, int dy, int dz, unsigned int nMask, int a8);
|
||||
int VectorScan(spritetype *pSprite, int nOffset, int nZOffset, int dx, int dy, int dz, int nRange, int ac);
|
||||
int VectorScan(DBloodActor *pSprite, int nOffset, int nZOffset, int dx, int dy, int dz, int nRange, int ac);
|
||||
void GetZRange(spritetype *pSprite, int *ceilZ, Collision *ceilHit, int *floorZ, Collision *floorHit, int nDist, unsigned int nMask, unsigned int nClipParallax = 0);
|
||||
void GetZRangeAtXYZ(int x, int y, int z, int nSector, int *ceilZ, Collision *ceilHit, int *floorZ, Collision *floorHit, int nDist, unsigned int nMask, unsigned int nClipParallax = 0);
|
||||
int GetDistToLine(int x1, int y1, int x2, int y2, int x3, int y3);
|
||||
|
|
|
@ -1336,7 +1336,7 @@ void nnExtProcessSuperSprites()
|
|||
|
||||
HitScan(pPlayer->actor(), pPlayer->zWeapon, pPlayer->aim.dx, pPlayer->aim.dy, pPlayer->aim.dz, CLIPMASK0 | CLIPMASK1, 0);
|
||||
|
||||
//VectorScan(pPlaySprite, 0, pPlayer->zWeapon, pPlayer->aim.dx, pPlayer->aim.dy, pPlayer->aim.dz, 0, 1);
|
||||
//VectorScan(pPlayer->actor(), 0, pPlayer->zWeapon, pPlayer->aim.dx, pPlayer->aim.dy, pPlayer->aim.dz, 0, 1);
|
||||
|
||||
if (!vector)
|
||||
pSightSpr->cstat &= ~CSTAT_SPRITE_BLOCK_HITSCAN;
|
||||
|
|
Loading…
Reference in a new issue