got rid of missileInfo

This commit is contained in:
Christoph Oelckers 2023-10-06 18:25:51 +02:00
parent 6250906879
commit c7e993d949
4 changed files with 5 additions and 209 deletions

View file

@ -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);

View file

@ -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[];

View file

@ -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;
}

View file

@ -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.