Skip to content

Commit 21e35d0

Browse files
fix issue with turret/flak multi packets (#6870)
Normalized vectors sent over multi are never guaranteed to still be normalized on the other side.
1 parent 9dc6eb7 commit 21e35d0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

code/network/multimsgs.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3433,7 +3433,8 @@ void process_turret_fired_packet( ubyte *data, header *hinfo )
34333433
}
34343434

34353435
// make an orientation matrix from the o_fvec
3436-
vm_vector_2_matrix_norm(&orient, &o_fvec, nullptr, nullptr);
3436+
// NOTE: o_fvec is NOT normalized due to pack/unpack altering values!
3437+
vm_vector_2_matrix(&orient, &o_fvec, nullptr, nullptr);
34373438

34383439
// find this turret, and set the position of the turret that just fired to be where it fired. Quite a
34393440
// hack, but should be suitable.
@@ -8740,7 +8741,8 @@ void process_flak_fired_packet(ubyte *data, header *hinfo)
87408741
}
87418742

87428743
// make an orientation matrix from the o_fvec
8743-
vm_vector_2_matrix_norm(&orient, &o_fvec, nullptr, nullptr);
8744+
// NOTE: o_fvec is NOT normalized due to pack/unpack altering values!
8745+
vm_vector_2_matrix(&orient, &o_fvec, nullptr, nullptr);
87448746

87458747
// find this turret, and set the position of the turret that just fired to be where it fired. Quite a
87468748
// hack, but should be suitable.

0 commit comments

Comments
 (0)