- Added A_ZoomFactor. This lets weapons scale their player's FOV. Each weapon

maintains its own FOV scale independent from any other weapons the player
  may have.
- Fixed: When parsing DECORATE functions that were not exported, the parser
  crashed after giving you the warning.


SVN r1688 (trunk)
This commit is contained in:
Randy Heit 2009-06-30 19:20:39 +00:00
commit ed0d804792
6 changed files with 78 additions and 29 deletions

View file

@ -857,31 +857,34 @@ static void ParseActionDef (FScanner &sc, PClass *cls)
}
}
sc.MustGetToken(';');
PSymbolActionFunction *sym = new PSymbolActionFunction(funcname);
sym->Arguments = args;
sym->Function = afd->Function;
if (hasdefaults)
if (afd != NULL)
{
sym->defaultparameterindex = StateParams.Size();
for(unsigned int i = 0; i < DefaultParams.Size(); i++)
PSymbolActionFunction *sym = new PSymbolActionFunction(funcname);
sym->Arguments = args;
sym->Function = afd->Function;
if (hasdefaults)
{
StateParams.Add(DefaultParams[i], cls, true);
sym->defaultparameterindex = StateParams.Size();
for(unsigned int i = 0; i < DefaultParams.Size(); i++)
{
StateParams.Add(DefaultParams[i], cls, true);
}
}
else
{
sym->defaultparameterindex = -1;
}
if (error)
{
FScriptPosition::ErrorCounter++;
}
else if (cls->Symbols.AddSymbol (sym) == NULL)
{
delete sym;
sc.ScriptMessage ("'%s' is already defined in class '%s'.",
funcname.GetChars(), cls->TypeName.GetChars());
FScriptPosition::ErrorCounter++;
}
}
else
{
sym->defaultparameterindex = -1;
}
if (error)
{
FScriptPosition::ErrorCounter++;
}
else if (cls->Symbols.AddSymbol (sym) == NULL)
{
delete sym;
sc.ScriptMessage ("'%s' is already defined in class '%s'.",
funcname.GetChars(), cls->TypeName.GetChars());
FScriptPosition::ErrorCounter++;
}
}