Vampurica / DZMS-DayZMissionSystem

A logic and useability rewrite of the DayZChernarus Mission System
16 stars 22 forks source link

findSafePos Should be Unique Per Map Size #9

Closed Vampurica closed 10 years ago

Vampurica commented 10 years ago

findSafePos is hard-coded to search 5500m to prevent Chernarus spawning missions in Debug.

It should instead be unique per-map.

Islands it would be from the center point to the farthest shoreline.

Inland maps, it must be from the center to the nearest map boundary.

Vampurica commented 10 years ago

Getting the length of a side of the map is proving impossible for anything dynamic. Some maps are irregular shaped, and some maps don't have the grid coordinates starting at the top left.

The next idea is to get the distance from the center point to 0,0, and then using the Pythagorean Theorem on it to get a rough radius. Needs testing.

Vampurica commented 10 years ago

Errors are occuring. Getting missions spawning slightly in debug on Chernarus since the defined center point in the map config is farther left than the true center.

Need to revert this until we can find a better way to do this.

Vampurica commented 10 years ago

Need to hardcode this per map until a better way is found.

Vampurica commented 10 years ago

Mostly completed with 16506f7a5970c91b89c4043a4ddc297eeb6adf6c.

Vampurica commented 10 years ago

Going to close this unless we experience issues with it.