Skip to content

Fix Star Wars whenGetAll handlers#7695

Merged
islemaster merged 2 commits intostagingfrom
fix-whengetall
Apr 6, 2016
Merged

Fix Star Wars whenGetAll handlers#7695
islemaster merged 2 commits intostagingfrom
fix-whengetall

Conversation

@islemaster
Copy link
Contributor

Only count non-fading items when checking whether we just collected the last item. Explanation of fix inline in diff.

Fixes Pivotal #110267384

var distanceScaling = constants.SPRITE_COLLIDE_DISTANCE_SCALING;

if (collidable.isFading && collidable.isFading()) {
continue;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, you'll notice we do one thing right - we skip items that are already fading out while we loop through items checking collisions. This makes sure you can't collect an item that's already fading out.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, you'll notice we do one thing right - we skip items that are already fading out while we loop through items checking collisions. This makes sure you can't collect an item that's already fading out.

@breville
Copy link
Member

breville commented Apr 5, 2016

lgtm, thanks to the detailed description. probably worth testing against other play lab level types to make sure all's good there?

@islemaster
Copy link
Contributor Author

Did a quick check of the Minecraft and Gumball scripts, seems like getall behaviors are still good there as expected.

@islemaster islemaster merged commit 1b40031 into staging Apr 6, 2016
@islemaster islemaster deleted the fix-whengetall branch April 6, 2016 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants