The International Simutrans Forum

 

Author Topic: [bug r2640] All stop report "Crowded" at new month  (Read 3173 times)

0 Members and 1 Guest are viewing this topic.

Offline z9999

  • Devotees (Inactive)
  • *
  • Posts: 848
[bug r2640] All stop report "Crowded" at new month
« on: September 07, 2009, 04:57:15 AM »
At the biginning of new month, I got "Overcrowded message" from all of stops.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10675
  • Languages: De,EN,JP
Re: [bug r2640] All stop report "Crowded" at new month
« Reply #1 on: September 08, 2009, 08:35:09 PM »
Yes, somehow the overcrowded flag is not resetted at the beginning of a month.

Offline z9999

  • Devotees (Inactive)
  • *
  • Posts: 848
Re: [bug r2640] All stop report "Crowded" at new month
« Reply #2 on: September 08, 2009, 08:48:18 PM »
No. overcrowded is a pointer that is not NULL.

   uint8 overcrowded[8];   // bit set, when overcrowded

   if(  welt->get_active_player()==besitzer_p  &&  overcrowded  ) {

Offline z9999

  • Devotees (Inactive)
  • *
  • Posts: 848
Re: [bug r2640] All stop report "Crowded" at new month
« Reply #3 on: September 10, 2009, 08:53:37 AM »
Nobody seems to have a interest for this.
Then please revert the old correct code.

Code: [Select]
Index: simhalt.cc
===================================================================
--- simhalt.cc (r 2643)
+++ simhalt.cc (copy)
@@ -739,7 +739,7 @@
  */
 void haltestelle_t::neuer_monat()
 {
- if(  welt->get_active_player()==besitzer_p  &&  overcrowded  ) {
+ if(  welt->get_active_player()==besitzer_p  &&  status_color == COL_RED  ) {
  char buf[256];
  sprintf(buf, translator::translate("!0_STATION_CROWDED"), get_name());
  welt->get_message()->add_message(buf, get_basis_pos(),message_t::full, PLAYER_FLAG|besitzer_p->get_player_nr(), IMG_LEER );

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10675
  • Languages: De,EN,JP
Re: [bug r2640] All stop report "Crowded" at new month
« Reply #4 on: September 10, 2009, 12:30:15 PM »
I know what is wrong; however in colins save it reported stops crowded that where not, as also red color is obtained when passengers are unhappy for routed over overcrowded stops. Those should be not reported. However, I cannot submit to svn at the moment, from this computer (on conference again).

Offline z9999

  • Devotees (Inactive)
  • *
  • Posts: 848
Re: [bug r2640] All stop report "Crowded" at new month
« Reply #5 on: September 10, 2009, 02:40:42 PM »
however in colins save it reported stops crowded that where not, as also red color is obtained when passengers are unhappy for routed over overcrowded stops.

Thus, I didn't agree to add them to unhappy.  :-[

Anyway, current nightly has a problem which may open infomation windows as mucu as possible. This need to be fixd.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4878
  • Languages: EN, DE, AT
Re: [bug r2640] All stop report "Crowded" at new month
« Reply #6 on: September 10, 2009, 07:13:46 PM »
What about this:
Code: [Select]
if(  welt->get_active_player()==besitzer_p  &&  (enables & CROWDED) ) {
but then everywhere, where a bit is set in overcrowded,
Code: [Select]
enables |= CROWDED;
must be added.

Also line 2176 looks weird:
Code: [Select]
status_bits |= (ware_sum>max_ware+32  ||  CROWDED) ? 2 : 1;
as CROWDED=8, bool(CROWDED)=true, so the second test here makes no sense.

I do not have time to test this now :/

Offline z9999

  • Devotees (Inactive)
  • *
  • Posts: 848
Re: [bug r2640] All stop report "Crowded" at new month
« Reply #7 on: September 10, 2009, 09:03:17 PM »
Please solve the current problem first.
This old code had been used for many years without problems.
And current version has a big problem.

If you found a problem, think it freely after revert the code.

Offline Frank

  • Inactive/Retired
  • *
  • Posts: 1431
  • Languages: DE
[solved r2645] r2640 : crowded bug
« Reply #8 on: September 13, 2009, 05:31:16 PM »
stations not activ ( yellow )

stations no goods waiting

-> message 'is crowded'
« Last Edit: September 13, 2009, 08:18:40 PM by Frank »

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10675
  • Languages: De,EN,JP
Re: r2640 : crowded bug
« Reply #9 on: September 13, 2009, 07:53:30 PM »
Should be fixed in newer releases. Was also found by z9999.

Offline Frank

  • Inactive/Retired
  • *
  • Posts: 1431
  • Languages: DE
Re: r2640 : crowded bug
« Reply #10 on: September 13, 2009, 08:11:46 PM »
« Last Edit: September 13, 2009, 08:37:43 PM by whoami »