mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
- Trying to replace an actor that does not exist is now a warning rather than an error.
SVN r3820 (trunk)
This commit is contained in:
parent
2a9a1fb240
commit
27f6d431ca
3 changed files with 7 additions and 5 deletions
|
@ -180,7 +180,7 @@ FActorInfo *CreateNewActor(const FScriptPosition &sc, FName typeName, FName pare
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
void SetReplacement(FActorInfo *info, FName replaceName)
|
||||
void SetReplacement(FScanner &sc, FActorInfo *info, FName replaceName)
|
||||
{
|
||||
// Check for "replaces"
|
||||
if (replaceName != NAME_None)
|
||||
|
@ -190,11 +190,13 @@ void SetReplacement(FActorInfo *info, FName replaceName)
|
|||
|
||||
if (replacee == NULL)
|
||||
{
|
||||
I_Error ("Replaced type '%s' not found in %s", replaceName.GetChars(), info->Class->TypeName.GetChars());
|
||||
sc.ScriptMessage("Replaced type '%s' not found for %s", replaceName.GetChars(), info->Class->TypeName.GetChars());
|
||||
return;
|
||||
}
|
||||
else if (replacee->ActorInfo == NULL)
|
||||
{
|
||||
I_Error ("Replaced type '%s' is not an actor in %s", replaceName.GetChars(), info->Class->TypeName.GetChars());
|
||||
sc.ScriptMessage("Replaced type '%s' for %s is not an actor", replaceName.GetChars(), info->Class->TypeName.GetChars());
|
||||
return;
|
||||
}
|
||||
if (replacee != NULL)
|
||||
{
|
||||
|
|
|
@ -199,7 +199,7 @@ PSymbolActionFunction *FindGlobalActionFunction(const char *name);
|
|||
//==========================================================================
|
||||
|
||||
FActorInfo *CreateNewActor(const FScriptPosition &sc, FName typeName, FName parentName, bool native);
|
||||
void SetReplacement(FActorInfo *info, FName replaceName);
|
||||
void SetReplacement(FScanner &sc, FActorInfo *info, FName replaceName);
|
||||
|
||||
void HandleActorFlag(FScanner &sc, Baggage &bag, const char *part1, const char *part2, int mod);
|
||||
void FinishActor(const FScriptPosition &sc, FActorInfo *info, Baggage &bag);
|
||||
|
|
|
@ -1108,7 +1108,7 @@ static FActorInfo *ParseActorHeader(FScanner &sc, Baggage *bag)
|
|||
info->DoomEdNum = DoomEdNum > 0? DoomEdNum : -1;
|
||||
info->Class->Meta.SetMetaString (ACMETA_Lump, Wads.GetLumpFullPath(sc.LumpNum));
|
||||
|
||||
SetReplacement(info, replaceName);
|
||||
SetReplacement(sc, info, replaceName);
|
||||
|
||||
ResetBaggage (bag, info->Class->ParentClass);
|
||||
bag->Info = info;
|
||||
|
|
Loading…
Reference in a new issue