source-sdk-2013 icon indicating copy to clipboard operation
source-sdk-2013 copied to clipboard

[TF2] fix: wrong concatenated item event name due to missing comma

Open CosminPerRam opened this issue 7 months ago • 3 comments

Description

Fixes an item event name being wrongfully concatenated due to missing comma in the const char list.

Before:

        "item_removed_attrib",
	"item_changed_style"

	// NEW STORE EVENTS
	"store2_entered",

Resulting in "item_changed_stylestore2_entered" being an entry.

CosminPerRam avatar May 27 '25 21:05 CosminPerRam

This has a compilation error when compiling

error C2338: static_assert failed: 'Compile time assert constraint is not true: ARRAYSIZE( g_ItemEventNames ) == IE_COUNT'

The last line should be removed or commented

"" // IE_COUNT

Bitl avatar Jun 19 '25 23:06 Bitl

Ooops, somehow missed that, I think it failed to build and I ran the last successful build, will fix soon.

CosminPerRam avatar Jun 20 '25 10:06 CosminPerRam

Fixed, thanks @Bitl

CosminPerRam avatar Jun 22 '25 19:06 CosminPerRam

This will fix ItemEventID in the OGS DB in the following cases:

Event Old New
IE_ITEM_CHANGED_STYLE item_changed_stylestore2_entered item_changed_style
IE_STORE2_ENTERED item_reset_counters store2_entered
IE_ITEM_RESET_STRANGE_COUNTERS item_put_into_collection item_reset_counters
IE_ITEM_PUT_INTO_COLLECTION "" item_put_into_collection

IE_ITEM_PUT_INTO_COLLECTION is not used in TF2, but this change could affect some other usage if applicable.

mastercoms avatar Oct 25 '25 06:10 mastercoms