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

Wilson look cameras and omnipresence #267

Merged
merged 1 commit into from
Mar 31, 2024

Conversation

Blixibon
Copy link
Collaborator

This PR adds a new entity called point_wilson_camera, which can act as an extra eye for Wilson. In addition, this PR integrates previously unfinished support for Wilson to be able to respond to Bad Cop from anywhere on the map. It also adds support for Wilson to look through the player's eyes directly.

point_wilson_camera

A Wilson NPC can have one or multiple point_wilson_camera entities specified as "camera targets", which allow them to act as proxies for the Wilson NPC's senses. Each camera can have its own FOV and maximum look distance.

When Wilson speaks in reference to a target (e.g. seeing an enemy, commenting on the player, etc.) while looking through a camera target, that camera will be added as a response criterion called camera. This can theoretically allow for camera-specific callouts.

Omnipresence

The Omnipresent keyvalue and Enable/DisableOmnipresence inputs can be used to make Wilson bypass distance checks in speech targeting code. This is designed to be used when Wilson is stashed in his own room in the map and uses camera targets to see, and an omnipresent Wilson with camera targets specified will not use his own POV for visibility checks.

This feature was previously named "omniscience", but that word is a misnomer for this functionality and has been tentatively renamed to "omnipresence", with counterparts for the new keyvalues and inputs added accordingly. The variable itself has not changed to avoid breaking saves.

"See through player" functionality

Wilson now has a keyvalue and inputs for seeing through the player's eyes. This acts similarly to camera targets, and may be useful for when external camera targets are not warranted.

@Blixibon Blixibon requested a review from 1upD March 26, 2024 08:00
sp/src/game/server/ez2/npc_wilson.cpp Show resolved Hide resolved
sp/src/game/server/ez2/npc_wilson.cpp Show resolved Hide resolved
sp/src/game/server/ez2/npc_wilson.cpp Show resolved Hide resolved
@1upD 1upD self-requested a review March 26, 2024 16:27
@1upD 1upD merged commit 015af6f into entropy-zero:ez2/mapbase Mar 31, 2024
5 checks passed
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.

None yet

2 participants