- Timestamp:
- Nov 4, 2018, 7:25:44 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GameServer.pas
r145 r149 1111 1111 MovieMode: boolean): boolean; 1112 1112 var 1113 j: TBrain;1113 J: TBrain; 1114 1114 i, ix, d, p1, Command, Subject: integer; 1115 K: Integer; 1115 1116 {$IFDEF TEXTLOG}LoadPos0: integer; {$ENDIF} 1116 1117 Data: pointer; … … 1119 1120 s: string[255]; 1120 1121 SaveMap: array [0 .. lxmax * lymax - 1] of Byte; 1121 started, StatRequest: boolean;1122 Started, StatRequest: boolean; 1122 1123 begin 1123 1124 SavePath := Path; … … 1127 1128 fmShareExclusive); 1128 1129 LogFile.Position := 0; 1129 LogFile. read(s[1], 8); { file id }1130 LogFile. read(i, 4); { c-evo version }1131 LogFile. read(j, 4); { exe time }1130 LogFile.Read(s[1], 8); { file id } 1131 LogFile.Read(i, 4); { c-evo version } 1132 LogFile.Read(J, 4); { exe time } 1132 1133 1133 1134 if (i >= FirstBookCompatibleVersion) and (i <= Version) then 1134 1135 begin 1135 1136 result := true; 1136 LogFile. read(lx, 4);1137 LogFile. read(ly, 4);1137 LogFile.Read(lx, 4); 1138 LogFile.Read(ly, 4); 1138 1139 MapSize := lx * ly; 1139 LogFile. read(LandMass, 4);1140 LogFile.Read(LandMass, 4); 1140 1141 if LandMass = 0 then 1141 LogFile. read(RealMap, MapSize * 4); // use predefined map1142 LogFile. read(MaxTurn, 4);1143 LogFile. read(RND, 4);1144 LogFile. read(GTurn, 4);1145 LogFile. read(SaveMap, 4);1142 LogFile.Read(RealMap, MapSize * 4); // use predefined map 1143 LogFile.Read(MaxTurn, 4); 1144 LogFile.Read(RND, 4); 1145 LogFile.Read(GTurn, 4); 1146 LogFile.Read(SaveMap, 4); 1146 1147 if SaveMap[0] <> $80 then 1147 1148 LogFile.read(SaveMap[4], ((MapSize - 1) div 4 + 1) * 4 - 4); 1148 1149 for p1 := 0 to nPl - 1 do 1149 1150 begin 1150 LogFile. read(s[0], 4);1151 LogFile.Read(s[0], 4); 1151 1152 if s[0] = #0 then 1152 1153 PlayersBrain[p1] := nil 1153 1154 else 1154 1155 begin 1155 LogFile.read(s[4], Byte(s[0]) div 4 * 4); 1156 LogFile.read(OriginalDataVersion[p1], 4); 1157 LogFile.read(d, 4); { behavior } 1158 LogFile.read(Difficulty[p1], 4); 1159 j := Brains.Last; 1160 while Assigned(J) and (AnsiCompareFileName(j.FileName, s) <> 0) do 1161 J := PlayersBrain[PlayersBrain.IndexOf(J) - 1]; 1162 if not Assigned(j) then 1156 LogFile.Read(s[4], Byte(s[0]) div 4 * 4); 1157 LogFile.Read(OriginalDataVersion[p1], 4); 1158 LogFile.Read(d, 4); { behavior } 1159 LogFile.Read(Difficulty[p1], 4); 1160 J := Brains.Last; 1161 while Assigned(J) and (AnsiCompareFileName(J.FileName, s) <> 0) do begin 1162 K := PlayersBrain.IndexOf(J) - 1; 1163 if K >= 0 then J := PlayersBrain[K] 1164 else J := nil; 1165 end; 1166 if not Assigned(J) then 1163 1167 begin // ai not found -- replace by local player 1164 1168 ProcessClientData[p1] := false; 1165 1169 NotifyMessage := s; 1166 1170 Notify(ntAIError); 1167 j:= BrainTerm;1171 J := BrainTerm; 1168 1172 end 1169 1173 else … … 1177 1181 end 1178 1182 else 1179 result := false; 1180 1181 if result then 1182 begin 1183 Result := false; 1184 1185 if Result then begin 1183 1186 CL := TCmdList.Create; 1184 1187 CL.LoadFromFile(LogFile); … … 1186 1189 LogFile.Free; 1187 1190 if not result then 1188 exit;1191 Exit; 1189 1192 1190 1193 Notify(ntStartDone); -
trunk/LocalPlayer/CityScreen.pas
r136 r149 756 756 else 757 757 begin 758 MakeRed(xProd + dxBar - 6, yProd + dyBar , wBar + 10, 38);758 MakeRed(xProd + dxBar - 6, yProd + dyBar + 17, wBar + 10, 38); 759 759 CountBar(offscreen, xProd + dxBar, yProd + dyBar + 16, wBar, 3, 760 760 Phrases.Lookup('LACK'), -Report.Production, RedTex);
Note:
See TracChangeset
for help on using the changeset viewer.