This commit is contained in:
Rachael Alexanderson 2017-04-06 04:30:38 -04:00
commit a1473c48c3
5 changed files with 20 additions and 8 deletions

View file

@ -1538,6 +1538,13 @@ FBaseCVar *FindCVar (const char *var_name, FBaseCVar **prev)
}
DEFINE_ACTION_FUNCTION(_CVar, FindCVar)
{
PARAM_PROLOGUE;
PARAM_NAME(name);
ACTION_RETURN_POINTER(FindCVar(name, nullptr));
}
DEFINE_ACTION_FUNCTION(_CVar, GetCVar)
{
PARAM_PROLOGUE;
PARAM_NAME(name);

View file

@ -72,8 +72,13 @@ class USDFParser : public UDMFParserBase
}
type = cls;
}
if (type && type->IsDescendantOf(RUNTIME_CLASS(AInventory))) return type;
return nullptr;
return type;
}
PClassActor *CheckInventoryActorType(const char *key)
{
PClassActor* const type = CheckActorType(key);
return nullptr != type && type->IsDescendantOf(RUNTIME_CLASS(AInventory)) ? type : nullptr;
}
//===========================================================================
@ -94,7 +99,7 @@ class USDFParser : public UDMFParserBase
switch(key)
{
case NAME_Item:
check.Item = CheckActorType(key);
check.Item = CheckInventoryActorType(key);
break;
case NAME_Amount:
@ -273,7 +278,7 @@ class USDFParser : public UDMFParserBase
switch(key)
{
case NAME_Item:
check.Item = CheckActorType(key);
check.Item = CheckInventoryActorType(key);
break;
case NAME_Count:

View file

@ -1019,6 +1019,6 @@ void(*ScreenTriangle::RectDrawers32[])(const void *, int, int, int, const RectDr
&RectScreenDrawer32<TriScreenDrawerModes::ShadedBlend, TriScreenDrawerModes::FuzzSampler>::Execute // Fuzz
};
int ScreenTriangle::FuzzStart = 0;
#endif
int ScreenTriangle::FuzzStart = 0;

View file

@ -30,7 +30,6 @@ class FBitmap;
struct FRemapTable;
struct FCopyInfo;
class FScanner;
class PClassInventory;
// Texture IDs
class FTextureManager;

View file

@ -286,7 +286,8 @@ struct CVar native
CVAR_Color,
};
native static CVar FindCVar(Name name, PlayerInfo player = null);
native static CVar FindCVar(Name name);
native static CVar GetCVar(Name name, PlayerInfo player = null);
native int GetInt();
native double GetFloat();
native String GetString();