Skip to content

Commit

Permalink
Add "Inventory full" hint popup
Browse files Browse the repository at this point in the history
  • Loading branch information
TomyLobo committed Nov 18, 2018
1 parent ff266a2 commit 2eb9356
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mp/src/game/shared/sdk/weapon_sdkbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "ammodef.h"
#include "weapon_akimbobase.h"
#include "datacache/imdlcache.h"
#include "hintmessage.h"

#include "sdk_fx_shared.h"
#include "sdk_gamerules.h"
Expand Down Expand Up @@ -1586,8 +1587,10 @@ void CWeaponSDKBase::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYP
if (da_drop_overflow_on_pickup.GetBool() && iWeight + pPlayer->FindCurrentWeaponsWeight() > MAX_LOADOUT_WEIGHT)
pPlayer->DropWeaponsToPickUp(this);

if (iWeight + pPlayer->FindCurrentWeaponsWeight() > MAX_LOADOUT_WEIGHT)
if (iWeight + pPlayer->FindCurrentWeaponsWeight() > MAX_LOADOUT_WEIGHT) {
CHintMessage("Inventory full", NULL, 6.0f).Send(pPlayer);
return;
}

// ----------------------------------------
// If I already have it just take the ammo
Expand Down

0 comments on commit 2eb9356

Please sign in to comment.