forked from teamnwah/openmw-tes3coop
added missing implementation for CSMWorld::ScriptContext::getGlobalType
This commit is contained in:
parent
451e1f413b
commit
910d62e4b8
1 changed files with 14 additions and 0 deletions
|
@ -16,6 +16,20 @@ bool CSMWorld::ScriptContext::canDeclareLocals() const
|
||||||
|
|
||||||
char CSMWorld::ScriptContext::getGlobalType (const std::string& name) const
|
char CSMWorld::ScriptContext::getGlobalType (const std::string& name) const
|
||||||
{
|
{
|
||||||
|
int index = mData.getGlobals().searchId (name);
|
||||||
|
|
||||||
|
if (index!=-1)
|
||||||
|
{
|
||||||
|
switch (mData.getGlobals().getRecord (index).get().mValue.getType())
|
||||||
|
{
|
||||||
|
case ESM::VT_Short: return 's';
|
||||||
|
case ESM::VT_Long: return 'l';
|
||||||
|
case ESM::VT_Float: return 'f';
|
||||||
|
|
||||||
|
default: return ' ';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return ' ';
|
return ' ';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue