There's no need to reverse engineer anything. To get the offsets, you need to set object A's position and rotation to 0, and then place object B whereever you want it to be in relation to object A. Object B's position and rotation are the offsets (if that makes any sense).
Anyways, I managed to get some offsets correct, but I didn't calculate all of them.
pawn Код:
static const
Float:offset[][][] =
{
{
// 18788
{ 39.994998, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000},
{ 94.995002, 0.000000, 0.561200, 0.000000, 0.000000, 0.000000},
{ 58.970001, -7.752999, 0.561200, 0.000000, 0.000000, 157.500000}, // 18791
{ 59.994998, 0.000000, 0.561200, -15.000000, 0.000000, 0.000000},
{ 59.994998, 0.000000, 0.561200, 15.000000, 0.000000, 0.000000},
{ 39.994998, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000},
{ 39.994998, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000},
{ 39.930000, 0.000000, -1.307000, 0.000000, 7.500000, 0.000000},
{ 22.320999, -9.671600, 23.679500, 0.000000, 0.000000, 7.500000},
{ 94.995002, 0.000000, 0.561200, 0.000000, 0.000000, 0.000000}
},
{
// 18789
{ 94.995002, 0.000000, -0.561200, 0.000000, 0.000000, 0.000000},
{ 149.994995, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000},
{ 113.970001, -7.752999, 0.000000, 0.000000, 0.000000, 157.500000}, // 18791
{ 114.995002, 0.000000, 0.000000, -15.000000, 0.000000, 0.000000},
{ 114.995002, 0.000000, 0.000000, 15.000000, 0.000000, 0.000000},
{ 94.995002, 0.000000, -0.561200, 0.000000, 0.000000, 0.000000},
{ 94.995002, 0.000000, -0.561200, 0.000000, 0.000000, 0.000000},
{ 94.934997, 0.000000, -1.868399, 0.000000, 7.500000, 0.000000},
{ 77.400001, -9.689000, 23.118999, 0.000000, 0.000000, 7.099999},
{ 149.994995, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000}
},
{
// 18791
{ -57.444999, 15.402000, -0.561200, 0.000000, 0.000000, 157.500000},
{ -108.262001, 36.451000, 0.000000, 0.000000, 0.000000, 157.500000},
// 18791 right from itself (-72.019996, 29.830999, 0.000000, 0.000000, 0.000000, 315.000000)
// 18791 left from itself (-77.953445, 15.504273, 0.000000, 0.000000, 0.000000, 180.000000)
{ -72.019996, 29.830999, 0.000000, 0.000000, 0.000000, 315.000000}, // right from itself
{ -75.930000, 23.059000, 0.000000, -15.000000, 0.000000, 157.500000},
{ -75.930000, 23.059000, 0.000000, 15.000000, 0.000000, 157.500000},
{ -57.444999, 15.402000, -0.561200, 0.000000, 0.000000, 157.500000},
{ -57.439998, 15.399999, -0.561200, 0.000000, 0.000000, 157.500000},
{ -57.400001, 15.383000, -1.868399, 0.000000, 7.500000, 157.500000},
{ -44.919998, -0.254999, 23.118000, 0.000000, 0.000000, 165.000000},
{ -108.262001, 36.451000, 0.000000, 0.000000, 0.000000, 157.500000}
},
{
// 18792
{ 59.994998, 0.000000, -0.561200, 0.000000, 0.000000, 0.000000},
{ 114.995002, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000},
{ 78.970001, -7.752999, 0.000000, 0.000000, 0.000000, 157.500000}, // 18791
{ 79.995002, 0.000000, 0.000000, -15.000000, 0.000000, 0.000000},
{ 79.995002, 0.000000, 0.000000, 15.000000, 0.000000, 0.000000},
{ 59.994998, 0.000000, -0.561200, 0.000000, 0.000000, 0.000000},
{ 59.994998, 0.000000, -0.561200, 0.000000, 0.000000, 0.000000},
{ 59.935001, 0.000000, -1.868399, 0.000000, 7.500000, 0.000000},
{ 42.439998, -9.671999, 23.118999, 0.000000, 0.000000, 7.500000},
{ 114.995002, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000}
},
{
// 18793
{ 59.994998, 0.000000, -0.561200, 0.000000, 0.000000, 0.000000},
{ 114.995002, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000},
{ 78.970001, -7.752999, 0.000000, 0.000000, 0.000000, 157.500000}, // 18791
{ 79.995002, 0.000000, 0.000000, -15.000000, 0.000000, 0.000000},
{ 79.995002, 0.000000, 0.000000, 15.000000, 0.000000, 0.000000},
{ 59.994998, 0.000000, -0.561200, 0.000000, 0.000000, 0.000000},
{ 59.994998, 0.000000, -0.561200, 0.000000, 0.000000, 0.000000},
{ 59.935001, 0.000000, -1.868399, 0.000000, 7.500000, 0.000000},
{ 42.439998, -9.671999, 23.118999, 0.000000, 0.000000, 7.500000},
{ 114.995002, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000}
},
{
// 18794 (18791 right turn not supported)
{ 39.194999, 0.000000, 10.411000, 0.000000, -15.000000, 0.000000},
{ 92.180000, 0.000000, 25.188999, 0.000000, -15.000000, 0.000000},
{ 57.388000, 7.739999, 15.862000, -5.677000, -13.899999, 21.785999},
{ 58.387001, -0.029999, 16.050500, -14.477000, -15.383999, -3.979000},
{ 58.387001, 0.029999, 16.051000, 14.477000, -15.383999, 3.979000},
{ 39.194999, 0.000000, 10.411000, 0.000000, -15.000000, 0.000000},
{ 39.194999, 0.000000, 10.411000, 0.000000, -15.000000, 0.000000},
{ 39.479999, 0.000000, 9.133999, 0.000000, -7.500000, 0.000000},
{ 16.059999, -9.673000, 28.732999, -1.924999, -15.000000, 7.099999},
{ 92.180000, 0.000000, 25.188999, 0.000000, -15.000000, 0.000000}
},
{
// 18795 (18791 right turn not supported)
{ 38.861999, -10.366499, 0.000000, 0.000000, 0.000000, -15.000000},
{ 91.992599, -24.603000, 0.561200, 0.000000, 0.000000, -15.000000},
{ 59.204601, -7.790400, 0.561200, 0.000000, 0.000000, 7.500000},
{ 58.181999, -15.543499, 0.561200, -15.000000, 0.000000, -15.000000},
{ 58.181999, -15.543499, 0.561200, 15.000000, 0.000000, -15.000000},
{ 38.861999, -10.366499, 0.000000, 0.000000, 0.000000, -15.000000},
{ 38.865398, -10.367500, 0.000000, 0.000000, 0.000000, -15.000000},
{ 38.807998, -10.352199, -1.307000, 0.000000, 7.500000, -15.000000},
{ 19.407199, -15.166999, 23.680000, 0.000000, 0.000000, -7.400000},
{ 91.992599, -24.603000, 0.561200, 0.000000, 0.000000, -15.000000}
},
{
// 18796 (18791 right turn not supported)
{ 39.759998, 0.000000, -3.915999, 0.000000, 7.500000, 0.000000},
{ 94.370002, 0.000000, -10.539999, 0.000000, 7.500000, 0.000000},
{ 58.590999, 7.751999, -6.248000, 3.098999, 7.500000, 22.291999},
{ 59.646999, 0.017000, -5.966000, -14.862999, 7.760000, 2.026999},
{ 59.646999, -0.017000, -5.967000, 14.862999, 7.760000, -2.026999},
{ 39.759998, 0.000000, -3.915999, 0.000000, 7.500000, 0.000000},
{ 39.759998, 0.000000, -3.915999, 0.000000, 7.500000, 0.000000},
{ 39.540000, 0.000000, -5.205500, 0.000000, 15.000000, 0.000000},
{ 25.450000, -9.684000, 21.850000, 0.934000, 7.500000, 7.099999},
{ 94.370002, 0.000000, -10.539999, 0.000000, 7.500000, 0.000000}
},
{
// 18801 (18791 right turn not supported)
{ 21.000000, -12.380000, -23.680000, 0.000000, 0.000000, -7.099999},
{ 75.500000, -19.167999, -23.118000, 0.000000, 0.000000, -7.099999},
{ 40.813999, -7.308000, -23.118000, 0.000000, 0.000000, 15.000000},
{ 40.813999, -15.128000, -23.118000, -15.010000, 0.000000, -7.500000},
{ 40.813999, -15.128999, -23.117000, 14.989999, 0.000000, -7.500000},
{ 20.979999, -12.517999, -23.680000, 0.000000, 0.000000, -7.500000},
{ 21.000000, -12.380000, -23.680000, 0.000000, 0.000000, -7.099999},
{ 20.920000, -12.510000, -24.985000, -0.009999, 7.500000, -7.500000},
{ 2.390000, -19.812000, 0.000000, 0.000000, 0.000000, 0.000000},
{ 75.500000, -19.167999, -23.118000, 0.000000, 0.000000, -7.099999}
},
{
// 18803 (18791 right turn not supported)
{ 94.995002, 0.000000, -0.561200, 0.000000, 0.000000, 0.000000},
{ 149.994995, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000},
{ 113.970001, 7.752999, 0.000000, 0.000000, 0.000000, 22.500000},
{ 114.995002, 0.000000, 0.000000, -15.000000, 0.000000, 0.000000},
{ 114.995002, 0.000000, 0.000000, 15.000000, 0.000000, 0.000000},
{ 94.995002, 0.000000, -0.561200, 0.000000, 0.000000, 0.000000},
{ 94.995002, 0.000000, -0.561200, 0.000000, 0.000000, 0.000000},
{ 94.934997, 0.000000, -1.868399, 0.000000, 7.500000, 0.000000},
{ 77.400001, -9.689000, 23.118999, 0.000000, 0.000000, 7.099999},
{ 149.994995, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000}
}
};
With those offsets road 18791 turns to the right. Though only roads 18788, 18789 18791, 18792 and 18793 are supported.