mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-28 09:14:58 +01:00
Merge pull request #13667 from ZehMatt/refactor/invalidation
Simplify object invalidation automatically when possible
This commit is contained in:
@@ -104,9 +104,7 @@ namespace OpenRCT2::Scripting
|
||||
auto entity = GetEntity();
|
||||
if (entity != nullptr)
|
||||
{
|
||||
entity->Invalidate2();
|
||||
entity->MoveTo({ value, entity->y, entity->z });
|
||||
entity->Invalidate2();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,9 +120,7 @@ namespace OpenRCT2::Scripting
|
||||
auto entity = GetEntity();
|
||||
if (entity != nullptr)
|
||||
{
|
||||
entity->Invalidate2();
|
||||
entity->MoveTo({ entity->x, value, entity->z });
|
||||
entity->Invalidate2();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,9 +136,7 @@ namespace OpenRCT2::Scripting
|
||||
auto entity = GetEntity();
|
||||
if (entity != nullptr)
|
||||
{
|
||||
entity->Invalidate2();
|
||||
entity->MoveTo({ entity->x, entity->y, value });
|
||||
entity->Invalidate2();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,7 +146,7 @@ namespace OpenRCT2::Scripting
|
||||
auto entity = GetEntity();
|
||||
if (entity != nullptr)
|
||||
{
|
||||
entity->Invalidate2();
|
||||
entity->Invalidate();
|
||||
switch (entity->sprite_identifier)
|
||||
{
|
||||
case SpriteIdentifier::Vehicle:
|
||||
|
||||
Reference in New Issue
Block a user