Skip to content

Improve loading zone spawning#35

Open
MildlyInterested wants to merge 4 commits into
KillahPotatoes:v1.1.1from
MildlyInterested:bug/loading-zone-busy
Open

Improve loading zone spawning#35
MildlyInterested wants to merge 4 commits into
KillahPotatoes:v1.1.1from
MildlyInterested:bug/loading-zone-busy

Conversation

@MildlyInterested
Copy link
Copy Markdown

  • 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Collaborator

Dubjunk commented Mar 30, 2023

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

@MildlyInterested
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Author

Commit is untested but how does that look for you?

@Dubjunk
Copy link
Copy Markdown
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