Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upVehicle cameras mod #10630
Conversation
Coolthulhu
added some commits
Dec 24, 2014
Coolthulhu
referenced this pull request
Dec 24, 2014
Closed
Proposal: vehicle-mounted cameras #10628
This comment has been minimized.
This comment has been minimized.
|
Cool! |
KA101
reviewed
Dec 24, 2014
| "type":"GENERIC", | ||
| "id" : "camera_control", | ||
| "name" : "camera control system", | ||
| "description" : "A system to control cameras. Currently runs on magic and doesn't require energy.", |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Rivet-the-Zombie
Dec 24, 2014
Member
Yeah, with a less fanciful description and a small power drain while active this would be cool.
Coolthulhu
added some commits
Dec 25, 2014
This comment has been minimized.
This comment has been minimized.
|
I think this should be ready for testing now. I moved cameras out of the mod, I hope that's OK. I added some energy cost to cameras, added an option to disable/enable them, renamed "omnidirectional camera" to "security camera" (because no other camera exists yet), gave things proper descriptions and renamed VPFLAG_MIRROR to VPFLAG_EXTENDS_VISION (because cameras use mirror mechanics). |
KA101
self-assigned this
Dec 25, 2014
This comment has been minimized.
This comment has been minimized.
|
Might let 'em spawn in electronic stores too. ;-) |
This comment has been minimized.
This comment has been minimized.
|
Yeah, I'll add them later on. I have to make remote controllers spawn somewhere too, so that they can have low-level uses. I just prefer separating my code and json PRs, because it makes it easier for me to avoid conflicts. |
This comment has been minimized.
This comment has been minimized.
Not sure how that works, but wev. >_> |
This comment has been minimized.
This comment has been minimized.
|
It works like this: I'm bad at git. I learned how to rebase literally yesterday. |
This comment has been minimized.
This comment has been minimized.
|
I've never had confidence in git rebase. I ask authors to fix substantive conflicts because you folks know what you had in mind. I don't necessarily have that knowledge. Save-reuse, yeah, that could do it. I've had a few PRs that fell behind each other. |
Coolthulhu commentedDec 24, 2014
The feature I've seen requested few times.
Cameras use mirror mechanics and are similar to them in many ways.
When sitting on a vehicle on a part flagged as "CAM_CONTROL", cameras work like mirrors seen by the player, except with offset being dependent on camera stats rather than distance to it.
I reuse VPFLAG_MIRROR, because it is used only in lightmap.cpp and only in this exact function that now also handles cameras. That way processing seen cache shouldn't be any slower when no mirrors or cameras are installed on current vehicle and only an incredibly tiny bit slower when there are many mirrors installed.
Cameras are installed on the roof, but (like turrets and overhead lights) they can't see through vehicle walls.