Skip to content

Commit

Permalink
Force econ item validation (#61)
Browse files Browse the repository at this point in the history
For a long while, Valve blocked econ items from showing if they weren't
attached to a player that actually owned it.

An escape hatch was added in Gun Mettle to network the validation state of
items, since the owning player may have disconnected while one of their items
is held by another user.

Some VScript maps make use of this escape hatch for item visibility, so it's
probably fine to pull this in at this point.
  • Loading branch information
NotnHeavy authored Jun 11, 2024
1 parent 2c22df4 commit e10d745
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripting/cwx/item_entity.sp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ stock int TF2_CreateItem(int defindex, const char[] itemClass) {

SetEntProp(weapon, Prop_Send, "m_iEntityQuality", 6);
SetEntProp(weapon, Prop_Send, "m_iEntityLevel", 1);

// if this is not toggled, then the weapon entity may not be visible
SetEntProp(weapon, Prop_Send, "m_bValidatedAttachedEntity", true);

DispatchSpawn(weapon);
}
Expand Down

0 comments on commit e10d745

Please sign in to comment.