Skip to content

Commit 4c7e4fe

Browse files
fix double dumbfire missiles for multi clients (#6888)
Dumbfire missiles are client fired for rollback purposes. However players would see their missiles fire twice due to the server also sending a fire packet back to the player. So we need to prevent the player that fired the missile in question from getting that extra packet.
1 parent bf84dbf commit 4c7e4fe

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

code/network/multimsgs.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3140,6 +3140,11 @@ void send_secondary_fired_packet( ship *shipp, ushort starting_sig, int /*start
31403140
return;
31413141
}
31423142

3143+
// if this is a dumbfire weapon then skip it since it's client fired
3144+
if ( !Weapon_info[shipp->weapons.secondary_bank_weapons[current_bank]].is_homing() ) {
3145+
return;
3146+
}
3147+
31433148
// now build up the packet to send to the player who actually fired.
31443149
BUILD_HEADER( SECONDARY_FIRED_PLR );
31453150
ADD_USHORT(starting_sig);

0 commit comments

Comments
 (0)