@@ -188,31 +188,31 @@ void CWeaponRPCs::TakeWeapon(CClientEntity* pSource, NetBitStreamInterface& bitS
188
188
189
189
void CWeaponRPCs::TakeWeapons (CClientEntity* pSource, NetBitStreamInterface& bitStream)
190
190
{
191
- unsigned char count = 0 ;
191
+ std:: uint8_t count = 0 ;
192
192
if (!bitStream.Read (count))
193
193
return ;
194
194
195
195
CClientPed* pPed = m_pPedManager->Get (pSource->GetID (), true );
196
196
if (!pPed)
197
197
return ;
198
198
199
- for (int i = 0 ; i < count; i++)
199
+ for (std:: uint8_t i = 0 ; i < count; i++)
200
200
{
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 ;
205
205
206
- if (!CClientPickupManager::IsValidWeaponID (ucWeaponID ))
206
+ if (!CClientPickupManager::IsValidWeaponID (weaponID ))
207
207
continue ;
208
208
209
209
if (pPed->IsLocalPlayer ())
210
210
{
211
- pPed->RemoveWeapon (static_cast <eWeaponType>(ucWeaponID ));
211
+ pPed->RemoveWeapon (static_cast <eWeaponType>(weaponID ));
212
212
}
213
213
else
214
214
{
215
- CWeapon* pPlayerWeapon = pPed->GetWeapon ((eWeaponType)ucWeaponID );
215
+ CWeapon* pPlayerWeapon = pPed->GetWeapon ((eWeaponType)weaponID );
216
216
if (pPlayerWeapon)
217
217
{
218
218
pPlayerWeapon->SetAmmoInClip (0 );
0 commit comments