Correct ITweakPlayerRes offset

This commit is contained in:
Phillip Stephens 2020-03-01 16:56:38 -08:00
parent b0b663f71f
commit 1c5fd85b57
Signed by: Antidote
GPG Key ID: F8BEE4C83DACA60D
1 changed files with 9 additions and 9 deletions

View File

@ -38,7 +38,7 @@ struct ITweakPlayerRes : ITweak {
/* Power, Ice, Wave, Plasma, Phazon */ /* Power, Ice, Wave, Plasma, Phazon */
std::array<ResId, 5> xc8_ballTransitions; std::array<ResId, 5> xc8_ballTransitions;
std::array<ResId, 5> xc8_cineGun; std::array<ResId, 5> xdc_cineGun;
float xf0_cinematicMoveOutofIntoPlayerDistance; float xf0_cinematicMoveOutofIntoPlayerDistance;
@ -64,21 +64,21 @@ struct ITweakPlayerRes : ITweak {
ResId GetBeamCineModel(EBeamId beam) const { ResId GetBeamCineModel(EBeamId beam) const {
auto b = size_t(beam); auto b = size_t(beam);
if (b >= xc8_cineGun.size()) { if (b >= xdc_cineGun.size()) {
b = 0; b = 0;
} }
switch (EBeamId(b)) { switch (EBeamId(b)) {
case EBeamId::Power: case EBeamId::Power:
default: default:
return xc8_cineGun[0]; return xdc_cineGun[0];
case EBeamId::Ice: case EBeamId::Ice:
return xc8_cineGun[1]; return xdc_cineGun[1];
case EBeamId::Wave: case EBeamId::Wave:
return xc8_cineGun[2]; return xdc_cineGun[2];
case EBeamId::Plasma: case EBeamId::Plasma:
return xc8_cineGun[3]; return xdc_cineGun[3];
case EBeamId::Phazon: case EBeamId::Phazon:
return xc8_cineGun[4]; return xdc_cineGun[4];
} }
} }
@ -134,8 +134,8 @@ struct ITweakPlayerRes : ITweak {
xc8_ballTransitions[i] = factory.GetResourceIdByName(_GetBallTransitionBeamRes(i))->id; xc8_ballTransitions[i] = factory.GetResourceIdByName(_GetBallTransitionBeamRes(i))->id;
} }
for (size_t i = 0; i < xc8_cineGun.size(); ++i) { for (size_t i = 0; i < xdc_cineGun.size(); ++i) {
xc8_cineGun[i] = factory.GetResourceIdByName(_GetBeamCineModel(i))->id; xdc_cineGun[i] = factory.GetResourceIdByName(_GetBeamCineModel(i))->id;
} }
xf0_cinematicMoveOutofIntoPlayerDistance = _GetCinematicMoveOutofIntoPlayerDistance(); xf0_cinematicMoveOutofIntoPlayerDistance = _GetCinematicMoveOutofIntoPlayerDistance();