mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-17 20:13:07 +01:00
Use const ref on MoneyEffect::Create
This commit is contained in:
@@ -64,8 +64,9 @@ void MoneyEffect::CreateAt(money32 value, const CoordsXYZ& effectPos, bool verti
|
||||
*
|
||||
* rct2: 0x0069C5D0
|
||||
*/
|
||||
void MoneyEffect::Create(money32 value, CoordsXYZ loc)
|
||||
void MoneyEffect::Create(money32 value, const CoordsXYZ& loc)
|
||||
{
|
||||
auto offsetLoc = loc;
|
||||
if (loc.isNull())
|
||||
{
|
||||
// If game actions return no valid location of the action we can not use the screen
|
||||
@@ -86,10 +87,10 @@ void MoneyEffect::Create(money32 value, CoordsXYZ loc)
|
||||
if (!mapPositionXY)
|
||||
return;
|
||||
|
||||
loc = { *mapPositionXY, tile_element_height(*mapPositionXY) };
|
||||
offsetLoc = { *mapPositionXY, tile_element_height(*mapPositionXY) };
|
||||
}
|
||||
loc.z += 10;
|
||||
CreateAt(-value, loc, false);
|
||||
offsetLoc.z += 10;
|
||||
CreateAt(-value, offsetLoc, false);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -82,7 +82,7 @@ struct MoneyEffect : SpriteBase
|
||||
uint16_t Wiggle;
|
||||
|
||||
static void CreateAt(money32 value, const CoordsXYZ& effectPos, bool vertical);
|
||||
static void Create(money32 value, CoordsXYZ loc);
|
||||
static void Create(money32 value, const CoordsXYZ& loc);
|
||||
void Update();
|
||||
std::pair<rct_string_id, money32> GetStringId() const;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user