- removed all direct access to AWeapon's members to prepare moving this class fully to the script side.

Disregarding UI-side and setup-related calls there's unfortunately still 6 places in the native game code which require direct access.
This commit is contained in:
Christoph Oelckers 2018-11-25 08:17:37 +01:00
commit b5c4ab8c47
18 changed files with 95 additions and 76 deletions

View file

@ -1150,16 +1150,16 @@ float DPSprite::GetYAdjust(bool fullscreen)
AWeapon *weapon = dyn_cast<AWeapon>(GetCaller());
if (weapon != nullptr)
{
float fYAd = weapon->YAdjust;
auto fYAd = weapon->FloatVar(NAME_YAdjust);
if (fYAd != 0)
{
if (fullscreen)
{
return fYAd;
return (float)fYAd;
}
else
{
return (float)StatusBar->GetDisplacement() * fYAd;
return (float)(StatusBar->GetDisplacement() * fYAd);
}
}
}