News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

[bug r2640] All stop report "Crowded" at new month

Started by z9999, September 07, 2009, 04:57:15 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

z9999

At the biginning of new month, I got "Overcrowded message" from all of stops.

prissi

Yes, somehow the overcrowded flag is not resetted at the beginning of a month.

z9999

No. overcrowded is a pointer that is not NULL.

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

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

z9999

Nobody seems to have a interest for this.
Then please revert the old correct code.


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 );


prissi

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).

z9999

Quote from: prissi on September 10, 2009, 12:30:15 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.

Dwachs

What about this:

if(  welt->get_active_player()==besitzer_p  &&  (enables & CROWDED) ) {

but then everywhere, where a bit is set in overcrowded,

enables |= CROWDED;

must be added.

Also line 2176 looks weird:

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 :/
Parsley, sage, rosemary, and maggikraut.

z9999

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.

Frank

#8
stations not activ ( yellow )

stations no goods waiting

-> message 'is crowded'

prissi

Should be fixed in newer releases. Was also found by z9999.

Frank

#10