Merge branch 'maint' of https://github.com/rheit/zdoom into maint2.1

This commit is contained in:
Christoph Oelckers 2016-02-09 15:24:33 +01:00
commit cb4a413889
2 changed files with 7 additions and 1 deletions

View file

@ -484,7 +484,7 @@ void FSliderItem::Drawer(bool selected)
screen->DrawText(mFont, selected? OptionSettings.mFontColorSelection : mFontColor, mXpos, mYpos, text, DTA_Clean, true, TAG_DONE);
int x = SmallFont->StringWidth ("Green") + 8 + mXpos;
int x2 = SmallFont->StringWidth (mText) + 8 + mXpos;
int x2 = SmallFont->StringWidth (text) + 8 + mXpos;
DrawSlider (MAX(x2, x), mYpos);
}

View file

@ -1711,6 +1711,12 @@ static void DoGiveInventory(AActor * receiver, bool use_aaptr, DECLARE_PARAMINFO
if (amount==0) amount=1;
if (mi)
{
if (!mi->IsDescendantOf (RUNTIME_CLASS(AInventory)))
{
ACTION_SET_RESULT(false);
return;
}
AInventory *item = static_cast<AInventory *>(Spawn (mi, 0, 0, 0, NO_REPLACE));
if (!item)
{