diff --git a/lib/netplay/nettypes.h b/lib/netplay/nettypes.h index b3d0745bd..59c8ca392 100644 --- a/lib/netplay/nettypes.h +++ b/lib/netplay/nettypes.h @@ -54,13 +54,14 @@ PACKETDIR NETgetPacketDir(); // FIXME: Causes tons of warnings: is used unitialised in this function #define NETenum(enumPtr) \ +do \ { \ int32_t _val = (NETgetPacketDir() == PACKET_ENCODE) ? *(enumPtr) : 0; \ \ NETint32_t(&_val); \ \ *(enumPtr) = _val; \ -} +} while(0) BOOL NETVector3uw(Vector3uw* vp);