1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-17 11:39:11 +00:00

(svn r1518) -Fix: server issue where some company names were wrong

-Fix: Highscore troubles; accessing members of deleted window
This commit is contained in:
darkvater
2005-01-15 01:52:23 +00:00
parent 75474e5bf1
commit f9b5f704b1
25 changed files with 36 additions and 29 deletions

View File

@@ -823,7 +823,7 @@ STR_0313_FUND_NEW_INDUSTRY :Fund new industry
############ range ends here
STR_0314_FUND_NEW_INDUSTRY :{WHITE}Fund new industry
STR_0315 :{STRING}
STR_JUST_STRING :{STRING}
STR_0316_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}...can only be built in towns
STR_0317_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}...can only be built in rainforest areas
STR_0318_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}...can only be built in desert areas

View File

@@ -826,7 +826,7 @@ STR_0313_FUND_NEW_INDUSTRY :Fundar nova ind
############ range ends here
STR_0314_FUND_NEW_INDUSTRY :{WHITE}Fundar nova ind<6E>stria
STR_0315 :{STRING}
STR_JUST_STRING :{STRING}
STR_0316_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}...nom<6F>s es pot construir en poblacions
STR_0317_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}...nom<6F>s es pot construir en <20>rees de selva tropical
STR_0318_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}...nom<6F>s es pot construir en <20>rees de desert

View File

@@ -826,7 +826,7 @@ STR_0313_FUND_NEW_INDUSTRY :Investovat do prumyslu
############ range ends here
STR_0314_FUND_NEW_INDUSTRY :{WHITE}Investovat do prumyslu
STR_0315 :{STRING}
STR_JUST_STRING :{STRING}
STR_0316_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}...muze b<>t budov<6F>no jen ve mestech
STR_0317_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}...muze b<>t budov<6F>no jen v pralesech
STR_0318_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}...muze b<>t budov<6F>no jen v poustich

View File

@@ -794,7 +794,7 @@ STR_0313_FUND_NEW_INDUSTRY :Opf
############ range ends here
STR_0314_FUND_NEW_INDUSTRY :{WHITE}Opf<70>r ny industri
STR_0315 :{STRING}
STR_JUST_STRING :{STRING}
STR_0316_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}...kan kun bygges i byer
STR_0317_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}...kan kun bygges i regnskovsomr<6D>der
STR_0318_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}...kan kun bygges i <20>rkenomr<6D>der

View File

@@ -826,7 +826,7 @@ STR_0313_FUND_NEW_INDUSTRY :Subsidieer nieuwe industrie
############ range ends here
STR_0314_FUND_NEW_INDUSTRY :{WHITE}Betaal nieuwe industrie
STR_0315 :{STRING}
STR_JUST_STRING :{STRING}
STR_0316_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}...kan alleen in steden gebouwd worden
STR_0317_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}...kan alleen in het regenwoud gebouwd worden
STR_0318_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}...kan alleen in woestijngebieden gebouwd worden

View File

@@ -826,7 +826,7 @@ STR_0313_FUND_NEW_INDUSTRY :Fund new industry
############ range ends here
STR_0314_FUND_NEW_INDUSTRY :{WHITE}Fund new industry
STR_0315 :{STRING}
STR_JUST_STRING :{STRING}
STR_0316_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}...can only be built in towns
STR_0317_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}...can only be built in rainforest areas
STR_0318_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}...can only be built in desert areas

View File

@@ -826,7 +826,7 @@ STR_0313_FUND_NEW_INDUSTRY :Rahoita uutta teollisuutta
############ range ends here
STR_0314_FUND_NEW_INDUSTRY :{WHITE}Rahoita uutta teollisuutta
STR_0315 :{STRING}
STR_JUST_STRING :{STRING}
STR_0316_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}...voidaan rakentaa vian kaupunkeihin
STR_0317_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}...voidaan rakentaa vain sademets<74>alueisiin
STR_0318_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}...voidaan rakentaa vain aavikkoalueisiin

View File

@@ -826,7 +826,7 @@ STR_0313_FUND_NEW_INDUSTRY :Financer une nouvelle industrie
############ range ends here
STR_0314_FUND_NEW_INDUSTRY :{WHITE}Financer une nouvelle industrie
STR_0315 :{STRING}
STR_JUST_STRING :{STRING}
STR_0316_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}...peut seulement <20>tre construit en ville
STR_0317_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}...peut seulement <20>tre construit en for<6F>t tropicale
STR_0318_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}...peut seulement <20>tre construit dans les endroits d<>sertiques

View File

@@ -823,7 +823,7 @@ STR_0313_FUND_NEW_INDUSTRY :Fundar unha nova industria
############ range ends here
STR_0314_FUND_NEW_INDUSTRY :{WHITE}Fundar unha nova industria
STR_0315 :{STRING}
STR_JUST_STRING :{STRING}
STR_0316_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}...s<> se pode constru<72>r en cidades
STR_0317_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}...s<> se pode constru<72>r en zonas de selva tropical
STR_0318_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}...s<> se pode constru<72>r en zonas des<65>rticas

View File

@@ -826,7 +826,7 @@ STR_0313_FUND_NEW_INDUSTRY :Neue Industrie finanzieren
############ range ends here
STR_0314_FUND_NEW_INDUSTRY :{WHITE}Neue Industrie finanzieren
STR_0315 :{STRING}
STR_JUST_STRING :{STRING}
STR_0316_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}...kann nur in St<53>dten errichtet werden
STR_0317_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}...kann nur im Regenwaldgebiet errichtet werden
STR_0318_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}...kann nur im W<>stengebiet errichtet werden

View File

@@ -826,7 +826,7 @@ STR_0313_FUND_NEW_INDUSTRY :
############ range ends here
STR_0314_FUND_NEW_INDUSTRY :{WHITE}<7D>j gazdas<61>gi <20>p<EFBFBD>let
STR_0315 :{STRING}
STR_JUST_STRING :{STRING}
STR_0316_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}...csak v<>rosban <20>p<EFBFBD>thet<65>
STR_0317_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}...csak es<65>erd<72>ben <20>p<EFBFBD>thet<65>
STR_0318_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}...csak sivatagban <20>p<EFBFBD>thet<65>

View File

@@ -823,7 +823,7 @@ STR_0313_FUND_NEW_INDUSTRY :Fj
############ range ends here
STR_0314_FUND_NEW_INDUSTRY :{WHITE}Fj<46>rmagna n<>jan i<>na<6E>
STR_0315 :{STRING}
STR_JUST_STRING :{STRING}
STR_0316_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}...a<>eins h<>gt a<> byggja <20> b<>jum
STR_0317_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}...a<>eins h<>gt a<> byggja <20> regnsk<73>gasv<73><76>um
STR_0318_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}...a<>eins h<>gt a<> byggja <20> ey<65>im<69>rk

View File

@@ -823,7 +823,7 @@ STR_0313_FUND_NEW_INDUSTRY :Finanzia nuove industrie
############ range ends here
STR_0314_FUND_NEW_INDUSTRY :{WHITE}Finanzia nuove industrie
STR_0315 :{STRING}
STR_JUST_STRING :{STRING}
STR_0316_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}...pu<70> essere costruito solo in citt<74>
STR_0317_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}...pu<70> essere costruito solo nella foresta pluviale
STR_0318_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}...pu<70> essere costruito solo in aree desertiche

View File

@@ -826,7 +826,7 @@ STR_0313_FUND_NEW_INDUSTRY :Finansier ny industri
############ range ends here
STR_0314_FUND_NEW_INDUSTRY :{WHITE}Finansier ny industri
STR_0315 :{STRING}
STR_JUST_STRING :{STRING}
STR_0316_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}...kan bare bygges i byer
STR_0317_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}...kan bare bygges i regnskogomr<6D>der
STR_0318_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}...kan bare bygges i <20>rkenomr<6D>der

View File

@@ -826,7 +826,7 @@ STR_0313_FUND_NEW_INDUSTRY :Ufunduj nowe przedsieb.
############ range ends here
STR_0314_FUND_NEW_INDUSTRY :{WHITE}Ufundowanie nowego przedsieb.
STR_0315 :{STRING}
STR_JUST_STRING :{STRING}
STR_0316_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}...moze byc wybudowane tylko w miescie
STR_0317_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}...moze byc wybudowane tylko w lasach deszczowych
STR_0318_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}...moze byc wybudowane tylko na pustyni

View File

@@ -823,7 +823,7 @@ STR_0313_FUND_NEW_INDUSTRY :Financiar nova ind
############ range ends here
STR_0314_FUND_NEW_INDUSTRY :{WHITE}Financiar nova ind<6E>stria
STR_0315 :{STRING}
STR_JUST_STRING :{STRING}
STR_0316_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}...s<> se pode construir em cidades
STR_0317_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}...s<> se pode construir em zonas de floresta
STR_0318_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}...s<> se pode construir em zonas de deserto

View File

@@ -826,7 +826,7 @@ STR_0313_FUND_NEW_INDUSTRY :Obiectiv industrial nou
############ range ends here
STR_0314_FUND_NEW_INDUSTRY :{WHITE}Construieste un nou obiectiv ind.
STR_0315 :{STRING}
STR_JUST_STRING :{STRING}
STR_0316_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}...se poate construi doar in orase
STR_0317_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}...se poate construi doar in padurile ecuatoriale
STR_0318_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}...se poate construi doar in zonele de desert

View File

@@ -824,7 +824,7 @@ STR_0313_FUND_NEW_INDUSTRY :Financovat novy priemysel
############ range ends here
STR_0314_FUND_NEW_INDUSTRY :{WHITE}Financovat novy priemysel
STR_0315 :{STRING}
STR_JUST_STRING :{STRING}
STR_0316_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}...moze byt postavene len v meste
STR_0317_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}...moze byt postavene len v dazdovom pralese
STR_0318_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}...moze byt postavene len v pusti

View File

