mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-31 13:10:39 +00:00
- floatified actSpawnDude and removed its unused last parameter.
All callers left it at 0.
This commit is contained in:
parent
aa0b6bb077
commit
6c6fdaf332
6 changed files with 13 additions and 15 deletions
|
@ -6179,25 +6179,23 @@ DBloodActor* actSpawnSprite(DBloodActor* source, int nStat)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
DBloodActor* actSpawnDude(DBloodActor* source, int nType, int a3, int a4)
|
||||
DBloodActor* actSpawnDude(DBloodActor* source, int nType, double dist)
|
||||
{
|
||||
auto spawned = actSpawnSprite(source, kStatDude);
|
||||
if (!spawned) return nullptr;
|
||||
int angle = source->int_ang();
|
||||
DAngle angle = source->spr.angle;
|
||||
int nDude = nType - kDudeBase;
|
||||
|
||||
auto pos = source->spr.pos;
|
||||
pos.Z += a4 * zinttoworld;
|
||||
|
||||
if (a3 >= 0)
|
||||
if (dist >= 0)
|
||||
{
|
||||
pos.X += mulscale30r(Cos(angle), a3) * inttoworld;
|
||||
pos.Y += mulscale30r(Sin(angle), a3) * inttoworld;
|
||||
pos.XY() += angle.ToVector() * dist;
|
||||
}
|
||||
spawned->spr.type = nType;
|
||||
if (!VanillaMode())
|
||||
spawned->spr.inittype = nType;
|
||||
spawned->set_int_ang(angle);
|
||||
spawned->spr.angle = angle;
|
||||
SetActor(spawned, pos);
|
||||
|
||||
spawned->spr.cstat |= CSTAT_SPRITE_BLOCK_ALL | CSTAT_SPRITE_BLOOD_BIT1;
|
||||
|
|
|
@ -223,7 +223,7 @@ void actExplodeSprite(DBloodActor *pSprite);
|
|||
void actActivateGibObject(DBloodActor *actor);
|
||||
void actProcessSprites(void);
|
||||
DBloodActor* actSpawnSprite(sectortype* pSector, const DVector3& pos, int nStat, bool a6);
|
||||
DBloodActor* actSpawnDude(DBloodActor* pSource, int nType, int a3, int a4);
|
||||
DBloodActor* actSpawnDude(DBloodActor* pSource, int nType, double dist);
|
||||
DBloodActor * actSpawnSprite(DBloodActor *pSource, int nStat);
|
||||
DBloodActor * actSpawnThing(sectortype* pSector, int x, int y, int z, int nThingType);
|
||||
DBloodActor* actFireThing(DBloodActor* actor, int xyoff, int zoff, int zvel, int thingType, int nSpeed);
|
||||
|
|
|
@ -144,11 +144,11 @@ void SpidBirthSeqCallback(int, DBloodActor* actor)
|
|||
if (target->IsPlayerActor() && pDudeExtraE->birthCounter < 10)
|
||||
{
|
||||
if (nDist < 0x1a00 && nDist > 0x1400 && abs(actor->int_ang() - nAngle) < pDudeInfo->periphery)
|
||||
spawned = actSpawnDude(actor, kDudeSpiderRed, actor->native_clipdist(), 0);
|
||||
spawned = actSpawnDude(actor, kDudeSpiderRed, actor->fClipdist() * 0.25);
|
||||
else if (nDist < 0x1400 && nDist > 0xc00 && abs(actor->int_ang() - nAngle) < pDudeInfo->periphery)
|
||||
spawned = actSpawnDude(actor, kDudeSpiderBrown, actor->native_clipdist(), 0);
|
||||
spawned = actSpawnDude(actor, kDudeSpiderBrown, actor->fClipdist() * 0.25);
|
||||
else if (nDist < 0xc00 && abs(actor->int_ang() - nAngle) < pDudeInfo->periphery)
|
||||
spawned = actSpawnDude(actor, kDudeSpiderBrown, actor->native_clipdist(), 0);
|
||||
spawned = actSpawnDude(actor, kDudeSpiderBrown, actor->fClipdist() * 0.25);
|
||||
|
||||
if (spawned)
|
||||
{
|
||||
|
|
|
@ -243,10 +243,10 @@ void genDudeAttack1(int, DBloodActor* actor)
|
|||
else if (pExtra->weaponType == kGenDudeWeaponSummon)
|
||||
{
|
||||
DBloodActor* spawned = nullptr;
|
||||
int dist = actor->native_clipdist() << 4;
|
||||
double dist = actor->fClipdist() * 4;
|
||||
if (pExtra->slaveCount <= gGameOptions.nDifficulty)
|
||||
{
|
||||
if ((spawned = actSpawnDude(actor, pExtra->curWeapon, dist + Random(dist), 0)) != NULL)
|
||||
if ((spawned = actSpawnDude(actor, pExtra->curWeapon, dist + RandomD(dist, 4))) != NULL)
|
||||
{
|
||||
spawned->SetOwner(actor);
|
||||
|
||||
|
|
|
@ -1710,7 +1710,7 @@ void ProcessInput(PLAYER* pPlayer)
|
|||
if (pPlayer->handTime <= 0 && pPlayer->hand)
|
||||
{
|
||||
DBloodActor* pactor = pPlayer->actor;
|
||||
auto spawned = actSpawnDude(pactor, kDudeHand, pPlayer->actor->native_clipdist() << 1, 0);
|
||||
auto spawned = actSpawnDude(pactor, kDudeHand, pPlayer->actor->fClipdist() * 0.5);
|
||||
if (spawned)
|
||||
{
|
||||
spawned->spr.angle += DAngle180;
|
||||
|
|
|
@ -496,7 +496,7 @@ void OperateSprite(DBloodActor* actor, EVENT event)
|
|||
case kMarkerDudeSpawn:
|
||||
if (gGameOptions.nMonsterSettings && actor->xspr.data1 >= kDudeBase && actor->xspr.data1 < kDudeMax)
|
||||
{
|
||||
auto spawned = actSpawnDude(actor, actor->xspr.data1, -1, 0);
|
||||
auto spawned = actSpawnDude(actor, actor->xspr.data1, -1);
|
||||
if (spawned) {
|
||||
gKillMgr.AddKill(spawned);
|
||||
switch (actor->xspr.data1) {
|
||||
|
|
Loading…
Reference in a new issue