mirror of https://github.com/OpenRCT2/OpenRCT2.git
animation_set: throw DukException for invalid animations
This commit is contained in:
parent
f4cc60d974
commit
6c460c55a4
|
@ -883,7 +883,7 @@ namespace OpenRCT2::Scripting
|
|||
auto newType = availableGuestAnimations.TryGet(groupKey);
|
||||
if (newType == std::nullopt)
|
||||
{
|
||||
return;
|
||||
throw DukException() << "Invalid animation for this guest (" << groupKey << ")";
|
||||
}
|
||||
|
||||
auto* peep = GetGuest();
|
||||
|
|
|
@ -376,7 +376,7 @@ namespace OpenRCT2::Scripting
|
|||
auto newType = animationGroups.TryGet(groupKey);
|
||||
if (newType == std::nullopt)
|
||||
{
|
||||
return;
|
||||
throw DukException() << "Invalid animation for this staff member (" << groupKey << ")";
|
||||
}
|
||||
|
||||
peep->ActionSpriteType = peep->NextActionSpriteType = *newType;
|
||||
|
|
Loading…
Reference in New Issue