diff --git a/extensions/common/p3d/animation.cpp b/extensions/common/p3d/animation.cpp index 9d135053e1..1c97399a1e 100644 --- a/extensions/common/p3d/animation.cpp +++ b/extensions/common/p3d/animation.cpp @@ -20,17 +20,11 @@ namespace ace { stream_.read((char *)&min_phase, sizeof(float)); stream_.read((char *)&max_phase, sizeof(float)); - //stream_.read((char *)&junk, sizeof(uint32_t)); - //stream_.read((char *)&junk2, sizeof(uint32_t)); + stream_.read((char *)&junk, sizeof(uint32_t)); + stream_.read((char *)&junk2, sizeof(uint32_t)); stream_.read((char *)&source_address, sizeof(uint32_t)); - float buffer[4]; - stream_.read((char *)buffer, sizeof(float) * 4); - return; - - // THIS IS ALL WRONG - // ARMA3 HAS FIXED 4-FLOAT TRANSFORMS - + // This always adds up to 2*4 more bytes unless its direct apparently switch (type) { // rotations case 0: @@ -61,9 +55,11 @@ namespace ace { case 9: // fucking hides... stream_.read((char *)&hide_value, sizeof(float)); stream_.read((char *)&offset1, sizeof(float)); // this is junk throw it in offset1 for hides + break; default: stream_.read((char *)&offset0, sizeof(float)); stream_.read((char *)&offset1, sizeof(float)); + break; } diff --git a/extensions/tests/longrod_dxtk_test.txt b/extensions/tests/longrod_dxtk_test.txt index 92f95a7d4a..19a38f5b65 100644 --- a/extensions/tests/longrod_dxtk_test.txt +++ b/extensions/tests/longrod_dxtk_test.txt @@ -1,5 +1,6 @@ init: debug_render: +#register_vehicle:\A3\soft_f\MRAP_01\MRAP_01_gmg_F.p3d,2,4050.18;3802.55;5.075 register_vehicle:\A3\Armor_F_EPB\MBT_03\MBT_03_cannon_F.p3d,2,4050.18;3802.55;5.075 #hit:2,\A3\Armor_F_EPB\MBT_03\MBT_03_cannon_F.p3d,[],2,Sh_120mm_APFSDS,650,27,19100,50,10,708.602;235.609;-85.6468,-2.1748;0.139648;-1.35955,0.942743;0.31346;-0.113925,-1;6.1914e-007;0.000794772,-2.17383;0.139404;-1.32366,708.602;235.609;-85.6468 #register_vehicle:\a3\structures_f\mil\BagFence\BagFence_Long_F.p3d,0,4050.18;3802.55;5.075 diff --git a/extensions/tests/p3d_parser.cpp b/extensions/tests/p3d_parser.cpp index d0da6acfa0..4b761e61c6 100644 --- a/extensions/tests/p3d_parser.cpp +++ b/extensions/tests/p3d_parser.cpp @@ -21,6 +21,7 @@ int main(int argc, char **argv) { printf("Usage: %s [file.p3d]", argv[0]); return -1; } + ace::p3d::model_p _model = _parser.load(argv[1]); ace::simulation::object _object(_model); diff --git a/extensions/tests/test.p3d b/extensions/tests/test.p3d new file mode 100644 index 0000000000..c0dea83658 Binary files /dev/null and b/extensions/tests/test.p3d differ