Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0005204: Fix Weather blending at server #204

Merged
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.
+9 −6
Diff settings

Always

Just for now

@@ -25,6 +25,11 @@ CBlendedWeather::CBlendedWeather(CClock* pClock)
m_pClock = pClock;
}

void CBlendedWeather::DoPulse(void)
{
Update();
}

void CBlendedWeather::SetWeather(unsigned char ucWeather)
{
// Set the primary and secondary weather instantly and stop any blending we might've been doing
@@ -36,9 +41,6 @@ void CBlendedWeather::SetWeather(unsigned char ucWeather)

void CBlendedWeather::SetWeatherBlended(unsigned char ucWeather, unsigned char ucHour)
{
// TODO: Should write it to not require this
Update();

// Store the weather we blend to for the timing
m_ucPrimaryBlendedWeather = m_ucSecondaryWeather;
m_ucSecondaryBlendedWeather = ucWeather;
@@ -54,9 +56,6 @@ void CBlendedWeather::SetWeatherBlended(unsigned char ucWeather, unsigned char u

unsigned char CBlendedWeather::GetWeather(void)
{
// TODO: Should write it to not require this
Update();

// If we're blending the weather, return the weather we started blending from
if (m_ucBlendStopHour != 0xFF)
{
@@ -18,6 +18,8 @@ class CBlendedWeather
public:
CBlendedWeather(CClock* pClock);

void DoPulse(void);

void SetWeather(unsigned char ucWeather);
void SetWeatherBlended(unsigned char ucWeather, unsigned char ucHour);

@@ -469,6 +469,8 @@ void CGame::DoPulse(void)

CLOCK_CALL1(m_pAsyncTaskScheduler->CollectResults());

CLOCK_CALL1(m_pMapManager->GetWeather()->DoPulse(););

This comment has been minimized.

Copy link
@qaisjp

qaisjp Jun 25, 2018

Member

DoPulse();); should that extra semicolon be there?

This comment has been minimized.

Copy link
@emre1702

emre1702 Jun 25, 2018

Author Contributor

It's in nearly every other line with CLOCK_CALL1, so wanted to "continue" this style o.o

This comment has been minimized.

Copy link
@qaisjp

qaisjp Jun 25, 2018

Member

Oh I see — I was just confused because the one above doesn't use it! Should be fine.


PrintLogOutputFromNetModule();
m_pScriptDebugging->UpdateLogOutput();

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.