diff --git a/source/games/blood/src/actor.cpp b/source/games/blood/src/actor.cpp index d5fe8ef46..0db40598e 100644 --- a/source/games/blood/src/actor.cpp +++ b/source/games/blood/src/actor.cpp @@ -1467,9 +1467,9 @@ static void actInitDudes() { /////////////// - auto pDudeInfo = getDudeInfo(act); + auto startdamage = static_cast(GetDefaultByType(act->GetClass()))->dmgControl; for (int j = 0; j < 7; j++) - act->dmgControl[j] = MulScale(DudeDifficulty[gGameOptions.nDifficulty], pDudeInfo->startDamage[j], 8); + act->dmgControl[j] = MulScale(DudeDifficulty[gGameOptions.nDifficulty], startdamage[j], 8); if (!act->hasX()) continue; @@ -2288,10 +2288,10 @@ void actKillDude(DBloodActor* killerActor, DBloodActor* actor, DAMAGE_TYPE damag if (damageType == kDamageExplode) { - DUDEINFO* pDudeInfo = getDudeInfo(actor); + auto gibType = actor->IntArray("gibtype"); for (int i = 0; i < 3; i++) - if (pDudeInfo->nGibType[i] > -1) - GibSprite(actor, (GIBTYPE)pDudeInfo->nGibType[i], nullptr, nullptr); + if (gibType[i] > -1) + GibSprite(actor, (GIBTYPE)gibType[i], nullptr, nullptr); for (int i = 0; i < 4; i++) fxSpawnBlood(actor, damage); } @@ -2512,8 +2512,8 @@ static void actImpactMissile(DBloodActor* missileActor, int hitCode) actHitcodeToData(hitCode, &gHitInfo, &actorHit, &pWallHit); - DUDEINFO* pDudeInfo = nullptr; bool pIsThing = false; + bool pIsDude = false; if (hitCode == 3 && actorHit) { @@ -2523,14 +2523,14 @@ static void actImpactMissile(DBloodActor* missileActor, int hitCode) pIsThing = true; break; case kStatDude: - pDudeInfo = getDudeInfo(actorHit); + pIsDude = true; break; } } switch (missileActor->GetType()) { case kMissileLifeLeechRegular: - if (hitCode == 3 && actorHit && (pIsThing || pDudeInfo)) + if (hitCode == 3 && actorHit && (pIsThing || pIsDude)) { DAMAGE_TYPE rand1 = (DAMAGE_TYPE)Random(7); int rand2 = (7 + Random(7)) << 4; @@ -2541,10 +2541,10 @@ static void actImpactMissile(DBloodActor* missileActor, int hitCode) actBurnSprite(missileActor->GetOwner(), actorHit, 360); // by NoOne: make Life Leech heal user, just like it was in 1.0x versions - if (gGameOptions.weaponsV10x && !VanillaMode() && pDudeInfo != nullptr) + if (gGameOptions.weaponsV10x && !VanillaMode() && pIsDude) { if (missileOwner->IsDudeActor() && missileOwner->hasX() && missileOwner->xspr.health != 0) - actHealDude(missileOwner, nDamage >> 2, getDudeInfo(missileOwner)->startHealth); + actHealDude(missileOwner, nDamage >> 2, missileOwner->startHealth()); } } @@ -2580,7 +2580,7 @@ static void actImpactMissile(DBloodActor* missileActor, int hitCode) case kMissilePukeGreen: seqKill(missileActor); - if (hitCode == 3 && actorHit && (pIsThing || pDudeInfo)) + if (hitCode == 3 && actorHit && (pIsThing || pIsDude)) { int nDamage = (15 + Random(7)) << 4; actDamageSprite(missileOwner, actorHit, kDamageBullet, nDamage); @@ -2593,7 +2593,7 @@ static void actImpactMissile(DBloodActor* missileActor, int hitCode) sfxPlay3DSectorSound(missileActor->spr.pos, 306, missileActor->sector()); GibSprite(missileActor, GIBTYPE_6, NULL, NULL); - if (hitCode == 3 && actorHit && (pIsThing || pDudeInfo)) + if (hitCode == 3 && actorHit && (pIsThing || pIsDude)) { int nDamage = (25 + Random(20)) << 4; actDamageSprite(missileOwner, actorHit, kDamageSpirit, nDamage); @@ -2606,7 +2606,7 @@ static void actImpactMissile(DBloodActor* missileActor, int hitCode) sfxKill3DSound(missileActor, -1, -1); sfxPlay3DSectorSound(missileActor->spr.pos, 306, missileActor->sector()); - if (hitCode == 3 && actorHit && (pIsThing || pDudeInfo)) + if (hitCode == 3 && actorHit && (pIsThing || pIsDude)) { int nDmgMul = (missileActor->GetType() == kMissileLifeLeechAltSmall) ? 6 : 3; int nDamage = (nDmgMul + Random(nDmgMul)) << 4; @@ -2617,7 +2617,7 @@ static void actImpactMissile(DBloodActor* missileActor, int hitCode) case kMissileFireball: case kMissileFireballNapalm: - if (hitCode == 3 && actorHit && (pIsThing || pDudeInfo)) + if (hitCode == 3 && actorHit && (pIsThing || pIsDude)) { if (pIsThing && actorHit->GetType() == kThingTNTBarrel && actorHit->xspr.burnTime == 0) evPostActor(actorHit, 0, AF(fxFlameLick)); @@ -2635,7 +2635,7 @@ static void actImpactMissile(DBloodActor* missileActor, int hitCode) case kMissileFlareRegular: sfxKill3DSound(missileActor, -1, -1); - if ((hitCode == 3 && actorHit) && (pIsThing || pDudeInfo)) + if ((hitCode == 3 && actorHit) && (pIsThing || pIsDude)) { int nThingDamage = actorHit->dmgControl[kDamageBurn]; if (nThingDamage != 0) diff --git a/source/games/blood/src/ai.cpp b/source/games/blood/src/ai.cpp index c0a3556d1..bfd8dac3d 100644 --- a/source/games/blood/src/ai.cpp +++ b/source/games/blood/src/ai.cpp @@ -44,8 +44,7 @@ bool dudeIsPlayingSeq(DBloodActor* actor, int nSeq) { if (actor->spr.statnum == kStatDude && actor->IsDudeActor()) { - DUDEINFO* pDudeInfo = getDudeInfo(actor); - if (seqGetID(actor) == pDudeInfo->seqStartID + nSeq && seqGetStatus(actor) >= 0) + if (seqGetID(actor) == actor->seqStartID() + nSeq && seqGetStatus(actor) >= 0) return true; } return false; @@ -79,7 +78,6 @@ void aiPlay3DSound(DBloodActor* actor, int soundid, AI_SFX_PRIORITY a3, int play void aiNewState(DBloodActor* actor, FState* pAIState) { - DUDEINFO* pDudeInfo = getDudeInfo(actor); actor->xspr.stateTimer = pAIState->Tics; actor->xspr.aiState = pAIState; int seqStartId = -1; @@ -96,7 +94,7 @@ void aiNewState(DBloodActor* actor, FState* pAIState) break; case STF_SPRITESEQOFFSET: - seqStartId = pAIState->sprite + pDudeInfo->seqStartID; + seqStartId = pAIState->sprite + actor->seqStartID(); break; } @@ -315,13 +313,12 @@ void aiChooseDirection(DBloodActor* actor, DAngle direction) void aiMoveForward(DBloodActor* actor) { assert(actor->IsDudeActor()); - DUDEINFO* pDudeInfo = getDudeInfo(actor); auto nAng = deltaangle(actor->spr.Angles.Yaw, actor->xspr.goalAng); - auto nTurnRange = pDudeInfo->TurnRange(); + auto nTurnRange = actor->TurnRange(); actor->spr.Angles.Yaw += clamp(nAng, -nTurnRange, nTurnRange); if (abs(nAng) > DAngle60) return; - actor->vel.XY() += actor->spr.Angles.Yaw.ToVector() * pDudeInfo->FrontSpeed(); + actor->vel.XY() += actor->spr.Angles.Yaw.ToVector() * actor->FrontSpeed(); } //--------------------------------------------------------------------------- @@ -333,9 +330,8 @@ void aiMoveForward(DBloodActor* actor) void aiMoveTurn(DBloodActor* actor) { assert(actor->IsDudeActor()); - DUDEINFO* pDudeInfo = getDudeInfo(actor); auto nAng = deltaangle(actor->spr.Angles.Yaw, actor->xspr.goalAng); - auto nTurnRange = pDudeInfo->TurnRange(); + auto nTurnRange = actor->TurnRange(); actor->spr.Angles.Yaw += clamp(nAng, -nTurnRange, nTurnRange); } @@ -348,17 +344,16 @@ void aiMoveTurn(DBloodActor* actor) void aiMoveDodge(DBloodActor* actor) { assert(actor->IsDudeActor()); - DUDEINFO* pDudeInfo = getDudeInfo(actor); auto nAng = deltaangle(actor->spr.Angles.Yaw, actor->xspr.goalAng); - auto nTurnRange = pDudeInfo->TurnRange(); + auto nTurnRange = actor->TurnRange(); actor->spr.Angles.Yaw += clamp(nAng, -nTurnRange, nTurnRange); if (actor->xspr.dodgeDir) { AdjustVelocity(actor, ADJUSTER{ if (actor->xspr.dodgeDir > 0) - t2 += FixedToFloat(pDudeInfo->sideSpeed); + t2 += actor->SideSpeed(); else - t2 -= FixedToFloat(pDudeInfo->sideSpeed); + t2 -= actor->SideSpeed(); }); } } @@ -941,8 +936,7 @@ void aiSetTarget(DBloodActor* actor, DBloodActor* target) if (actor->GetOwner() != target) { actor->SetTarget(target); - DUDEINFO* pDudeInfo = getDudeInfo(target); - double eyeHeight = (pDudeInfo->eyeHeight * target->spr.scale.Y); + double eyeHeight = (target->eyeHeight() * target->spr.scale.Y); actor->xspr.TargetPos = target->spr.pos.plusZ(-eyeHeight); } } @@ -960,7 +954,6 @@ int aiDamageSprite(DBloodActor* source, DBloodActor* actor, DAMAGE_TYPE nDmgType return 0; actor->xspr.health = ClipLow(actor->xspr.health - nDamage, 0); actor->cumulDamage += nDamage; - DUDEINFO* pDudeInfo = getDudeInfo(actor); if (source) { @@ -974,9 +967,9 @@ int aiDamageSprite(DBloodActor* source, DBloodActor* actor, DAMAGE_TYPE nDmgType { int nThresh = nDamage; if (actor->GetType() == source->GetType()) - nThresh *= pDudeInfo->changeTargetKin; + nThresh *= actor->IntVar("changeTargetKin"); else - nThresh *= pDudeInfo->changeTarget; + nThresh *= actor->IntVar("changeTarget"); if (Chance(nThresh)) { aiSetTarget(actor, source); @@ -1017,25 +1010,25 @@ int aiDamageSprite(DBloodActor* source, DBloodActor* actor, DAMAGE_TYPE nDmgType else if (dudeIsPlayingSeq(actor, 13) && (actor->xspr.medium == kMediumWater || actor->xspr.medium == kMediumGoo)) aiNewState(actor, NAME_cultistSwimDodge); } - else if (nDmgType == kDamageBurn && actor->xspr.health <= (unsigned int)pDudeInfo->fleeHealth/* && (actor->xspr.at17_6 != 1 || actor->xspr.at17_6 != 2)*/) + else if (nDmgType == kDamageBurn && actor->xspr.health <= (unsigned int)actor->fleeHealth()/* && (actor->xspr.at17_6 != 1 || actor->xspr.at17_6 != 2)*/) { actor->ChangeType(kDudeBurningCultist); aiNewState(actor, NAME_cultistBurnGoto); aiPlay3DSound(actor, 361, AI_SFX_PRIORITY_0, -1); aiPlay3DSound(actor, 1031 + Random(2), AI_SFX_PRIORITY_2, -1); actor->dudeExtra.time = PlayClock + 360; - actHealDude(actor, dudeInfo[40].startHealth, dudeInfo[40].startHealth); + actHealDude(actor, actor->startHealth(), actor->startHealth()); evKillActor(actor, AF(fxFlameLick)); } break; case kDudeInnocent: - if (nDmgType == kDamageBurn && actor->xspr.health <= (unsigned int)pDudeInfo->fleeHealth/* && (actor->xspr.at17_6 != 1 || actor->xspr.at17_6 != 2)*/) + if (nDmgType == kDamageBurn && actor->xspr.health <= (unsigned int)actor->fleeHealth()/* && (actor->xspr.at17_6 != 1 || actor->xspr.at17_6 != 2)*/) { actor->ChangeType(kDudeBurningInnocent); aiNewState(actor, NAME_cultistBurnGoto); aiPlay3DSound(actor, 361, AI_SFX_PRIORITY_0, -1); actor->dudeExtra.time = PlayClock + 360; - actHealDude(actor, dudeInfo[39].startHealth, dudeInfo[39].startHealth); + actHealDude(actor, actor->startHealth(), actor->startHealth()); evKillActor(actor, AF(fxFlameLick)); } break; @@ -1066,17 +1059,17 @@ int aiDamageSprite(DBloodActor* source, DBloodActor* actor, DAMAGE_TYPE nDmgType aiNewState(actor, NAME_gargoyleFChase); break; case kDudeZombieButcher: - if (nDmgType == kDamageBurn && actor->xspr.health <= (unsigned int)pDudeInfo->fleeHealth) { + if (nDmgType == kDamageBurn && actor->xspr.health <= (unsigned int)actor->fleeHealth()) { aiPlay3DSound(actor, 361, AI_SFX_PRIORITY_0, -1); aiPlay3DSound(actor, 1202, AI_SFX_PRIORITY_2, -1); actor->ChangeType(kDudeBurningZombieButcher); aiNewState(actor, NAME_zombieFBurnGoto); - actHealDude(actor, dudeInfo[42].startHealth, dudeInfo[42].startHealth); + actHealDude(actor, actor->startHealth(), actor->startHealth()); evKillActor(actor, AF(fxFlameLick)); } break; case kDudeTinyCaleb: - if (nDmgType == kDamageBurn && actor->xspr.health <= (unsigned int)pDudeInfo->fleeHealth/* && (actor->xspr.at17_6 != 1 || actor->xspr.at17_6 != 2)*/) + if (nDmgType == kDamageBurn && actor->xspr.health <= (unsigned int)actor->fleeHealth()/* && (actor->xspr.at17_6 != 1 || actor->xspr.at17_6 != 2)*/) { if (!cl_bloodvanillaenemies && !VanillaMode()) // fix burning sprite for tiny caleb { @@ -1090,28 +1083,28 @@ int aiDamageSprite(DBloodActor* source, DBloodActor* actor, DAMAGE_TYPE nDmgType } aiPlay3DSound(actor, 361, AI_SFX_PRIORITY_0, -1); actor->dudeExtra.time = PlayClock + 360; - actHealDude(actor, dudeInfo[39].startHealth, dudeInfo[39].startHealth); + actHealDude(actor, actor->startHealth(), actor->startHealth()); evKillActor(actor, AF(fxFlameLick)); } break; case kDudeCultistBeast: - if (actor->xspr.health <= (unsigned int)pDudeInfo->fleeHealth) + if (actor->xspr.health <= (unsigned int)actor->fleeHealth()) { actor->ChangeType(kDudeBeast); aiPlay3DSound(actor, 9008, AI_SFX_PRIORITY_1, -1); aiNewState(actor, NAME_beastMorphFromCultist); - actHealDude(actor, dudeInfo[51].startHealth, dudeInfo[51].startHealth); + actHealDude(actor, actor->startHealth(), actor->startHealth()); } break; case kDudeZombieAxeNormal: case kDudeZombieAxeBuried: - if (nDmgType == kDamageBurn && actor->xspr.health <= (unsigned int)pDudeInfo->fleeHealth) + if (nDmgType == kDamageBurn && actor->xspr.health <= (unsigned int)actor->fleeHealth()) { aiPlay3DSound(actor, 361, AI_SFX_PRIORITY_0, -1); aiPlay3DSound(actor, 1106, AI_SFX_PRIORITY_2, -1); actor->ChangeType(kDudeBurningZombieAxe); aiNewState(actor, NAME_zombieABurnGoto); - actHealDude(actor, dudeInfo[41].startHealth, dudeInfo[41].startHealth); + actHealDude(actor, actor->startHealth(), actor->startHealth()); evKillActor(actor, AF(fxFlameLick)); } break; @@ -1132,7 +1125,6 @@ void RecoilDude(DBloodActor* actor) DUDEEXTRA* pDudeExtra = &actor->dudeExtra; if (actor->spr.statnum == kStatDude && (actor->IsDudeActor())) { - DUDEINFO* pDudeInfo = getDudeInfo(actor); switch (actor->GetType()) { #ifdef NOONE_EXTENSIONS @@ -1236,9 +1228,9 @@ void RecoilDude(DBloodActor* actor) case kDudeZombieAxeNormal: case kDudeZombieAxeBuried: aiPlay3DSound(actor, 1106, AI_SFX_PRIORITY_2, -1); - if (pDudeExtra->teslaHit && actor->xspr.data3 > pDudeInfo->startHealth / 3) + if (pDudeExtra->teslaHit && actor->xspr.data3 > actor->startHealth() / 3) aiNewState(actor, NAME_zombieATeslaRecoil); - else if (actor->xspr.data3 > pDudeInfo->startHealth / 3) + else if (actor->xspr.data3 > actor->startHealth() / 3) aiNewState(actor, NAME_zombieARecoil2); else aiNewState(actor, NAME_zombieARecoil); @@ -1258,7 +1250,7 @@ void RecoilDude(DBloodActor* actor) break; case kDudeCerberusTwoHead: aiPlay3DSound(actor, 2302 + Random(2), AI_SFX_PRIORITY_2, -1); - if (pDudeExtra->teslaHit && actor->xspr.data3 > pDudeInfo->startHealth / 3) + if (pDudeExtra->teslaHit && actor->xspr.data3 > actor->startHealth() / 3) aiNewState(actor, NAME_cerberusTeslaRecoil); else aiNewState(actor, NAME_cerberusRecoil); @@ -1390,8 +1382,7 @@ void RecoilDude(DBloodActor* actor) void aiThinkTarget(DBloodActor* actor) { assert(actor->IsDudeActor()); - DUDEINFO* pDudeInfo = getDudeInfo(actor); - if (Chance(pDudeInfo->alertChance)) + if (Chance(actor->alertChance())) { for (int p = connecthead; p >= 0; p = connectpoint2[p]) { @@ -1403,20 +1394,20 @@ void aiThinkTarget(DBloodActor* actor) auto pSector = pPlayer->GetActor()->sector(); double nDist = dvec.Length(); - if (nDist > pDudeInfo->SeeDist() && nDist > pDudeInfo->HearDist()) + if (nDist > actor->SeeDist() && nDist > actor->HearDist()) continue; - double height = (pDudeInfo->eyeHeight * actor->spr.scale.Y); + double height = (actor->eyeHeight() * actor->spr.scale.Y); if (!cansee(ppos, pSector, actor->spr.pos.plusZ(-height), actor->sector())) continue; DAngle nDeltaAngle = absangle(actor->spr.Angles.Yaw, dvec.Angle()); - if (nDist < pDudeInfo->SeeDist() && nDeltaAngle <= pDudeInfo->Periphery()) + if (nDist < actor->SeeDist() && nDeltaAngle <= actor->Periphery()) { aiSetTarget(actor, pPlayer->GetActor()); aiActivateDude(actor); return; } - else if (nDist < pDudeInfo->HearDist()) + else if (nDist < actor->HearDist()) { aiSetTarget(actor, ppos); aiActivateDude(actor); @@ -1435,8 +1426,7 @@ void aiThinkTarget(DBloodActor* actor) void aiLookForTarget(DBloodActor* actor) { assert(actor->IsDudeActor()); - DUDEINFO* pDudeInfo = getDudeInfo(actor); - if (Chance(pDudeInfo->alertChance)) + if (Chance(actor->alertChance())) { for (int p = connecthead; p >= 0; p = connectpoint2[p]) { @@ -1448,19 +1438,19 @@ void aiLookForTarget(DBloodActor* actor) auto pSector = pPlayer->GetActor()->sector(); double nDist = dvec.Length(); - if (nDist > pDudeInfo->SeeDist() && nDist > pDudeInfo->HearDist()) + if (nDist > actor->SeeDist() && nDist > actor->HearDist()) continue; - double height = (pDudeInfo->eyeHeight * actor->spr.scale.Y); + double height = (actor->eyeHeight() * actor->spr.scale.Y); if (!cansee(ppos, pSector, actor->spr.pos.plusZ(-height), actor->sector())) continue; DAngle nDeltaAngle = absangle(actor->spr.Angles.Yaw, dvec.Angle()); - if (nDist < pDudeInfo->SeeDist() && nDeltaAngle <= pDudeInfo->Periphery()) + if (nDist < actor->SeeDist() && nDeltaAngle <= actor->Periphery()) { aiSetTarget(actor, pPlayer->GetActor()); aiActivateDude(actor); return; } - else if (nDist < pDudeInfo->HearDist()) + else if (nDist < actor->HearDist()) { aiSetTarget(actor, ppos); aiActivateDude(actor); @@ -1478,8 +1468,7 @@ void aiLookForTarget(DBloodActor* actor) double nDist = (actor2->spr.pos.XY() - actor->spr.pos.XY()).Length(); if (actor2->GetType() == kDudeInnocent) { - pDudeInfo = getDudeInfo(actor2); - if (nDist > pDudeInfo->SeeDist() && nDist > pDudeInfo->HearDist()) + if (nDist > actor->SeeDist() && nDist > actor->HearDist()) continue; aiSetTarget(actor, actor2); aiActivateDude(actor); @@ -1502,7 +1491,6 @@ void aiProcessDudes(void) while (auto actor = it.Next()) { if (actor->spr.flags & 32) continue; - DUDEINFO* pDudeInfo = getDudeInfo(actor); if (actor->IsPlayerActor() || actor->xspr.health == 0) continue; actor->xspr.stateTimer = ClipLow(actor->xspr.stateTimer - 4, 0); @@ -1543,7 +1531,7 @@ void aiProcessDudes(void) aiNewState(actor, actor->xspr.aiState->NextState); } - if (actor->xspr.health > 0 && ((pDudeInfo->hinderDamage << 4) <= actor->cumulDamage)) + if (actor->xspr.health > 0 && ((actor->IntVar("hinderDamage") << 4) <= actor->cumulDamage)) { actor->xspr.data3 = actor->cumulDamage; RecoilDude(actor); diff --git a/source/games/blood/src/blood.cpp b/source/games/blood/src/blood.cpp index 558566e56..dad619ad0 100644 --- a/source/games/blood/src/blood.cpp +++ b/source/games/blood/src/blood.cpp @@ -765,11 +765,6 @@ enum }; -inline DUDEINFO* getDudeInfo(DBloodActor* actor) -{ - return getDudeInfo(actor->GetType()); -} - inline DBloodPlayer* getPlayer(DBloodActor* actor) { return getPlayer(actor->GetType() - kDudePlayer1); diff --git a/source/games/blood/src/dude.cpp b/source/games/blood/src/dude.cpp index 58d98aa59..b2006a005 100644 --- a/source/games/blood/src/dude.cpp +++ b/source/games/blood/src/dude.cpp @@ -27,1583 +27,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. BEGIN_BLD_NS -DUDEINFO dudeInfo[kDudeMax - kDudeBase] = -{ - { - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 4096, //seqStartId - 40, // startHp - 70, // mass - 1200, // ??? - 48, // clipdist - 41, // eye height - 20, // aim height - 10240, // hear dist - 51200, // see dist - 512, // periphery - 0, // melee distance - 10, // flee health - 8, // hinder damage - 256, // change target chance - 16, // change target chance to same type - 32768, // alert chance - 1, // lockout - 46603, // front speed - 34952, // side speed - 13981, // back speed - 256, // ang speed - 15, -1, -1, // gib type - 256, 256, 96, 256, 256, 256, 192, // start damage - 0, 0, 0, 0, 0, 0, 0, // real damage - 0, // ??? - 0 // ??? - }, - { - 11520, - 40, - 70, - 1200, - 48, - 41, - 20, - 10240, - 51200, - 512, - 0, - 10, - 5, - 256, - 16, - 32768, - 1, - 34952, - 34952, - 13981, - 256, - 15, -1, -1, - 256, 256, 128, 256, 256, 256, 192, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 4352, - 60, - 70, - 1200, - 48, - 46, - 20, - 10240, - 51200, - 512, - 0, - 10, - 15, - 256, - 16, - 32768, - 1, - 58254, - 46603, - 34952, - 384, - 15, -1, -1, - 256, 256, 112, 256, 256, 256, 160, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 4608, - 80, - 200, - 1200, - 48, - 128, - 20, - 10240, - 51200, - 512, - 0, - 10, - 15, - 256, - 16, - 32768, - 1, - 23301, - 23301, - 13981, - 256, - 15, -1, -1, - 256, 256, 32, 128, 256, 64, 128, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 4352, - 60, - 70, - 1200, - 48, - 46, - 20, - 5120, - 0, - 341, - 0, - 10, - 15, - 256, - 16, - 32768, - 1, - 58254, - 46603, - 34952, - 384, - 15, -1, -1, - 256, 256, 112, 256, 256, 256, 256, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 4864, - 110, - 120, - 1200, - 64, - 13, - 5, - 10240, - 51200, - 512, - 0, - 10, - 25, - 256, - 16, - 32768, - 1, - 46603, - 34952, - 23301, - 384, - 30, -1, -1, - 0, 128, 48, 208, 256, 256, 256, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 5120, - 200, - 200, - 1200, - 84, - 13, - 5, - 10240, - 51200, - 512, - 0, - 10, - 20, - 256, - 16, - 32768, - 1, - 46603, - 34952, - 23301, - 256, - 19, -1, -1, - 0, 0, 10, 10, 0, 128, 64, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 11008, - 100, - 200, - 1200, - 64, - 13, - 5, - 2048, - 5120, - 512, - 0, - 10, - 15, - 256, - 16, - 32768, - 0, - 0, - 0, - 0, - 0, - -1, -1, -1, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 11264, - 100, - 200, - 1200, - 64, - 13, - 5, - 2048, - 5120, - 512, - 0, - 10, - 10, - 256, - 16, - 32768, - 0, - 0, - 0, - 0, - 0, - -1, -1, -1, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 5376, - 100, - 70, - 1200, - 64, - 25, - 15, - 10240, - 51200, - 341, - 0, - 10, - 10, - 256, - 0, - 32768, - 1, - 58254, - 46603, - 34952, - 384, - -1, -1, -1, - 0, 0, 48, 0, 0, 16, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 5632, - 70, - 120, - 1200, - 80, - 6, - 0, - 10240, - 51200, - 682, - 0, - 10, - 20, - 256, - 16, - 32768, - 0, - 116508, - 81555, - 69905, - 384, - 29, -1, -1, - 48, 0, 48, 48, 256, 128, 192, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 5888, - 10, - 70, - 1200, - 32, - 0, - 0, - 5120, - 51200, - 341, - 0, - 10, - 10, - 256, - 16, - 32768, - 1, - 58254, - 46603, - 34952, - 384, - 7, -1, -1, - 64, 256, 256, 256, 0, 64, 256, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 6144, - 10, - 5, - 1200, - 32, - -5, - -5, - 5120, - 51200, - 682, - 0, - 10, - 10, - 256, - 16, - 32768, - 0, - 58254, - 46603, - 34952, - 384, - 7, -1, -1, - 64, 256, 256, 96, 256, 64, 256, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 6400, - 25, - 10, - 1200, - 32, - -5, - -5, - 5120, - 51200, - 682, - 0, - 10, - 10, - 256, - 16, - 32768, - 0, - 58254, - 46603, - 34952, - 384, - 7, -1, -1, - 64, 128, 256, 96, 256, 64, 256, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 6656, - 75, - 20, - 1200, - 32, - -5, - -5, - 5120, - 51200, - 682, - 0, - 10, - 10, - 256, - 16, - 32768, - 0, - 58254, - 46603, - 34952, - 384, - 7, -1, -1, - 128, 256, 256, 96, 256, 64, 256, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 6912, - 100, - 40, - 1200, - 32, - -5, - -5, - 5120, - 51200, - 682, - 0, - 10, - 10, - 256, - 16, - 32768, - 0, - 58254, - 46603, - 34952, - 384, - 7, -1, -1, - 32, 16, 16, 16, 32, 32, 32, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 7168, - 50, - 200, - 1200, - 64, - 37, - 20, - 5120, - 51200, - 682, - 0, - 10, - 10, - 256, - 16, - 32768, - 1, - 58254, - 46603, - 34952, - 384, - 7, -1, -1, - 48, 80, 64, 128, 0, 128, 48, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 7424, - 25, - 30, - 1200, - 32, - 4, - 0, - 5120, - 51200, - 512, - 0, - 10, - 10, - 256, - 16, - 32768, - 0, - 34952, - 23301, - 23301, - 128, - 7, -1, -1, - 256, 256, 256, 256, 0, 256, 192, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 7680, - 10, - 5, - 1200, - 32, - 2, - 0, - 10240, - 25600, - 512, - 0, - 10, - 10, - 256, - 16, - 32768, - 0, - 23301, - 23301, - 13981, - 384, - 7, -1, -1, - 256, 256, 256, 256, 256, 64, 256, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 7936, - 10, - 5, - 1200, - 32, - 3, - 0, - 12800, - 51200, - 512, - 0, - 10, - 10, - 256, - 16, - 32768, - 0, - 58254, - 46603, - 34952, - 384, - 7, -1, -1, - 256, 256, 256, 256, 256, 128, 256, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 8192, - 50, - 65535, - 1200, - 64, - 40, - 0, - 2048, - 11264, - 1024, - 0, - 10, - 10, - 256, - 0, - 32768, - 0, - 0, - 0, - 0, - 384, - 7, -1, -1, - 160, 160, 128, 160, 0, 0, 256, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 8448, - 10, - 65535, - 1200, - 32, - 0, - 0, - 2048, - 5120, - 1024, - 0, - 10, - 10, - 256, - 0, - 32768, - 0, - 0, - 0, - 0, - 384, - 7, -1, -1, - 256, 256, 256, 80, 0, 0, 256, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 8704, - 100, - 65535, - 1200, - 64, - 40, - 0, - 2048, - 15360, - 1024, - 0, - 10, - 10, - 256, - 0, - 32768, - 0, - 0, - 0, - 0, - 384, - 7, -1, -1, - 96, 0, 128, 64, 256, 64, 160, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 8960, - 20, - 65535, - 1200, - 32, - 0, - 0, - 2048, - 5120, - 1024, - 0, - 10, - 10, - 256, - 0, - 32768, - 0, - 0, - 0, - 0, - 384, - 7, -1, -1, - 128, 0, 128, 128, 0, 0, 128, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 9216, - 200, - 65535, - 1200, - 64, - 40, - 0, - 2048, - 51200, - 1024, - 0, - 10, - 10, - 256, - 0, - 32768, - 0, - 0, - 0, - 0, - 0, - 7, -1, -1, - 256, 256, 256, 256, 256, 256, 256, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 9472, - 50, - 65535, - 1200, - 32, - 0, - 0, - 2048, - 51200, - 1024, - 0, - 10, - 10, - 256, - 0, - 32768, - 0, - 0, - 0, - 0, - 0, - 7, -1, -1, - 256, 256, 128, 256, 128, 128, 256, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 9728, - 200, - 1000, - 1200, - 64, - 29, - 10, - 40960, - 102400, - 682, - 0, - 10, - 10, - 256, - 0, - 32768, - 0, - 69905, - 58254, - 46603, - 384, - 7, -1, -1, - 16, 0, 16, 16, 0, 96, 48, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 9984, - 100, - 1000, - 1200, - 64, - 29, - 10, - 20480, - 51200, - 682, - 0, - 10, - 10, - 256, - 0, - 32768, - 0, - 58254, - 34952, - 25631, - 384, - 7, -1, -1, - 16, 0, 16, 16, 0, 96, 48, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 10240, - 32, // 800, - 1500, - 1200, - 128, - 0, - 0, - 25600, - 51200, - 512, - 0, - 10, - 10, - 256, - 16, - 32768, - 1, - 58254, - 58254, - 34952, - 384, - 7, -1, -1, - 3, 1, 4, 4, 0, 4, 3, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 4096, - 25, - 20, - 1200, - 32, - 0, - 0, - 2048, - 51200, - 341, - 0, - 10, - 10, - 256, - 16, - 32768, - 1, - 58254, - 46603, - 34952, - 384, - 15, -1, -1, - 256, 256, 96, 256, 256, 256, 192, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 12032, - 100, - 70, - 1200, - 48, - 0, - 16, - 2048, - 51200, - 341, - 0, - 10, - 10, - 256, - 16, - 32768, - 1, - 0, - 0, - 0, - 64, - 15, -1, -1, - 256, 256, 256, 256, 256, 256, 256, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 12032, - 100, - 70, - 1200, - 48, - 0, - 16, - 2048, - 51200, - 341, - 0, - 10, - 10, - 256, - 16, - 32768, - 1, - 0, - 0, - 0, - 64, - 15, -1, -1, - 256, 256, 256, 256, 256, 256, 256, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 12032, - 100, - 70, - 1200, - 48, - 0, - 16, - 2048, - 51200, - 341, - 0, - 10, - 10, - 256, - 16, - 32768, - 1, - 0, - 0, - 0, - 64, - 15, -1, -1, - 256, 256, 256, 256, 256, 256, 256, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 12032, - 100, - 70, - 1200, - 48, - 0, - 16, - 2048, - 51200, - 341, - 0, - 10, - 10, - 256, - 16, - 32768, - 1, - 0, - 0, - 0, - 64, - 15, -1, -1, - 256, 256, 256, 256, 256, 256, 256, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 12032, - 100, - 70, - 1200, - 48, - 0, - 16, - 2048, - 51200, - 341, - 0, - 10, - 10, - 256, - 16, - 32768, - 1, - 0, - 0, - 0, - 64, - 15, -1, -1, - 256, 256, 256, 256, 256, 256, 256, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 12032, - 100, - 70, - 1200, - 48, - 0, - 16, - 2048, - 51200, - 341, - 0, - 10, - 10, - 256, - 16, - 32768, - 1, - 0, - 0, - 0, - 64, - 15, -1, -1, - 256, 256, 256, 256, 256, 256, 256, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 12032, - 100, - 70, - 1200, - 48, - 0, - 16, - 2048, - 51200, - 341, - 0, - 10, - 10, - 256, - 16, - 32768, - 1, - 0, - 0, - 0, - 64, - 15, -1, -1, - 256, 256, 256, 256, 256, 256, 256, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 12032, - 100, - 70, - 1200, - 48, - 0, - 16, - 2048, - 51200, - 341, - 0, - 10, - 10, - 256, - 16, - 32768, - 1, - 0, - 0, - 0, - 64, - 15, -1, -1, - 256, 256, 256, 256, 256, 256, 256, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 12544, - 25, - 70, - 1200, - 48, - 41, - 20, - 10240, - 51200, - 341, - 0, - 100, - 100, - 0, - 0, - 32768, - 0, - 0, - 0, - 0, - 160, - 7, 5, -1, - 256, 256, 256, 256, 256, 256, 256, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 4096, - 30, - 70, - 1200, - 48, - 41, - 20, - 10240, - 51200, - 341, - 0, - 100, - 100, - 0, - 0, - 32768, - 0, - 46603, - 34952, - 13981, - 160, - 7, 5, -1, - 256, 256, 256, 256, 256, 256, 256, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 4352, - 12, - 70, - 1200, - 48, - 46, - 20, - 10240, - 51200, - 341, - 0, - 10, - 15, - 256, - 16, - 32768, - 0, - 58254, - 46603, - 34952, - 160, - 7, 5, -1, - 256, 256, 256, 256, 256, 256, 256, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 4352, - 25, - 120, - 1200, - 48, - 44, - 20, - 10240, - 51200, - 341, - 0, - 10, - 15, - 256, - 16, - 32768, - 0, - 39612, - 27962, - 13981, - 100, - 7, 5, -1, - 256, 256, 256, 256, 256, 256, 256, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 4096, - 100, - 70, - 1200, - 64, - 38, - 20, - 2048, - 51200, - 341, - 0, - 10, - 10, - 256, - 16, - 32768, - 0, - 0, - 0, - 0, - 64, - 15, -1, -1, - 256, 256, 256, 256, 256, 256, 256, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 4352, - 60, - 70, - 1200, - 48, - 46, - 20, - 5120, - 0, - 341, - 0, - 10, - 15, - 256, - 16, - 32768, - 1, - 58254, - 46603, - 34952, - 384, - 15, -1, -1, - 256, 256, 112, 256, 256, 256, 256, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 12544, - 50, - 70, - 1200, - 48, - 46, - 20, - 2560, - 0, - 341, - 0, - 10, - 8, - 256, - 16, - 32768, - 1, - 58254, - 46603, - 34952, - 384, - 15, -1, -1, - 288, 288, 288, 288, 288, 288, 288, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 11520, - 25, - 70, - 1200, - 32, - -5, - 0, - 2048, - 51200, - 341, - 0, - 10, - 10, - 256, - 16, - 32768, - 0, - 0, - 0, - 0, - 64, - 7, 5, -1, - 256, 256, 256, 256, 256, 256, 256, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 12800, - 40, - 70, - 1200, - 48, - 41, - 20, - 10240, - 51200, - 512, - 0, - 10, - 8, - 256, - 16, - 32768, - 1, - 46603, - 34952, - 13981, - 256, - 15, -1, -1, - 256, 256, 96, 160, 256, 256, 12, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 13056, - 40, - 70, - 1200, - 48, - 41, - 20, - 10240, - 51200, - 512, - 0, - 10, - 8, - 256, - 16, - 32768, - 1, - 46603, - 34952, - 13981, - 256, - 15, -1, -1, - 256, 160, 96, 64, 256, 256, 256, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 13312, - 40, - 70, - 1200, - 48, - 41, - 20, - 10240, - 51200, - 512, - 0, - 10, - 12, - 256, - 16, - 32768, - 1, - 46603, - 34952, - 13981, - 256, - 15, -1, -1, - 128, 128, 16, 16, 0, 64, 48, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 13568, - 10, - 5, - 1200, - 32, - 3, - 0, - 12800, - 51200, - 512, - 0, - 10, - 10, - 256, - 16, - 32768, - 0, - 58254, - 46603, - 34952, - 384, - 7, -1, -1, - 160, 160, 160, 160, 256, 128, 288, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 10752, - 120, - 70, - 1200, - 48, - 41, - 20, - 12800, - 51200, - 341, - 0, - 10, - 10, - 256, - 16, - 32768, - 1, - 116508, - 81555, - 69905, - 384, - 7, -1, -1, - 5, 5, 15, 8, 0, 15, 15, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 13568, - 10, - 5, - 1200, - 32, - 3, - 0, - 12800, - 51200, - 512, - 0, - 10, - 10, - 256, - 16, - 32768, - 0, - 58254, - 46603, - 34952, - 384, - 7, -1, -1, - 256, 256, 256, 256, 256, 256, 256, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - { - 10752, - 25, - 70, - 1200, - 48, - 41, - 20, - 12800, - 51200, - 341, - 0, - 10, - 10, - 256, - 16, - 32768, - 1, - 116508, - 81555, - 69905, - 384, - 7, -1, -1, - 256, 256, 256, 256, 256, 256, 256, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - //254 - kDudeModernCustom - { - 11520, // start sequence ID - 85, // start health - 75, // mass - 120, - 48, // clip distance - 48, // eye above z - 20, - 10240, // hear distance - 51200, // seeing distance - kAng90, // vision periphery - // 0, - 618, // melee distance - 5, // flee health - 5, // hinder damage - 0x0000, // change target chance - 0x0000, // change target to kin chance - 0x8000, // alertChance - 1, // lockout - 46603, // frontSpeed - 34952, // sideSpeed - 13981, // backSpeed - 256, // angSpeed - // 0, - 7, -1, 18, // nGibType - 64, 256, 256, 256, 256, 256, 256, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - }, - //255 - kDudeModernCustomBurning - { - 4096, // start sequence ID - 25, // start health - 5, // mass - 120, - 48, // clip distance - 41, // eye above z - 20, - 12800, // hear distance - 51200, // seeing distance - kAng60, // vision periphery - // 0, - 0, // melee distance - 10, // flee health - 10, // hinder damage - 0x0100, // change target chance - 0x0010, // change target to kin chance - 0x8000, // alertChance - true, // lockout - 58254, // frontSpeed - 46603, // sideSpeed - 34952, // backSpeed - 384, // angSpeed - // 0, - 7, -1, -1, // nGibType - 256, 256, 256, 256, 256, 256, 256, - 0, 0, 0, 0, 0, 0, 0, - 0, - 0 - } -}; - DUDEINFO gPlayerTemplate[4] = { // normal human @@ -1727,5 +150,4 @@ DUDEINFO gPlayerTemplate[4] = }, }; -DUDEINFO fakeDudeInfo = {}; END_BLD_NS diff --git a/source/games/blood/src/dude.h b/source/games/blood/src/dude.h index dc76b66b8..a801b18bf 100644 --- a/source/games/blood/src/dude.h +++ b/source/games/blood/src/dude.h @@ -88,18 +88,8 @@ struct DUDEINFO { }; -extern DUDEINFO dudeInfo[kDudeMax - kDudeBase]; extern DUDEINFO gPlayerTemplate[4]; -extern DUDEINFO fakeDudeInfo; -inline DUDEINFO* getDudeInfo(int const nType) -{ - if (nType >= kDudeBase && nType < kDudeMax) - return &dudeInfo[nType - kDudeBase]; - return &fakeDudeInfo; -} - -DUDEINFO* getDudeInfo(DBloodActor* actor); DBloodPlayer* getPlayer(DBloodActor* actor); END_BLD_NS