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

move cameras to per-map files #169

Merged
merged 2 commits into from
Dec 18, 2021
Merged

move cameras to per-map files #169

merged 2 commits into from
Dec 18, 2021

Conversation

Paril
Copy link
Contributor

@Paril Paril commented Dec 15, 2021

This PR moves cameras away from the single-file system, which is impossible for modders to use for custom maps (with the current system it's impossible to allow downloads of camera files without overwriting all of their cameras, for instance).

One potential improvement is to also allow embedding camera entities in a map, which are ignored by the game code and solely used by the renderer, which eliminates an extra file for new maps, but that's much lower priority.

@@ -0,0 +1 @@
(-2008.9, 678.2, 206.1) (0.001, -0.810, -0.586)
Copy link
Contributor

Choose a reason for hiding this comment

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

the to original cameras.txt had a comment for the "lab" map.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oops, thanks

VectorCopy(pos, wm->cameras[wm->num_cameras].pos);
VectorCopy(dir, wm->cameras[wm->num_cameras].dir);
wm->num_cameras++;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Could be helpful for map authors to print a message if MAX_CAMERAS is exceeded.

Break early and warn on too many cameras
@Paril
Copy link
Contributor Author

Paril commented Dec 16, 2021

Pushed with adjustments requested by @res2k

@apanteleev apanteleev merged commit 4f713c8 into NVIDIA:master Dec 18, 2021
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.

3 participants