-#define U_MOREBITS (1<<0)
-#define U_ORIGIN1 (1<<1)
-#define U_ORIGIN2 (1<<2)
-#define U_ORIGIN3 (1<<3)
-#define U_ANGLE2 (1<<4)
-// LordHavoc: U_NOLERP was only ever used for monsters, so I renamed it U_STEP
-#define U_STEP (1<<5)
-#define U_FRAME (1<<6)
-// just differentiates from other updates
-#define U_SIGNAL (1<<7)
-
-#define U_ANGLE1 (1<<8)
-#define U_ANGLE3 (1<<9)
-#define U_MODEL (1<<10)
-#define U_COLORMAP (1<<11)
-#define U_SKIN (1<<12)
-#define U_EFFECTS (1<<13)
-#define U_LONGENTITY (1<<14)
-
-// LordHavoc: protocol extension
-#define U_EXTEND1 (1<<15)
-// LordHavoc: first extend byte
-#define U_DELTA (1<<16) // no data, while this is set the entity is delta compressed (uses previous frame as a baseline, meaning only things that have changed from the previous frame are sent, except for the forced full update every half second)
-#define U_ALPHA (1<<17) // 1 byte, 0.0-1.0 maps to 0-255, not sent if exactly 1, and the entity is not sent if <=0 unless it has effects (model effects are checked as well)
-#define U_SCALE (1<<18) // 1 byte, scale / 16 positive, not sent if 1.0
-#define U_EFFECTS2 (1<<19) // 1 byte, this is .effects & 0xFF00 (second byte)
-#define U_GLOWSIZE (1<<20) // 1 byte, encoding is float/4.0, unsigned, not sent if 0
-#define U_GLOWCOLOR (1<<21) // 1 byte, palette index, default is 254 (white), this IS used for darklight (allowing colored darklight), however the particles from a darklight are always black, not sent if default value (even if glowsize or glowtrail is set)
-#define U_COLORMOD (1<<22) // 1 byte, 3 bit red, 3 bit green, 2 bit blue, this lets you tint an object artifically, so you could make a red rocket, or a blue fiend...
-#define U_EXTEND2 (1<<23) // another byte to follow
-// LordHavoc: second extend byte
-#define U_GLOWTRAIL (1<<24) // leaves a trail of particles (of color .glowcolor, or black if it is a negative glowsize)
-#define U_VIEWMODEL (1<<25) // attachs the model to the view (origin and angles become relative to it), only shown to owner, a more powerful alternative to .weaponmodel and such
-#define U_FRAME2 (1<<26) // 1 byte, this is .frame & 0xFF00 (second byte)
-#define U_MODEL2 (1<<27) // 1 byte, this is .modelindex & 0xFF00 (second byte)
-#define U_EXTERIORMODEL (1<<28) // causes this model to not be drawn when using a first person view (third person will draw it, first person will not)
-#define U_UNUSED29 (1<<29) // future expansion
-#define U_UNUSED30 (1<<30) // future expansion
-#define U_EXTEND3 (1<<31) // another byte to follow, future expansion
-
-#define SU_VIEWHEIGHT (1<<0)
-#define SU_IDEALPITCH (1<<1)
-#define SU_PUNCH1 (1<<2)
-#define SU_PUNCH2 (1<<3)
-#define SU_PUNCH3 (1<<4)
-#define SU_VELOCITY1 (1<<5)
-#define SU_VELOCITY2 (1<<6)
-#define SU_VELOCITY3 (1<<7)
-//define SU_AIMENT (1<<8) AVAILABLE BIT
-#define SU_ITEMS (1<<9)
-#define SU_ONGROUND (1<<10) // no data follows, the bit is it
-#define SU_INWATER (1<<11) // no data follows, the bit is it
-#define SU_WEAPONFRAME (1<<12)
-#define SU_ARMOR (1<<13)
-#define SU_WEAPON (1<<14)
-#define SU_EXTEND1 (1<<15)
+#define U_MOREBITS (1u<<0)
+#define U_ORIGIN1 (1u<<1)
+#define U_ORIGIN2 (1u<<2)
+#define U_ORIGIN3 (1u<<3)
+#define U_ANGLE2 (1u<<4)
+// LadyHavoc: U_NOLERP was uonly ever used for monsters, so I renamed it U_STEP
+#define U_STEP (1u<<5)
+#define U_FRAME (1u<<6)
+// just differentiates fromu other updates
+#define U_SIGNAL (1u<<7)
+
+#define U_ANGLE1 (1u<<8)
+#define U_ANGLE3 (1u<<9)
+#define U_MODEL (1u<<10)
+#define U_COLORMAP (1u<<11)
+#define U_SKIN (1u<<12)
+#define U_EFFECTS (1u<<13)
+#define U_LONGENTITY (1u<<14)
+
+// LadyHavoc: protocol extension
+#define U_EXTEND1 (1u<<15)
+// LadyHavoc: first extend byte
+#define U_DELTA (1u<<16) ///< no data, while this is set the entity is delta compressed (uses previous frame as a baseline, meaning only things that have changed from the previous frame are sent, except for the forced full update every half second)
+#define U_ALPHA (1u<<17) ///< 1 byte, 0.0-1.0 maps to 0-255, not sent if exactly 1, and the entity is not sent if <=0 unless it has effects (model effects are checked as well)
+#define U_SCALE (1u<<18) ///< 1 byte, scale / 16 positive, not sent if 1.0
+#define U_EFFECTS2 (1u<<19) ///< 1 byte, this is .effects & 0xFF00 (second byte)
+#define U_GLOWSIZE (1u<<20) ///< 1 byte, encoding is float/4.0, unsigned, not sent if 0
+#define U_GLOWCOLOR (1u<<21) ///< 1 byte, palette index, default is 254 (white), this IS used for darklight (allowing colored darklight), however the particles from a darklight are always black, not sent if default value (even if glowsize or glowtrail is set)
+#define U_COLORMOD (1u<<22) ///< 1 byte, 3 bit red, 3 bit green, 2 bit blue, this lets you tint an object artifically, so you could make a red rocket, or a blue fiend...
+#define U_EXTEND2 (1u<<23) ///< another byte to follow
+// LadyHavoc: second extend byte
+#define U_GLOWTRAIL (1u<<24) ///< leaves a trail of particles (of color .glowcolor, or black if it is a negative glowsize)
+#define U_VIEWMODEL (1u<<25) ///< attachs the model to the view (origin and angles become relative to it), only shown to owner, a more powerful alternative to .weaponmodel and such
+#define U_FRAME2 (1u<<26) ///< 1 byte, this is .frame & 0xFF00 (second byte)
+#define U_MODEL2 (1u<<27) ///< 1 byte, this is .modelindex & 0xFF00 (second byte)
+#define U_EXTERIORMODEL (1u<<28) ///< causes this model to not be drawn when using a first person view (third person will draw it, first person will not)
+#define U_UNUSED29 (1u<<29) ///< future expansion
+#define U_UNUSED30 (1u<<30) ///< future expansion
+#define U_EXTEND3 (1u<<31) ///< another byte to follow, future expansion
+// UBSan: unsigned literals because left shifting by 31 causes signed overflow, although it works as expected on x86.
+
+#define SU_VIEWHEIGHT (1u<<0)
+#define SU_IDEALPITCH (1u<<1)
+#define SU_PUNCH1 (1u<<2)
+#define SU_PUNCH2 (1u<<3)
+#define SU_PUNCH3 (1u<<4)
+#define SU_VELOCITY1 (1u<<5)
+#define SU_VELOCITY2 (1u<<6)
+#define SU_VELOCITY3 (1u<<7)
+//#define SU_AIMENT (1u<<8) AVAILABLE BIT
+#define SU_ITEMS (1u<<9)
+#define SU_ONGROUND (1u<<10) ///< no data follows, the bit is it
+#define SU_INWATER (1u<<11) ///< no data follows, the bit is it
+#define SU_WEAPONFRAME (1u<<12)
+#define SU_ARMOR (1u<<13)
+#define SU_WEAPON (1u<<14)
+#define SU_EXTEND1 (1u<<15)