Changeset 398 for trunk/Units.pas
- Timestamp:
- Jan 6, 2025, 10:27:05 AM (3 days ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Units.pas
r376 r398 188 188 procedure TUnit.FixRefId; 189 189 begin 190 Player := TGame(Game).Players.FindById(PlayerId); 191 Kind := TGame(Game).GameSystem.UnitKinds.FindById(KindId); 190 if PlayerId <> 0 then begin 191 Player := TGame(Game).Players.FindById(PlayerId); 192 if not Assigned(Player) then 193 raise Exception.Create('Referenced player id ' + IntToStr(PlayerId) + ' not found.'); 194 end else Player := nil; 195 196 if KindId <> 0 then begin 197 Kind := TGame(Game).GameSystem.UnitKinds.FindById(KindId); 198 if not Assigned(Kind) then 199 raise Exception.Create('Referenced unit kind id ' + IntToStr(KindId) + ' not found.'); 200 end else Kind := nil; 192 201 end; 193 202
Note:
See TracChangeset
for help on using the changeset viewer.