From dc059aa8f7675c139b721afafb5d09e931a7aeb7 Mon Sep 17 00:00:00 2001 From: Benau Date: Mon, 17 Sep 2018 16:15:15 +0800 Subject: [PATCH] Fix attachment with swatter removing bomb animation rewind --- src/items/attachment.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/items/attachment.cpp b/src/items/attachment.cpp index e7567c08f..f6919d166 100644 --- a/src/items/attachment.cpp +++ b/src/items/attachment.cpp @@ -285,7 +285,9 @@ void Attachment::rewindTo(BareNetworkString *buffer) return; } - int16_t ticks_left = buffer->getUInt16(); + int16_t ticks_left = 0; + if (new_type != ATTACH_NOTHING) + ticks_left = buffer->getUInt16(); // Now it is a new attachment: if (type == (ATTACH_BOMB | 64)) // we have previous owner information