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

Fix camera console feeds not following moving cameras #27851

Merged
merged 8 commits into from
Jan 28, 2025

Conversation

asciodev
Copy link
Contributor

@asciodev asciodev commented Jan 5, 2025

What Does This PR Do

This change makes camera consoles refresh their feeds every 2 seconds as long as they have active watchers. This fixes unmoving feeds for camera bugs, ERT cameras, video cameras (including the journalist's advanced video camera), and other mobile cameras on a console's camera network.

Why It's Good For The Game

Having to manually refresh over and over in order to follow a moving camera is bad for ergonomics and immersion.

Testing

I logged in with two clients and observed as both. I dispatched an ERT and signed up for it on one of the clients, and chose to become the commander. I looked at the special ops console and watched as the camera feed moved with me.

I then had the other observer re-incarnate as a Captain, and spawned a camera bug syndicate kit. I placed a camera bug on the Captain, and gave the camera bug device to the ERT Commander, and had them watch Hidden Camera #1. I had the Captain move around CentComm, and the feed moved with the Captain. I had the Captain remove the bug and throw it, and the feed moved with the bug.

I teleported both the Captain and ERT observer to the bar. I spawned a video camera and gave it to the Captain. I had the Captain enable it, and had the ERT commander watch the Captain on the bar entertainment console. I had the Captain move around the station, and saw the bar feed the ERT was watching move with the captain.

I did this again with an advanced video camera, to the same effect.


Declaration

  • I confirm that I either do not require pre-approval for this PR, or I have obtained such approval and have included a screenshot to demonstrate this below.

Changelog

🆑 Ascio
fix: Fixed camera consoles not following moving cameras (e.g. video cameras, ERT cams, camera bugs)
/:cl:

This change refactor the screen-setting logic in camera consoles to its
own method, and additionally calls that method whenever a video camera
is moved, if that video camera's feed is being watched by a camera
console.
Extracts camera follow lag into a variable on video cameras called
`update_viewer_cooldown_rate` and reduces it from 3 to 2 seconds.
Additionally, adds another variable on video cameras called
`update_viewer_stabilization_rate`, which updates all tuned-in camera
consoles with the new position of the video camera a final time, so the
feed remains centered on the camera.
@ParadiseSS13-Bot ParadiseSS13-Bot added the -Status: Awaiting type assignment This PR is waiting for its type to be assigned internally label Jan 6, 2025
DGamerL
DGamerL previously requested changes Jan 6, 2025
Copy link
Member

@DGamerL DGamerL left a comment

Choose a reason for hiding this comment

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

Instead of updating it on Move(), please register a signal when the camera is either turned on or equipped (and remove it accordingly)

@Bm0n
Copy link
Contributor

Bm0n commented Jan 6, 2025

Does this also fix the ERTs camera monitor?

code/modules/paperwork/photography.dm Outdated Show resolved Hide resolved
code/modules/paperwork/photography.dm Outdated Show resolved Hide resolved
@ParadiseSS13-Bot ParadiseSS13-Bot added -Status: Awaiting review This PR is awaiting review from the review team and removed -Status: Awaiting type assignment This PR is waiting for its type to be assigned internally labels Jan 7, 2025
Makes camera consoles refresh their feeds every 2 seconds as long as
they have active watchers. This fixes camera bugs, ERT cameras, video
cameras (including the journalist's advanced video camera), and any
other mobile cameras on a console's camera network.
@asciodev asciodev changed the title Fix video feeds not following video cameras Fix camera console feeds not following moving cameras Jan 10, 2025
@Burzah Burzah dismissed DGamerL’s stale review January 25, 2025 19:41

Changes made

@Burzah Burzah added this pull request to the merge queue Jan 25, 2025
@ParadiseSS13-Bot ParadiseSS13-Bot added -Status: Awaiting merge This PR is ready for merge and removed -Status: Awaiting review This PR is awaiting review from the review team labels Jan 25, 2025
@Burzah Burzah removed this pull request from the merge queue due to a manual request Jan 25, 2025
@Burzah Burzah added this pull request to the merge queue Jan 28, 2025
Merged via the queue into ParadiseSS13:master with commit e01a133 Jan 28, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-Status: Awaiting merge This PR is ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants