TDC_RCV.pas line 925 - procedure DriveTrainUpdate is strange.
in C code is :
Code:
void DriveTrainUpdate(TDriveTrain* pDTrain, float gas, int gear)
{
float fActiveRPM;
static int counter = 0;
counter += 1;
float brakeCoef;
// telemetry
RCVehicle* pv = (RCVehicle*)pDTrain->pRcv;
dFloat* ts = pv->fTimeSlice;
int ofs = 45;
PrintDebug("-DriveTrainUpdate [%d]-\n", counter);
in Pascal is :
[pascal]
procedure DriveTrainUpdate(var pDTrain: TDriveTrain; gas: single; gear: integer);
var
fActiveRPM: single;
counter: integer;
begin
counter := 0;
counter := counter + 1;
// PrintDebug("-----DriveTrainUpdate [%d] -------\n", counter);[/pascal]
I think there should be :
[pascal]procedure DriveTrainUpdate(var pDTrain: TDriveTrain; gas: single; gear: integer);
var
fActiveRPM: Single;
counter: Integer;
brakeCoef: Single;
pv: RCVehicle;
ts: TFriction;
ofs: Integer;
begin
counter := 0;
Inc(counter);
pv := pDTrain.pRcv;
ts := pv.fTimeSlice;
ofs := 45;[/pascal]
Also from line 1019 it is strange...
there should be in pascal this ( I think you forgot brakeCoef variable in there)
This is just my short look.Maybe I'm wrong.
I'll take deeper look inside...this is just first thing that I've seen...
Bookmarks