@@ -826,7 +826,7 @@ STR_0313_FUND_NEW_INDUSTRY :Fundar nueva industria
############ range ends here
STR_0314_FUND_NEW_INDUSTRY :{WHITE}Fundar nueva industria
STR_0315 :{STRING}
STR_JUST_STRING :{STRING}
STR_0316_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}...s<>lo se puede construir en poblaciones
STR_0317_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}...s<>lo se puede construir en <20>reas de selva
STR_0318_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}...s<>lo se puede construir en <20>reas des<65>rticas

View File

@@ -826,7 +826,7 @@ STR_0313_FUND_NEW_INDUSTRY :Bekosta ny industri
############ range ends here
STR_0314_FUND_NEW_INDUSTRY :{WHITE}Bekosta ny industri
STR_0315 :{STRING}
STR_JUST_STRING :{STRING}
STR_0316_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}...kan bara byggas i st<73>der
STR_0317_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}...kan bara byggas i regnskog
STR_0318_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}...kan bara byggas p<> <20>ken

View File

@@ -1189,7 +1189,9 @@ void NetworkPopulateCompanyInfo(void)
ttd_strlcpy(_network_player_info[p->index].password, password, sizeof(_network_player_info[p->index].password));
// Grap the company name
GetString(_network_player_info[p->index].company_name, p->name_1);
SetDParam(0, p->name_1);
SetDParam(1, p->name_2);
GetString(_network_player_info[p->index].company_name, STR_JUST_STRING);
// Check the income
if (_cur_year - 1 == p->inaugurated_year)

View File

@@ -793,11 +793,15 @@ static void EndGameWndProc(Window *w, WindowEvent *e)
SetDParam(2, EndGameGetPerformanceTitleFromValue(p->old_economy[0].performance_history));
DrawStringMultiCenter(x + (640 / 2), y + 157, STR_021B_ACHIEVES_STATUS, 640);
}
} break;
case WE_CLICK: /* OnClick show the highscore chart */
} break;
case WE_CLICK: { /* OnClick show the highscore chart */
int diff = w->window_number; // save values because deletewindow is called
int8 rank = WP(w, highscore_d).rank;
DoCommandP(0, 0, 0, NULL, CMD_PAUSE);
DeleteWindow(w);
ShowHighscoreTable(w->window_number, WP(w, highscore_d).rank);
ShowHighscoreTable(diff, rank);
} break;
}
}

View File

@@ -780,7 +780,7 @@ int8 SaveHighScoreValue(const Player *p)
SetDParam(0, p->president_name_1);
SetDParam(1, p->president_name_2);
SetDParam(2, p->name_1);
SetDParam(3, p->name_1);
SetDParam(3, p->name_2);
GetString(buf, STR_HIGHSCORE_NAME); // get manager/company name string
ttd_strlcpy(hs[i].company, buf, sizeof(buf));
hs[i].score = score;
@@ -830,8 +830,9 @@ int8 SaveHighScoreValueNetwork(void)
SetDParam(0, (*p_cur)->president_name_1);
SetDParam(1, (*p_cur)->president_name_2);
SetDParam(2, (*p_cur)->name_1);
SetDParam(3, (*p_cur)->name_1);
SetDParam(3, (*p_cur)->name_2);
GetString(buf, STR_HIGHSCORE_NAME); // get manager/company name string
ttd_strlcpy(hs->company, buf, sizeof(buf));
hs->score = (*p_cur)->old_economy[0].performance_history;
hs->title = EndGameGetPerformanceTitleFromValue(hs->score);

View File

@@ -238,7 +238,7 @@ static void NewRailVehicleWndProc(Window *w, WindowEvent *e)
static const Widget _new_rail_vehicle_widgets[] = {
{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW},
{ WWT_CAPTION, RESIZE_NONE, 14, 11, 227, 0, 13, STR_0315, STR_018C_WINDOW_TITLE_DRAG_THIS},
{ WWT_CAPTION, RESIZE_NONE, 14, 11, 227, 0, 13, STR_JUST_STRING, STR_018C_WINDOW_TITLE_DRAG_THIS},
{ WWT_MATRIX, RESIZE_BOTTOM, 14, 0, 215, 14, 125, 0x801, STR_8843_TRAIN_VEHICLE_SELECTION},
{ WWT_SCROLLBAR, RESIZE_BOTTOM, 14, 216, 227, 14, 125, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST},
{ WWT_PANEL, RESIZE_TB, 14, 0, 227, 126, 187, 0x0, STR_NULL},

View File

@@ -201,7 +201,7 @@ int CDECL VehicleNameSorter(const void *a, const void *b)
if (va->string_id != _internal_name_sorter_id) {
SetDParam(0, va->string_id);
GetString(buf1, STR_0315);
GetString(buf1, STR_JUST_STRING);
}
if ( cmp2->index != _last_vehicle_idx) {
@@ -209,7 +209,7 @@ int CDECL VehicleNameSorter(const void *a, const void *b)
_bufcache[0] = '\0';
if (vb->string_id != _internal_name_sorter_id) {
SetDParam(0, vb->string_id);
GetString(_bufcache, STR_0315);
GetString(_bufcache, STR_JUST_STRING);
}
}