mirror of https://github.com/OpenRCT2/OpenRCT2.git
Separate game state logic and rendering logic for money entities
This commit is contained in:
parent
436c881f95
commit
5ee5f8013d
|
@ -2300,15 +2300,7 @@ void Guest::SpendMoney(money64& peep_expend_type, money64 amount, ExpenditureTyp
|
|||
|
||||
FinancePayment(-amount, expenditure);
|
||||
|
||||
if (gConfigGeneral.ShowGuestPurchases && !(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO))
|
||||
{
|
||||
// HACK Currently disabled for multiplayer due to limitation of all sprites
|
||||
// needing to be synchronised
|
||||
if (NetworkGetMode() == NETWORK_MODE_NONE && !gOpenRCT2Headless)
|
||||
{
|
||||
MoneyEffect::CreateAt(amount, GetLocation(), true);
|
||||
}
|
||||
}
|
||||
MoneyEffect::CreateAt(amount, GetLocation(), true);
|
||||
|
||||
OpenRCT2::Audio::Play3D(OpenRCT2::Audio::SoundId::Purchase, GetLocation());
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include "MoneyEffect.h"
|
||||
|
||||
#include "../OpenRCT2.h"
|
||||
#include "../config/Config.h"
|
||||
#include "../core/DataSerialiser.h"
|
||||
#include "../drawing/Drawing.h"
|
||||
#include "../interface/Viewport.h"
|
||||
|
@ -172,6 +173,18 @@ void MoneyEffect::Paint(PaintSession& session, int32_t imageDirection) const
|
|||
{
|
||||
PROFILED_FUNCTION();
|
||||
|
||||
if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO)
|
||||
{
|
||||
// Don't render any money in the title screen.
|
||||
return;
|
||||
}
|
||||
|
||||
if (GuestPurchase && !gConfigGeneral.ShowGuestPurchases)
|
||||
{
|
||||
// Don't show the money effect for guest purchases when the option is disabled.
|
||||
return;
|
||||
}
|
||||
|
||||
DrawPixelInfo& dpi = session.DPI;
|
||||
if (dpi.zoom_level > ZoomLevel{ 0 })
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue