Nuclide
Software Development Kit for id Technology (BETA)
SecurityCamera.h
1/*
2 * Copyright (c) 2025 Vera Visions LLC.
3 *
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
13 * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
14 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15*/
16
17typedef enum
18{
19 CAMSWEEP_IDLE,
20 CAMSWEEP_RIGHT,
21 CAMSWEEP_RIGHT_WAIT,
22 CAMSWEEP_LEFT,
23 CAMSWEEP_LEFT_WAIT,
24 CAMSWEEP_ALERTED,
25 CAMSWEEP_RETURN
26} camsweepstate_t;
27
51class
53{
54 void ncSecurityCamera(void);
55
56#ifdef SERVER
57 virtual void Spawned(void);
58 virtual void SpawnKey(string, string);
59 virtual void EvaluateEntity(void);
60 virtual float SendEntity(entity,float);
61
62 nonvirtual bool SecurityCameraIsEnemy(entity);
63 nonvirtual bool SecurityCameraCheck(ncActor toCheck);
64 nonvirtual void SecurityCameraMovement(void);
65 nonvirtual void SecurityCameraVisionTick(void);
66#endif
67
68#ifdef CLIENT
69 virtual void Draw(void);
70 virtual void ReceiveEntity(float,float);
71#endif
72
73private:
74 float m_securiCamScanDist;
75 float m_securiCamScanFOV;
76 float m_securiCamSightResume;
77 float m_securiCamSightTime;
78 float m_securiCamSweepAngle;
79 float m_securiCamSweepSpeed;
80 float m_securiCamSweepWait;
81 float m_securiCamAlertResumeTime;
82 string m_outputOnFoundPlayer;
83
84 entity m_securiCamTrackingRef;
85 float m_securiCamTrackingTime;
86
87 float m_securiCamSweepTime;
88 camsweepstate_t m_securiCamSweepState;
89 float m_securiCamSpawnYaw;
90 float m_securiCamSweepWaitTime;
91
92};
93
94
95
This entity class represents an object with choreographed/free-form movement.
Definition: Actor.h:93
Definition: Camera.h:30
Definition: SecurityCamera.h:53