New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Something is wrong with the CrateSpawner min-max calculation. #15586

Open
MustaphaTR opened this Issue Sep 4, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@MustaphaTR
Member

MustaphaTR commented Sep 4, 2018

I tryed to put CrateSpawner on Player actor to imitate original games' 1 crate for each player logic. I use Maximum and Minimum of 1, but still sometimes 2 planes spawn for some players, i couldn't figue out the issue myself:
resim
Also planes seems to spawn with owner of actor trait is on. While crate itself is always WorldOwner. I dunno if there would be any reason to keep this like that. I was just keeping it to figure out the above issue. That part is an easy fix.

@reaperrr

This comment has been minimized.

Show comment
Hide comment
@reaperrr

reaperrr Sep 4, 2018

Contributor

It's actually quite simple, the crate count is updated from the Crate trait when the crate is spawned/created (dropped from plane), so if the SpawnInterval is shorter than the time the previous plane needed to reach the drop zone, another plane is spawned before the first crate is dropped and counted.

Not sure what the best fix would be, though.

Contributor

reaperrr commented Sep 4, 2018

It's actually quite simple, the crate count is updated from the Crate trait when the crate is spawned/created (dropped from plane), so if the SpawnInterval is shorter than the time the previous plane needed to reach the drop zone, another plane is spawned before the first crate is dropped and counted.

Not sure what the best fix would be, though.

@reaperrr reaperrr added the Bug label Sep 4, 2018

@MustaphaTR

This comment has been minimized.

Show comment
Hide comment
@MustaphaTR

MustaphaTR Sep 4, 2018

Member

so if the SpawnInterval is shorter than the time the previous plane needed to reach the drop zone, another plane is spawned before the first crate is dropped and counted.

I don't think this is the case, i'm using SpawnInterval of 3000 ticks or 2 mins. That's more than enough for crates to land.

Member

MustaphaTR commented Sep 4, 2018

so if the SpawnInterval is shorter than the time the previous plane needed to reach the drop zone, another plane is spawned before the first crate is dropped and counted.

I don't think this is the case, i'm using SpawnInterval of 3000 ticks or 2 mins. That's more than enough for crates to land.

@reaperrr

This comment has been minimized.

Show comment
Hide comment
@reaperrr

reaperrr Sep 4, 2018

Contributor

Ok, I guess the crate is created at the beginning of the FrameEndTask afterall.
It's actually the var toSpawn. If both min and max are 1 and current crate count is 0, both parts of toSpawn return 1, so the result will be 2.

Contributor

reaperrr commented Sep 4, 2018

Ok, I guess the crate is created at the beginning of the FrameEndTask afterall.
It's actually the var toSpawn. If both min and max are 1 and current crate count is 0, both parts of toSpawn return 1, so the result will be 2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment