Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Company value goal bug 9 years 4 months ago #3745

Hello everyone,

I just came across a bug in the server logic, and I hope this can be solved soon :)

The bug: when two companies are playing a CV game and on one database update they are both below the target company value, but in the next database update they are both past the target, the first company in the list, rather than the company passing the target first, wins the game.

I was playing as company #2 on the 150m temperate server. When the database updated, I was already at around 160m while company #1 was at 152m, and company #1 won the game. Luckily, in this case an admin was so kind to check the data and register the game as won by me :)

Anyway, I think this problem might be solved in two ways:
1. Increase the database update interval, so that the scenario when more than one company has a company value higher than the target does never occur.
2. If a company is found with a company value higher than the target, first check if there are other companies with a higher company value, and let the company with the highest company value win. This fix might be the easiest.

I hope this is of some use and I look forward to playing many more games on the BTPro servers!

Regards,
Jasper

Please Log in or Create an account to join the conversation.

Company value goal bug 9 years 4 months ago #3746

Hi jbussemaker,

I checked the code regarding this issue and the winner is decided by score(points received) in such a case, but indeed it doesn't take into consideration the company value if both companies win at the same time. I'll probably have to talk to Frank to see how a case like this should be handled.

Just
  • Just
  • Just's Avatar
  • Offline
  • Administrator
  • Administrator
  • .Net Developer
  • Posts: 21
  • Thank you received: 10

Please Log in or Create an account to join the conversation.

Company value goal bug 9 years 4 months ago #3747

Even though it was years ago I still remember when I wrote that code I knew that problem would exist, but I was like "cmon, that's pretty unlikely to happen, I can still consider that case later...".
Guess it backfired on me now :oops:

Thanks for reporting it!
@Just: I will fix it in the official GoalSystem plug-in now. Let's talk on IRC about how to also get this to BTPro quickly.

Please Log in or Create an account to join the conversation.

Last edit: by YorVeX.

Company value goal bug 9 years 4 months ago #3748

Haha, well fixing it will make very close games possible :)

Thanks guys for picking it up!

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.026 seconds
Best hosting deal on hostgator coupon or play poker on party poker
Copyright 2020 Company value goal bug - BTPro - OpenTTD Community.