- several more Blood fixes copied from NBlood

This commit is contained in:
Christoph Oelckers 2022-05-06 01:40:27 +02:00
parent 83499740c3
commit acb244653c
6 changed files with 14 additions and 11 deletions

View file

@ -6377,7 +6377,7 @@ DBloodActor* actSpawnThing(sectortype* pSector, int x, int y, int z, int nThingT
actor->xspr.data1 = (nThingType == kThingBloodBits) ? 19 : 8;
actor->xspr.data2 = 0;
actor->xspr.data3 = 0;
actor->xspr.data4 = 318;
actor->xspr.data4 = 319;
actor->xspr.TargetPos.X = PlayClock + 180;
actor->xspr.locked = 1;
actor->xspr.state = 1;

View file

@ -1757,6 +1757,7 @@ void aiInitSprite(DBloodActor* actor)
case kDudeZombieAxeBuried: {
pDudeExtraE->thinkTime = 0;
aiNewState(actor, &zombieEIdle);
actor->spr.flags &= ~1;
break;
}
case kDudeGargoyleFlesh:

View file

@ -263,6 +263,8 @@ static void calebThinkSwimChase(DBloodActor* actor)
else
aiNewState(actor, &tinycaleb13967C);
}
else
aiNewState(actor, &tinycaleb13967C);
}
return;
}

View file

@ -653,7 +653,7 @@ void fxPodBloodSplat(DBloodActor* actor, sectortype*) // 19
int nDist = Random(16) << 4;
int x = actor->spr.pos.X + MulScale(nDist, Cos(nAngle), 28);
int y = actor->spr.pos.Y + MulScale(nDist, Sin(nAngle), 28);
if (actor->spr.ang == 1024)
if (actor->spr.ang == 1024 && actor->spr.type == 53)
{
int nChannel = 28 + (actor->GetIndex() & 2);
assert(nChannel < 32);

View file

@ -398,11 +398,11 @@ int HitScan(DBloodActor* actor, int z, int dx, int dy, int dz, unsigned int nMas
}
else
{
hitscangoal.X = hitscangoal.Y = 0x1ffffff;
hitscangoal.X = hitscangoal.Y = 0x1fffffff;
}
hitscan({ x, y, z }, actor->sector(), { dx, dy, dz << 4 }, gHitInfo, nMask);
hitscangoal.X = hitscangoal.Y = 0x1ffffff;
hitscangoal.X = hitscangoal.Y = 0x1fffffff;
actor->spr.cstat = bakCstat;
if (gHitInfo.actor() != nullptr)
return 3;

View file

@ -1197,6 +1197,7 @@ void ThrowCan(int, PLAYER* pPlayer)
if (spawned)
{
sfxPlay3DSound(spawned, 441, 0, 0);
spawned->spr.shade = -128;
evPostActor(spawned, pPlayer->fuseTime, kCmdOn);
spawned->xspr.Impact = 1;
UseAmmo(pPlayer, 6, gAmmoItemData[0].count);
@ -1870,7 +1871,7 @@ void FireTesla(int nTrigger, PLAYER* pPlayer)
}
}
playerFireMissile(pPlayer, pMissile->offset, pPlayer->aim.dx, pPlayer->aim.dy, pPlayer->aim.dz, pMissile->id);
UseAmmo(pPlayer, 7, pMissile->ammouse);
UseAmmo(pPlayer, pPlayer->weaponAmmo, pMissile->ammouse);
sfxPlay3DSound(pPlayer->actor, pMissile->sound, 1, 0);
pPlayer->visibility = pMissile->light;
pPlayer->flashEffect = pMissile->flash;
@ -1995,7 +1996,6 @@ void AltFireLifeLeech(int, PLAYER* pPlayer)
missile->xspr.Push = 1;
missile->xspr.Proximity = 1;
missile->xspr.DudeLockout = 1;
missile->xspr.data4 = ClipHigh(pPlayer->ammoCount[4], 12);
missile->xspr.stateTimer = 1;
evPostActor(missile, 120, kCallbackLeechStateTimer);
if (gGameOptions.nGameType <= 1)
@ -2147,7 +2147,7 @@ static int WeaponFindLoaded(PLAYER* pPlayer, int* a2)
}
}
}
else if (a2)
if (a2)
*a2 = v14;
return v4;
}
@ -2259,9 +2259,9 @@ static bool processProxy(PLAYER* pPlayer)
pPlayer->weaponState = 8;
StartQAV(pPlayer, kQAVPROXTHRO, nClientThrowProx);
}
break;
return true;
}
return 0;
return false;
}
//---------------------------------------------------------------------------
@ -2281,9 +2281,9 @@ static bool processRemote(PLAYER* pPlayer)
pPlayer->weaponState = 11;
StartQAV(pPlayer, kQAVREMTHRO, nClientThrowRemote);
}
break;
return true;
}
return 0;
return false;
}
//---------------------------------------------------------------------------