@@ -188,31 +188,31 @@ void CWeaponRPCs::TakeWeapon(CClientEntity* pSource, NetBitStreamInterface& bitS
188188
189189void CWeaponRPCs::TakeWeapons (CClientEntity* pSource, NetBitStreamInterface& bitStream)
190190{
191- unsigned char count = 0 ;
191+ std:: uint8_t count = 0 ;
192192 if (!bitStream.Read (count))
193193 return ;
194194
195195 CClientPed* pPed = m_pPedManager->Get (pSource->GetID (), true );
196196 if (!pPed)
197197 return ;
198198
199- for (int i = 0 ; i < count; i++)
199+ for (std:: uint8_t i = 0 ; i < count; i++)
200200 {
201- unsigned char ucWeaponID, ucAmmo, ucSlot ;
202- if (!bitStream.Read (ucWeaponID )) continue ;
203- if (!bitStream.Read (ucAmmo )) continue ;
204- if (!bitStream.Read (ucSlot )) continue ;
201+ unsigned char weaponID, ammo, slot ;
202+ if (!bitStream.Read (weaponID )) continue ;
203+ if (!bitStream.Read (ammo )) continue ;
204+ if (!bitStream.Read (slot )) continue ;
205205
206- if (!CClientPickupManager::IsValidWeaponID (ucWeaponID ))
206+ if (!CClientPickupManager::IsValidWeaponID (weaponID ))
207207 continue ;
208208
209209 if (pPed->IsLocalPlayer ())
210210 {
211- pPed->RemoveWeapon (static_cast <eWeaponType>(ucWeaponID ));
211+ pPed->RemoveWeapon (static_cast <eWeaponType>(weaponID ));
212212 }
213213 else
214214 {
215- CWeapon* pPlayerWeapon = pPed->GetWeapon ((eWeaponType)ucWeaponID );
215+ CWeapon* pPlayerWeapon = pPed->GetWeapon ((eWeaponType)weaponID );
216216 if (pPlayerWeapon)
217217 {
218218 pPlayerWeapon->SetAmmoInClip (0 );
0 commit comments