12.02.2013, 11:32
Hi, those are just offset values converted to hex.
If you want more readable values, run the "offset" array through the following code and see server_log.
Anyways, for exmaple, to make 18791 turn right when attached to 18788 (straight road), you would need to manipulate 18788's 18791 offset values a bit. Right now I can't tell how exactly they need to be manipulated. Basically, in most cases, changing certain position offsets to the opposite sign (positive to negative and vice versa) will do the trick, but it might not always work. I'm not sure about the Z rotation. You either need to change its sign or add 180 degrees to its current rotation. Example:
That's just a random guess. You may need to change other offsets aswell.
Make sense?
pawn Код:
//18791
//offset_x offset_y offset_z rot_x rot_y rot_z
{0x4265C7AE, 0x41766E98,-0x40F05532, 0x00000000, 0x00000000, 0x41B40000}, //offsets for 18788
{0x42D88625, 0x4211CDD3, 0x00000000, 0x00000000, 0x00000000, 0x41B40000}, //offsets for 18789
{0x42900A3D, 0x41EEA5E3, 0x00000000, 0x00000000, 0x00000000, 0x42340000}, //offsets for 18791
{0x4297DC29, 0x41B878D5, 0x00000000,-0x3E900000, 0x00000000, 0x41B40000}, //offsets for 18792
{0x4297DC29, 0x41B878D5, 0x00000000, 0x41700000, 0x00000000, 0x41B40000}, //offsets for 18793
{0x4265C7AE, 0x41766E98,-0x40F05532, 0x00000000, 0x00000000, 0x41B40000}, //offsets for 18794
{0x4265C28F, 0x41766666,-0x40F05532, 0x00000000, 0x00000000, 0x41B40000}, //offsets for 18795
{0x4265999A, 0x417620C5,-0x4010D845, 0x00000000, 0x40F00000, 0x41B40000}, //offsets for 18796
{0x4233AE14,-0x417D70A4, 0x41B8F1AA, 0x00000000, 0x00000000, 0x41F00000}, //offsets for 18801
{0x42D88625, 0x4211CDD3, 0x00000000, 0x00000000, 0x00000000, 0x41B40000} //offsets for 18803
pawn Код:
// convert to float
printf("static const");
printf("\toffset[][][] =");
printf("{");
for (new i = 0; i < sizeof(offset); ++i)
{
printf("\t{");
for (new x = 0; x < sizeof(offset[]); +x)
{
printf("\t\t{%5.06f, %5.06f, %5.06f, %5.06f, %5.06f, %5.06f},", offset[i][x][0], offset[i][x][1], offset[i][x][2], offset[i][x][3], offset[i][x][4], offset[i][x][5]);
}
printf("\t},");
}
printf("}");
Код:
//18788 (ROAD TO LEFT)
{offset_x, offset_y, offset_z, rot_x, rot_y, rot_z}, //offsets for 18788
{offset_x, offset_y, offset_z, rot_x, rot_y, rot_z}, //offsets for 18789
{offset_x, offset_y, offset_z, rot_x, rot_y, rot_z}, //offsets for 18791
Код:
//18788 (ROAD TO RIGHT)
{offset_x, offset_y, offset_z, rot_x, rot_y, rot_z}, //offsets for 18788
{offset_x, offset_y, offset_z, rot_x, rot_y, rot_z}, //offsets for 18789
{offset_x,-offset_y, offset_z, rot_x, rot_y, rot_z + 180.0}, //offsets for 18791
Make sense?

