diff --git a/source/games/blood/src/actor.cpp b/source/games/blood/src/actor.cpp index 859605de5..c83ded876 100644 --- a/source/games/blood/src/actor.cpp +++ b/source/games/blood/src/actor.cpp @@ -659,189 +659,6 @@ const VECTORDATA gVectorData[] = { }; -const MissileType missileInfo[] = { - // Cleaver - { - 2138, - 978670, - 512, - 40, - 40, - -16, - 16, - }, - // Regular flare - { - 2424, - 3145728, - 0, - 32, - 32, - -128, - 32, - }, - // Tesla alt - { - 3056, - 2796202, - 0, - 32, - 32, - -128, - 32, - }, - // Flare alt - { - 2424, - 2446677, - 0, - 32, - 32, - -128, - 4, - }, - // Spray flame - { - 0, - 1118481, - 0, - 24, - 24, - -128, - 16, - }, - // Fireball - { - 0, - 1118481, - 0, - 32, - 32, - -128, - 32, - }, - // Tesla regular - { - 2130, - 2796202, - 0, - 32, - 32, - -128, - 16, - }, - // EctoSkull - { - 870, - 699050, - 0, - 32, - 32, - -24, - 32, - }, - // Hellhound flame - { - 0, - 1118481, - 0, - 24, - 24, - -128, - 16, - }, - // Puke - { - 0, - 838860, - 0, - 16, - 16, - -16, - 16, - }, - // Reserved - { - 0, - 838860, - 0, - 8, - 8, - 0, - 16, - }, - // Stone gargoyle projectile - { - 3056, - 2097152, - 0, - 32, - 32, - -128, - 16, - }, - // Napalm launcher - { - 0, - 2446677, - 0, - 30, - 30, - -128, - 24, - }, - // Cerberus fireball - { - 0, - 2446677, - 0, - 30, - 30, - -128, - 24, - }, - // Tchernobog fireball - { - 0, - 1398101, - 0, - 24, - 24, - -128, - 16, - }, - // Regular life leech - { - 2446, - 2796202, - 0, - 32, - 32, - -128, - 16, - }, - // Dropped life leech (enough ammo) - { - 3056, - 2446677, - 0, - 16, - 16, - -128, - 16, - }, - // Dropped life leech (no ammo) - { - 3056, - 1747626, - 0, - 32, - 32, - -128, - 16, - } -}; - const THINGINFO thingInfo[] = { //TNT Barrel { @@ -4107,7 +3924,7 @@ int MoveMissile(DBloodActor* actor) if (target->spr.statnum == kStatDude && target->hasX() && target->xspr.health > 0) { - double vel = missileInfo[actor->GetType() - kMissileBase].fVelocity(); + double vel = actor->FloatVar("speed"); actor->vel.XY() = DVector2(vel, 0).Rotated((target->spr.pos - actor->spr.pos).Angle()); double deltaz = (target->spr.pos.Z - actor->spr.pos.Z) / (10 * 256); diff --git a/source/games/blood/src/actor.h b/source/games/blood/src/actor.h index b57e6d7c4..b0a50b742 100644 --- a/source/games/blood/src/actor.h +++ b/source/games/blood/src/actor.h @@ -84,27 +84,6 @@ struct THINGINFO double fClipdist() const { return clipdist * 0.25; } }; -struct MissileType -{ - int16_t picno; - int velocity; - int angleOfs; - uint8_t xrepeat; - uint8_t yrepeat; - int8_t shade; - uint8_t clipDist; - - double fClipDist() const - { - return clipDist * 0.25; - } - double fVelocity() const - { - return FixedToFloat(velocity); - } - FTextureID textureID() const { return tileGetTextureID(picno); } -}; - struct EXPLOSION { uint8_t repeat; @@ -139,7 +118,6 @@ struct VECTORDATA { double fMaxDist() const { return maxDist * maptoworld; } }; -extern const MissileType missileInfo[]; extern const EXPLOSION explodeInfo[]; extern const THINGINFO thingInfo[]; extern const VECTORDATA gVectorData[]; diff --git a/source/games/blood/src/aiunicult.cpp b/source/games/blood/src/aiunicult.cpp index dcea5e0be..0466dca03 100644 --- a/source/games/blood/src/aiunicult.cpp +++ b/source/games/blood/src/aiunicult.cpp @@ -151,8 +151,9 @@ static bool genDudeAdjustSlope(DBloodActor* actor, double dist, int weaponType, } else if (weaponType == kGenDudeWeaponMissile) { - const MissileType* pMissile = &missileInfo[pExtra->curWeapon - kMissileBase]; - actor->dudeSlope = (fStart - ((fStart - fEnd) * 0.25)) - (pMissile->fClipDist()) / 2048; + auto type = GetSpawnType(pExtra->curWeapon); + auto clipdist = GetDefaultByType(type)->FloatVar("clipdist"); + actor->dudeSlope = (fStart - ((fStart - fEnd) * 0.25)) - clipdist / 2048; } return true; } diff --git a/source/games/blood/src/nnexts.cpp b/source/games/blood/src/nnexts.cpp index 474961ca4..89a157c6c 100644 --- a/source/games/blood/src/nnexts.cpp +++ b/source/games/blood/src/nnexts.cpp @@ -9199,7 +9199,7 @@ void callbackUniMissileBurst(DBloodActor* actor) // 22 burstactor->spr.scale = actor->spr.scale; burstactor->spr.scale *= 0.5; - burstactor->spr.Angles.Yaw = actor->spr.Angles.Yaw + mapangle(missileInfo[actor->GetType() - kMissileBase].angleOfs); + burstactor->spr.Angles.Yaw = actor->spr.Angles.Yaw + DAngle::fromDeg(actor->FloatVar("angleofs")); burstactor->SetOwner(actor); IFVIRTUALPTRNAME(burstactor, NAME_BloodMissileBase, initMissile) // note: delete the name if this get scriptified.