Skip to content

Commit

Permalink
Unable to create item with deadringer
Browse files Browse the repository at this point in the history
* Disable the ability to pick up items with attack keys
  • Loading branch information
gaejuck committed May 15, 2022
1 parent ed47011 commit 20d7d4d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
2 changes: 2 additions & 0 deletions addons/sourcemod/scripting/royale.sp
Original file line number Diff line number Diff line change
Expand Up @@ -744,10 +744,12 @@ public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3
//Don't allow closing parachute while battle bus is still active
buttons &= ~IN_JUMP;
}
/*
else if (buttons & IN_ATTACK || buttons & IN_ATTACK2)
{
TF2_TryToPickupDroppedWeapon(client);
}
*/

if (FRPlayer(client).InUse)
{
Expand Down
20 changes: 10 additions & 10 deletions addons/sourcemod/scripting/royale/event.sp
Original file line number Diff line number Diff line change
Expand Up @@ -336,20 +336,20 @@ public Action Event_PlayerDeath(Event event, const char[] name, bool dontBroadca

unknown.Cancel();

//Drop all weapons
int weapon, pos;
while (TF2_GetItem(victim, weapon, pos))
if (!deadringer)
{
if (TF2_ShouldDropWeapon(victim, weapon))
//Drop all weapons
int weapon, pos;
while (TF2_GetItem(victim, weapon, pos))
{
float origin[3], angles[3];
if (SDKCall_CalculateAmmoPackPositionAndAngles(victim, weapon, origin, angles))
TF2_CreateDroppedWeapon(victim, weapon, false, origin, angles);
if (TF2_ShouldDropWeapon(victim, weapon))
{
float origin[3], angles[3];
if (SDKCall_CalculateAmmoPackPositionAndAngles(victim, weapon, origin, angles))
TF2_CreateDroppedWeapon(victim, weapon, false, origin, angles);
}
}
}

if (!deadringer)
{
//Drop small health kit
TF2_DropItem(victim, "item_healthkit_small");

Expand Down

0 comments on commit 20d7d4d

Please sign in to comment.