The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: z9999 on September 07, 2009, 04:57:15 am

Title: [bug r2640] All stop report "Crowded" at new month
Post by: z9999 on September 07, 2009, 04:57:15 am
At the biginning of new month, I got "Overcrowded message" from all of stops.
Title: Re: [bug r2640] All stop report "Crowded" at new month
Post by: prissi on September 08, 2009, 08:35:09 pm
Yes, somehow the overcrowded flag is not resetted at the beginning of a month.
Title: Re: [bug r2640] All stop report "Crowded" at new month
Post by: z9999 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  ) {
Title: Re: [bug r2640] All stop report "Crowded" at new month
Post by: z9999 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 );
Title: Re: [bug r2640] All stop report "Crowded" at new month
Post by: prissi 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 p****engers 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).
Title: Re: [bug r2640] All stop report "Crowded" at new month
Post by: z9999 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 p****engers 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.
Title: Re: [bug r2640] All stop report "Crowded" at new month
Post by: Dwachs 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 :/
Title: Re: [bug r2640] All stop report "Crowded" at new month
Post by: z9999 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.
Title: [solved r2645] r2640 : crowded bug
Post by: Frank on September 13, 2009, 05:31:16 pm
stations not activ ( yellow )

stations no goods waiting

-> message 'is crowded'
Title: Re: r2640 : crowded bug
Post by: prissi on September 13, 2009, 07:53:30 pm
Should be fixed in newer releases. Was also found by z9999.
Title: Re: r2640 : crowded bug
Post by: Frank on September 13, 2009, 08:11:46 pm
sorry

merged to http://forum.simutrans.com/index.php?topic=3221.0 (http://forum.simutrans.com/index.php?topic=3221.0)
done --whoami