wurstscript / WurstStdlib2

WurstScript Standard Library Version 2
Apache License 2.0
55 stars 53 forks source link

vec2.isTerrainWalkable() always returns false #368

Closed Jaccouille closed 3 years ago

Jaccouille commented 3 years ago

Hello there,

The id defined for the dummy item id, which is used to check walkability, used to be wolg, which is a base id for the Wirt's Other Leg item, it has been replaced by a generated one in this commit but the generate id isn't used in any object definition.

This variable end up being null since there's no item linked to the DUMMY_ITEM_ID.

This is causing the dummyItem.getPos() call to always return (0, 0) and therefore, the method isTerrainWalkable() always returns false.

Is createItem(DUMMY_ITEM_ID, ZERO2) supposed to not return null when the DUMMY_ITEM_ID doesn't refer an item that has been defined? Or @Frotty forgot to create an ItemDefinition for the dummy item?

Frotty commented 3 years ago

It's already fixed and reverted to 'wolg' in https://github.com/wurstscript/WurstStdlib2/commit/a4e21a73df2c637c92cc1f276dae6f2d9a17f064

Jaccouille commented 3 years ago

True, my bad.