mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-12 07:34:50 +00:00
Merge branch 'master' of https://github.com/rheit/zdoom
This commit is contained in:
commit
e14756e810
2 changed files with 14 additions and 3 deletions
|
@ -2347,14 +2347,14 @@ class AMusicChanger : public ASectorAction
|
||||||
{
|
{
|
||||||
DECLARE_CLASS (AMusicChanger, ASectorAction)
|
DECLARE_CLASS (AMusicChanger, ASectorAction)
|
||||||
public:
|
public:
|
||||||
virtual bool TriggerAction (AActor *triggerer, int activationType);
|
virtual bool DoTriggerAction (AActor *triggerer, int activationType);
|
||||||
virtual void Tick();
|
virtual void Tick();
|
||||||
virtual void PostBeginPlay();
|
virtual void PostBeginPlay();
|
||||||
};
|
};
|
||||||
|
|
||||||
IMPLEMENT_CLASS(AMusicChanger)
|
IMPLEMENT_CLASS(AMusicChanger)
|
||||||
|
|
||||||
bool AMusicChanger::TriggerAction (AActor *triggerer, int activationType)
|
bool AMusicChanger::DoTriggerAction (AActor *triggerer, int activationType)
|
||||||
{
|
{
|
||||||
if (activationType & SECSPAC_Enter)
|
if (activationType & SECSPAC_Enter)
|
||||||
{
|
{
|
||||||
|
@ -2364,7 +2364,7 @@ bool AMusicChanger::TriggerAction (AActor *triggerer, int activationType)
|
||||||
reactiontime = 30;
|
reactiontime = 30;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Super::TriggerAction (triggerer, activationType);
|
return Super::DoTriggerAction (triggerer, activationType);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AMusicChanger::Tick()
|
void AMusicChanger::Tick()
|
||||||
|
|
|
@ -374,6 +374,8 @@ static void ParseUserVariable (FScanner &sc, PSymbolTable *symt, PClass *cls)
|
||||||
FScriptPosition::ErrorCounter++;
|
FScriptPosition::ErrorCounter++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
FName symname = sc.String;
|
FName symname = sc.String;
|
||||||
if (sc.CheckToken('['))
|
if (sc.CheckToken('['))
|
||||||
{
|
{
|
||||||
|
@ -391,6 +393,15 @@ static void ParseUserVariable (FScanner &sc, PSymbolTable *symt, PClass *cls)
|
||||||
}
|
}
|
||||||
sc.MustGetToken(';');
|
sc.MustGetToken(';');
|
||||||
|
|
||||||
|
// We must ensure that we do not define duplicates, even when they come from a parent table.
|
||||||
|
if (symt->FindSymbol(symname, true) != NULL)
|
||||||
|
{
|
||||||
|
sc.ScriptMessage ("'%s' is already defined in '%s' or one of its ancestors.",
|
||||||
|
symname.GetChars(), cls ? cls->TypeName.GetChars() : "Global");
|
||||||
|
FScriptPosition::ErrorCounter++;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
PSymbolVariable *sym = new PSymbolVariable(symname);
|
PSymbolVariable *sym = new PSymbolVariable(symname);
|
||||||
sym->offset = cls->Extend(sizeof(int) * (valuetype.Type == VAL_Array ? valuetype.size : 1));
|
sym->offset = cls->Extend(sizeof(int) * (valuetype.Type == VAL_Array ? valuetype.size : 1));
|
||||||
sym->ValueType = valuetype;
|
sym->ValueType = valuetype;
|
||||||
|
|
Loading…
Reference in a new issue