Skip to content

Commit

Permalink
Add targetname to backpacks
Browse files Browse the repository at this point in the history
  • Loading branch information
dysphie committed Jun 20, 2023
1 parent 761485b commit aabb3e0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripting/nmrih-backpack2.sp
Expand Up @@ -16,7 +16,7 @@

#define PLUGIN_PREFIX "[Backpack2] "
#define PLUGIN_DESCRIPTION "Portable inventory boxes"
#define PLUGIN_VERSION "2.0.17"
#define PLUGIN_VERSION "2.0.18"

#define INVALID_USER_ID 0

Expand Down Expand Up @@ -283,6 +283,7 @@ enum struct Backpack

// UNDONE: Can seemingly crash the server when CDynamicProp::~CDynamicProp() is invoked
// SetEntPropString(attached, Prop_Data, "m_iClassname", "backpack_attached");
DispatchKeyValue(attached, "targetname", "backpack_attached");

if (!DispatchSpawn(attached))
{
Expand Down Expand Up @@ -353,6 +354,7 @@ enum struct Backpack

// UNDONE: Can seemingly crash the server when CPhysicsProp::~CPhysicsProp() is invoked
// SetEntPropString(dropped, Prop_Data, "m_iClassname", "backpack");
DispatchKeyValue(dropped, "targetname", "backpack");

numDroppedBackpacks++;

Expand Down

0 comments on commit aabb3e0

Please sign in to comment.