Releases: nosoop/SM-TFEconData
0.19.1.2
0.19.1.1
https://stackoverflow.com/a/45794912 (0.19.1)
Fixed
TF2Econ_TranslateWeaponEntForClass
now correctly returns false if the underlyingTranslateWeaponEntForClass
call returns anullptr
in addition to the case where it does for an empty string. (#21)
nobody: (0.19.0)
Minor feature update. There is no urgent need to update if your plugins still work.
If coming from an older version of the plugin, you will need to update tf2.econ_data.txt
.
Added
- Native
TF2Econ_GetAttributeList
, which returns anArrayList
of valid attribute definition indices.- Why would you use this? I don't know. Probably for something
I'm working on releasing in the near futureI've released. - (But really, the TF2Attributes facilities are preferred for attributes on entities.)
- Why would you use this? I don't know. Probably for something
Changed
- Removed
public
visibility specifier on functions that do not need it.
barking up the right tree but it wasn't valid in the first place (0.18.3)
Bug fix update.
ℹ️ Users are advised to update if they work with the particle attribute list and use Windows.
Added
- The project now has Github workflow integration for releases.
Fixed
TF2Econ_GetParticleAttributeList
was not validating that the parent of the underlyingCUtlRBTree
was valid. This caused crashes on Windows systems. (#19)- The plugin changed a comparison used against the
TFEconParticleSet
to a constantNUM_ECON_PARTICLE_SETS
, allowing it to now compile against 1.11 and newer. (#10)- This did not affect developers using the include file for their projects; it just allows the plugin itself to be compiled.
- That said, the workflow still only targets and outputs code compatible with SourceMod 1.10, even though only 1.11 onward is officially built with SDK headers that are current with TF2 updates.
the two hard problems in computer science (0.18.2)
Bug fix update.
ℹ️ Users are recommended to update, full stop.
Fixed
- The plugin no longer caches various pointers. This prevents bad memory accesses in cases when the schema gets updated between calls, which can happen after a map change for various reasons. (#14)
don't be surprised if you wake any bears while poking around memory with a large stick (0.18.1)
Bug fix update.
ℹ️ Users are recommended to update if they have plugins that rely on paintkit definition natives. If not, there is no need to.
Fixed
TF2Econ_GetPaintKitDefinitionList
should no longer perform out-of-bounds reads within the object definition array. This resolves crashes observed on Windows servers as of the 2021-11-16 update. (#13)
based on what? (0.18.0)
Relatively minor update with some new functionality. There is no urgent need to update.
If coming from an older version of the plugin, you will need to update tf2.econ_data.txt
.
Added
- Native
TF2Econ_IsItemInBaseSet
, which checks if the item is available to all players by default. (#12) - Native
TF2Econ_GetMapDefinitionIndexByName
, which returns a map definition index by its name. Primarily used if you intend to take advantage of the game's matchmaking level change system. Somehow. (#9)
Default dance
Relatively minor update with some new functionality and a couple of deprecations. There is no urgent need to update.
If coming from an older version of the plugin, you will need to update tf2.econ_data.txt
.
If you are on Windows, you are highly recommended to update tf2.econ_data.txt
, regardless of your currently installed plugin version (the gamedata should be backwards compatible with all previous releases).
Added
- Native
TF2Econ_GetItemDefaultLoadoutSlot
, which returns the default loadout slot for player classes that don't quite support the item normally.
Fixed
TF2Econ_TranslateAttributeNameToDefinitionIndex
now only reads off 16 bits of data instead of 32. Attribute indices only use 16 bits of storage. This resolves a seemingly extremely rare issue where there is data in the MSB.
Changed / Deprecated
- The
CEconItemDefinition::m_aiItemSlot
offset entry was finally renamed toCTFItemDefinition::m_aiItemSlot
. We're arguing words at this point, but this was bothering me for a while. The old name will remain functional for backwards compatibility for the time being. - Native
TF2Econ_GetItemSlot
was renamed toTF2Econ_GetItemLoadoutSlot
. There is no change in behavior; this just emphasizes the "loadout slot" concept in an attempt to remove the confusion between weapon slots (used in generic Source game handling) and loadout slots (an exclusively TF2 item schema construct). The old name will still map to the native and will not be removed entirely; this just adds a warning if a plugin is compiled with the newest version of the include file using that function.
The eco(n)system grows
This is a minor update.
If coming from an older version of the plugin, you will need to update tf2.econ_data.txt
.
Fixed
TF2Econ_GetItemDefinitionAddress
correctly returningnull
instead of the address of the special "default" item definition on invalid item definitions. If you specifically want that definition, call it withTF_ITEMDEF_DEFAULT
. (#5)- This also fixes
TF2Econ_IsValidItemDefinition
always returning true.
- This also fixes
Changed
- Natives
TF2Econ_GetItemDefinitionString
andTF2Econ_GetAttributeDefinitionString
now returnbool
instead ofvoid
; the return value is true if the output buffer is not as empty string (if you specify a non-empty default value, this should always be true). This allows authors to inlineif
s instead of having to do abuffer[0]
check each time. - Dropped dependency of
tf2_stocks
from the plugin, and in turn, the TF2 extension. We never really needed those anyways. The plugin still requires SDKTools for calling game functions. However, the include file still pulls intf2_stocks
, asTF2Econ_GetItemSlot
does require aTFClassType
value. TF2Econ_GetItemStaticAttributes
was modified to require new gamedatasizeof(static_attrib_t)
, which is used internally when the function iterates over the attribute list in memory. This is not actually necessary for TF2, but combined with dropping the dependency on the TF2 extension, this allows a semi-unified codebase for other games to build off of.- Many parameter names have been changed from
defindex
to eitheritemdef
orattrdef
, to better contextualize what definition indices are associated with the native. This is a breaking compile-time change if you were using named parameters for those.