Skip to content
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

Improve loading zone spawning #35

Open
wants to merge 4 commits into
base: v1.1.1
Choose a base branch
from

Conversation

MildlyInterested
Copy link

  • no longer a distinction between spawnpoint or cratefiller base
  • removed unused variables
  • use KPCF_spawnRadius as area to spawn crates in

- no longer a distinction between spawnpoint or cratefiller base
- removed unused variables
- use KPCF_spawnRadius as area to spawn crates in
@MildlyInterested MildlyInterested changed the base branch from master to v1.1.1 March 28, 2023 19:02
@Dubjunk
Copy link
Collaborator

Dubjunk commented Mar 30, 2023

There's an open todo in your comments, what's the exact problem you've to deal with?
Also why is the interact radius edited?

@MildlyInterested
Copy link
Author

If findEmptyPosition fails and returns an empty array it won't spawn in the crate and will fail silently.
That same behaviour is present in v1.1.0 if the cratefiller base is used as spawn point so I haven't addressed it (yet).

As for the interact radius, that's a remnant of our mission framework changes, have reverted that.

@Dubjunk
Copy link
Collaborator

Dubjunk commented Mar 30, 2023

There was a check for it, which you've removed with your edits.

@MildlyInterested
Copy link
Author

MildlyInterested commented Mar 30, 2023

Do you mean: https://github.com/MildlyInterested/KP-Cratefiller/blob/720ff9b44f92fc90eca22c2ca78ab23dfd148ae9/KP-Cratefiller/KPCF/fnc/fn_spawnCrate.sqf#L40-L43 ?

That check only ran if the KPCF_cratefillerSpawn wasn't also the KPCF_cratefillerBase (https://github.com/MildlyInterested/KP-Cratefiller/blob/720ff9b44f92fc90eca22c2ca78ab23dfd148ae9/KP-Cratefiller/KPCF/fnc/fn_spawnCrate.sqf#L36-L38)

I've removed it because I didn't see a reason to treat spawning on KPCF_cratefillerBase or KPCF_cratefillerSpawn differently. findEmptyPosition should find a suitable spawn location either way.

@Dubjunk
Copy link
Collaborator

Dubjunk commented Mar 30, 2023

You're right, but it wouldn't be much work to implement a check for an empty array and exit with the same hint.

@MildlyInterested
Copy link
Author

Commit is untested but how does that look for you?

@Dubjunk
Copy link
Collaborator

Dubjunk commented Mar 30, 2023

Should work as intended

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