mirror of https://github.com/OpenRCT2/OpenRCT2.git
Improve S4 / S6 import initialisation
This commit is contained in:
parent
a0fc01d54e
commit
3379143011
|
@ -1434,7 +1434,6 @@ private:
|
|||
}
|
||||
|
||||
// Awards
|
||||
award_reset();
|
||||
for (sint32 i = 0; i < RCT12_MAX_AWARDS; i++)
|
||||
{
|
||||
rct12_award * src = &_s4.awards[i];
|
||||
|
|
|
@ -161,6 +161,8 @@ void S6Importer::LoadScenario(SDL_RWops *rw)
|
|||
|
||||
void S6Importer::Import()
|
||||
{
|
||||
Initialise();
|
||||
|
||||
// _s6.header
|
||||
gS6Info = _s6.info;
|
||||
|
||||
|
@ -267,7 +269,6 @@ void S6Importer::Import()
|
|||
memcpy(gPeepWarningThrottle, _s6.peep_warning_throttle, sizeof(_s6.peep_warning_throttle));
|
||||
|
||||
// Awards
|
||||
award_reset();
|
||||
for (sint32 i = 0; i < RCT12_MAX_AWARDS; i++)
|
||||
{
|
||||
rct12_award * src = &_s6.awards[i];
|
||||
|
@ -389,6 +390,11 @@ void S6Importer::Import()
|
|||
}
|
||||
}
|
||||
|
||||
void S6Importer::Initialise()
|
||||
{
|
||||
game_init_all(_s6.map_size);
|
||||
}
|
||||
|
||||
extern "C"
|
||||
{
|
||||
/**
|
||||
|
|
|
@ -43,4 +43,6 @@ private:
|
|||
const utf8 * _s6Path = nullptr;
|
||||
rct_s6_data _s6;
|
||||
uint8 _gameVersion = 0;
|
||||
|
||||
void Initialise();
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue