View Issue Details

IDProjectCategoryView StatusLast Update
0005528The Dark ModCodingpublic24.04.2021 08:14
ReporterDragofer Assigned ToDragofer  
PrioritynormalSeveritynormalReproducibilityN/A
Status assignedResolutionopen 
Product VersionSVN 
Target VersionTDM 2.10 
Summary0005528: Improvements to security cameras
DescriptionDuring 0004731, a range of changes and improvements have been suggested for security cameras in general. Most of these are not specific to Epifire's security camera and are therefore tracked here.

Links:
Public forums - https://forums.thedarkmod.com/index.php?/topic/20005-tdm-security-cameras/
Dev forums - https://forums.thedarkmod.com/index.php?/topic/20768-security-cameras/
New wiki article - https://wiki.thedarkmod.com/index.php?title=Security_Camera_(2.10%2B)
Current wiki article - https://wiki.thedarkmod.com/index.php?title=Security_Camera

Done and documented:
- (rev 9111, 9112) customisable spotlight properties with spawnargs "spotlight_range", "spotlight_diameter" and "spotlight_texture"
- (rev 9121) customisable post-destruction sparks particle with spawnargs beginning with "sparks"
- (rev 9116) customisable intervals between alarm sounds
- (rev 9110, 9126, 9128) customisable skins
- (rev 9113, 9114) handle colour switches in code instead of in the scriptobject
- (rev 9109, 9115) script event to check the camera's state (getSecurityCameraState(), returns 1 to 5)
- (rev 9114, 9115) spawnarg "start_off" has no effect
- (rev 9117) problems with sync/visibility of the post-destruction sparks particle
- (rev 9125) rename spawnarg "sweepSpeed" to "sweepTime" to match how it's used in the code.
- (rev 9126) make sure all the new coding variables are saved and loaded from saves
- (rev 9130) screens: customise fov on display screens by adding spawnargs "cameraFovX" and "cameraFovY", to be set on the sending entity
- (rev 9132) option for mappers to use an own spotlight with spawnarg "spotlight_custom"
- (rev 9133) automatically calculate "spotlight_diameter" to match "scanFov" unless mapper manually specifies a value
- (rev 9134) allow adjustment of visual acuity with new spawnarg "sight_threshold"
- (rev 9135) different fx and snd_death depending on powerOn
- (rev 9135) camera is invincible if "health" is set to 0, as originally intended
- (rev 9136) follow: make the camera follow the player once sighted so it's harder to escape its view
- (rev 9143) follow: also make the camera incline to follow the player
- (rev 9143) follow: different speed for following than for sweeping
- (rev 9145) alarm should not expire if the camera can see or recently saw the player
- (rev 9145) rename spawnarg "wait" to "alarm_duration"
- (rev 9146) when returning to regular activity, sweep and incline should be synchronised to finish simultaneously
- (rev 9149) follow: allow to limit vertical rotation
- (rev 9150) more control over when the camera triggers its targets
- (rev 9151) scripts: script functions to get & set the camera's health
- (rev 9151) scripts: script function to set the camera's sight threshold
- (rev 9151) scripts: script function to toggle player detection, rather than the scriptobject setting a spawnarg
- (rev 9171, 9172, 9175) allow to sweep 360° or more with the modified movement system
- (rev 9176) TDM crashes at map load when a Response is set on the security camera
- (rev 9177) respond to trigger stims & trigger signals
- (rev 9178) can now be frobable, and set to be frobable/unfrobable when dislodged
- (rev 9173) (reverted in 9181) reinstate code to "dislodge" the camera when destroyed
- (rev 9179) (reverted in 9181) Player can pick up a dislodged security camera.
- (rev 9180) (reverted in 9181) Dislodged security cameras make sounds when colliding.
- (rev 9181) Revert most of the dislodge-related changes, only keep the logic for deciding to dislodge.
- (rev 16150) gear scriptobjects should stop processing soon after camera is destroyed.
- (rev 16150) change destruction sound from "glass_bullethole" to "sizzle"
- (rev 16150) camera is destroyed too easily by far away fire arrow splash damage (increase health)
- (rev 16150) document fx spawnargs in the entityDef
- (rev 16150) add damage & destruction fx
- (rev 16160) make sure the old camera assets are compatible with all new features
- (rev 16160) make a clipmodel for the old camera
- (rev 16160) rename the falloff image to avoid conflicts with Volta assets
- (rev 16162) make prefabs of security cameras sending their views to display screens (also includes an automaton)
- (rev 16162) make more camera screen materials so mappers can easily have multiple in their map without modifying materials
- (rev 16163) make moveables out of the security cameras
- (rev 16171) let Epifire's camera use solid materials. Uses the clipmodel anyway.
- (rev 16179) old camera should not have coloured glass when destroyed
- (rev 16182) models: better wall mount for Epifire's camera
- (rev 16182) add spawnarg "gear_speed" to the Epifire camera ceiling pivot
- (rev 16194) models: add pivot mounts for the old security camera
- document shaderParms in the wiki
- update the test map in the wiki article

Done, to be documented:
- (rev 9174) AIs become alerted if they see a destroyed security camera, spawnarg on security camera: "notice_destroyed"
- (rev 9182, 9184, 9187) Give mappers control over what can damage the security camera.
- (rev 9185) Add script events to set, rather than toggle, the state of the security camera as a whole (power) and its subcomponents
- (rev 9186) Automatically detect whether the sparks particle is looping
- (rev 9188) spawnargs: allow to use spawnarg "sweepSpeed"
- (rev 16212) models: merge the clipmodels with the visual models

1st Priority:
- follow: allow to limit horizontal rotation
- add Epifire's new flinder pieces
- (0005529) issues with falloff images for projected lights, especially when spotlight is short but wide.
- (0005531) search for FMs that use security cameras or their assets and check that they look & behave the same on 2.09 vs 2.10

2nd Priority:
- triggers: if a fire arrow blast destroys a camera and pushes a button targeting the camera, the sparks particle becomes out of sync
- triggers: option to start / stop alarm (trigger targets) when destroyed
- follow: if the player runs out of view, let the camera turn to where it predicts he will be in 1s
- follow: sound while the camera is following
- detection: improve how the security camera decides to become fully alerted
- scripts: add a disabled state that can be called by script and object functions

3rd Priority:
- spotlight: allow the security camera to use multiple mapper-specified lights
- spotlight: let the spotlight(s) use different values for colors & useColors than the main model
- spotlight: option to change the light texture depending on alert state
- follow: allow stationary cameras to follow the player
- follow: option to sense the player, so the camera always knows where the player is once it's alert
- damage: make the camera react to being damaged
- screens: add a shaderParm spawnarg to set the resolution of a camera GUI material (actually, see 5485)
- screens: prefab of one screen that can switch between multiple cameras
- screens: allow to set "cameraFovX" and "cameraFovY" on the display screen so that all 3 camera* spawnargs can be on the same entity
- sparks: rename sparks spawnargs so they don't get confused with damage fx
- models: security cameras should not be forced to use clipmodels
- models: make a version of Epifire's model with an inbuilt lamp and ray
- link up to a turret

Stretch goals:
- make the lens a vulnerable spot for broadhead arrows
- let the camera hear
- detect AIs hostile to the camera's team
TagsNo tags attached.

Relationships

parent of 0005529 new Projected lights can't use appropriate falloff images 
parent of 0005531 new Compare security cameras between 2.09 and 2.10beta 
related to 0004731 resolvedDragofer Add Epifire's security camera model 
related to 0004615 resolvedduzenko Remote camera lost when saving\loading 
related to 0005485 assignedcabalistic mirrorRenderMap doesn't accept resolution parameters anymore 
Not all the children of this issue are yet resolved or closed.

Activities

Dragofer

Dragofer

06.02.2021 18:48

developer   ~0013660

Last edited: 07.02.2021 11:05

View 2 revisions

Rev 9109
Add new script event "getSecurityCameraState" to allow scripts to check the current status of a security camera. 1 = unalerted, 2 = partially alerted, 3 = fully alerted, 4 = switched off, 5 = destroyed, implicitly 0 = not a security camera.

Rev 9110
Skin names are no longer hard-coded. Use "skin" as "skin_on", as described in entityDef tooltip, for backwards compatibility.
-----
Rev 16139
Make Epifire's security camera entity useable in SVN.
Set up new, full-featured camera entities in a new AI/Machines/Security Camera folder, using both the original and Epifire models.
Maintain the original func_security_camera entity in the Func folder for backwards compatibility, but also make it act as a base class for other security cameras.

Rev 16140
Tweaks to security camera entities, mostly for backwards compatibility.
Dragofer

Dragofer

07.02.2021 11:00

developer   ~0013663

Last edited: 07.02.2021 11:03

View 2 revisions

Rev 9111
Spotlight properties no longer hardcoded: code reads "spotlight_range", "spotlight_radius" and "spotlight_texture" spawnargs. If not found, uses old values (scanDist and lights/biground1).
My initial idea was to just use the same spawnargs as projected lights (light_up, light_target, light_right), but this was very unintuitive for a mapper, especially because the code rotates the light and it more or less becomes mandatory to copy spawnargs from an existing light in order to get the axis right.

Rev 16141
Add new spotlight spawnargs to new camera entityDefs for rev 9111. Scriptobject no longer needs to override the spotlight texture.
Dragofer

Dragofer

08.02.2021 09:17

developer   ~0013666

Last edited: 08.02.2021 09:20

View 2 revisions

Rev 9112
Rev 16144
Change spotlight_radius to spotlight_diameter to match how the spawnargs work for projected lights.
----
Rev 9113
Rev 16145
Colour changes now handled by the code whenever the state changes, rather than by the scriptobject continuously checking the alert state.
Dragofer

Dragofer

08.02.2021 11:29

developer   ~0013667

Rev 9114
Spawnarg "start_on" now works. Also, initial colour is applied sooner at map start.
Dragofer

Dragofer

09.02.2021 09:38

developer   ~0013669

Rev 9115
Use powerOn instead of STATE_PAUSED for getSecurityCameraState().
Set initial shaderParm value regardless of whether powerOn is true.
Dragofer

Dragofer

10.02.2021 10:49

developer   ~0013673

Last edited: 10.02.2021 10:50

View 2 revisions

Rev 9116
Rev 16147
Add "alarm_interval" spawnarg. Move handling of "skin_broken" from the scriptobject to the code, where the other skins are handled. Switch new spotlight material to use the new projection image.
Dragofer

Dragofer

11.02.2021 07:33

developer   ~0013674

Last edited: 11.02.2021 08:00

View 4 revisions

Rev 9117
Refactor sparks system in order to resolve sync/visibility issues:
Stop spawning and deleting a func_emitter. Instead, create the func_emitter once, then refresh it by using the cycleTrigger property.
No longer trigger the sparks effect in the same frame the camera is destroyed.

Rev 16149
Create a new single-cycle version of the sparks particle.
Dragofer

Dragofer

13.02.2021 10:04

developer   ~0013678

Rev 9120
Don't play fx_destroyed if camera has already been destroyed.

Rev 16150
More work on entity setup:
- Play spark fx when the camera is damaged or destroyed.
- Document fx spawnargs in the entityDefs.
- Adjust health: direct hit from fire arrow or 4-5 broadheads required.
- Assign descriptions and folders to sub-entities.
- Changed "snd_death" from "glass_bullethole" to "sizzle.
- Gear scriptobjects shutdown if their camera is destroyed.
Dragofer

Dragofer

14.02.2021 09:11

developer   ~0013679

Rev 9121
Rev 16152
Post-destruction sparks particle system has been made customisable. Most important new spawnargs: "sparks_periodic" and "sparks_power_dependent", which can be combined in various ways to achieve various behaviours.
Dragofer

Dragofer

14.02.2021 12:51

developer   ~0013680

Rev 9125
Rev 16156
Rename the spawnarg "sweepSpeed" to "sweepTime" to match what is done with it in the code.
Include a compatibility check for old cameras that still have "sweepSpeed" spawnargs.
Dragofer

Dragofer

14.02.2021 13:24

developer   ~0013681

Last edited: 14.02.2021 15:19

View 2 revisions

Rev 9126
Make sure all new variables are saved.
Stop storing skins as variables because of problems loading them from saves.

Rev 16157
Commit modified .exe for up to rev 9126.
Dragofer

Dragofer

15.02.2021 09:34

developer   ~0013685

Last edited: 15.02.2021 09:51

View 2 revisions

Rev 16160
Make sure the old security camera assets are compatible with all features of the security camera code.
Use Blender to make the old camera's shapes more circular.
Make a clipmodel for the old camera model. Only assign it to the new entity.
Let DR automatically recognise clipmodel spawnargs as spawnargs of type "model".
Rename the falloff gradient image to avoid conflict with Volta's version.

Rev 9128
Rev 16161
Introduce spawnarg "skin_on" for the on skin. "skin" is now only for in-editor display, like with lamps.
Dragofer

Dragofer

15.02.2021 11:37

developer   ~0013686

Last edited: 15.02.2021 13:00

View 2 revisions

Rev 16162
Make prefabs of cameras using display screens and buttons to toggle power and individual functions.
Follow wiki instructions to make 9 new camera materials so mappers can have up to 10 display screens in a map without having to figure out the map keyword.
Reexport wall mount model without caulk surfaces.
Flip camera GUI editor images horizontally to help mappers apply them correctly.

Rev 16163
Moveable versions of security cameras.
Dragofer

Dragofer

16.02.2021 13:35

developer   ~0013689

Rev 9130
Rev 16166
Add cameraFovX and cameraFovY spawnargs to entity.cpp, next to the existing cameraTarget spawnarg.
Let security cameras modify these properties on their cameraTarget.
This sets the fov of camera GUIs that are showing that entity's view.

Rev 16167
Update security camera prefabs with better understanding of cameraTarget and the addition of cameraFovX and cameraFovY spawnargs.

Rev 16168
Move all security camera and automaton prefabs to ai/machines.
Also add a prefab for an automaton linked to a display screen.
Dragofer

Dragofer

17.02.2021 08:40

developer   ~0013697

Last edited: 17.02.2021 08:57

View 2 revisions

Rev 9132
Rev 16170
Allow mappers to use an existing spotlight with new spawnarg "spotlight_custom". Only accepts valid idLight entities. Otherwise spawns a spotlight.
Rename new spawnarg "start_on" to "start_off" to match how it works with light entities.
Move initial SetAngles(0, 0, 0) on spawned spotlights from scriptobject to code.

Rev 16171
Let Epifire's camera use solid materials, just like grayman's camera. The code makes them all nonsolid anyway, so they rely on their clipmodels.
Dragofer

Dragofer

17.02.2021 09:54

developer   ~0013698

Last edited: 17.02.2021 10:17

View 3 revisions

Rev 9133
Rev 16172
If spotlight_diameter is set to 0, automatically calculate it to match spotlight_range and scanFov. Limited to scanFov up to 90°, since any wider starts getting ridiculous.
Default value for spotlight_diameter is now 0.

Rev 9134
Rev 16173
Add spawnarg "sight_threshold" to allow mappers to specify how lit up the lightgem has to be for the security camera to detect him.
Dragofer

Dragofer

17.02.2021 11:38

developer   ~0013699

Rev 9135
Add new spawnargs to play a spark-free version of the fx when power is off.
Add new snd_death_nopower spawnarg for when camera is destroyed while power is off.
Make camera invincible when health is 0, as originally intended.

Rev 16174
Add new "metal_damage" fx for better damage/destruction effects.
Slightly increase default health to require 4 broadhead shots to destroy.
Dragofer

Dragofer

19.02.2021 14:56

developer   ~0013706

Rev 9136
Rev 16175
Security camera can now follow the player when sighted, using spawnargs "follow" and "follow_tolerance". Currently this is silent.
Switch sweep time variables from int to float to get enough precision.
Initial skins were not set correctly after renaming "skin" to "skin_on".
Dragofer

Dragofer

21.02.2021 07:52

developer   ~0013708

Last edited: 21.02.2021 07:56

View 3 revisions

Rev 9143
Rev 16176
Camera can now also track the player in the vertical axis (pitch), in addition to the horizontal axis (yaw). The main new spawnarg is "follow_incline", which is enabled for the ceiling-mounted camera. The two rotation types occur independently of each other.
Ceiling pivot has received a scriptobject so that it follows the camera's horizontal, but not vertical rotations
Rotation speed can be increased while tracking the player with spawnarg "follow_speed_mult".
Dragofer

Dragofer

22.02.2021 18:26

developer   ~0013717

Last edited: 22.02.2021 18:54

View 2 revisions

Rev 9145
Rev 16178
Alarm no longer expires if the camera sees or recently saw the player (1/2 * alarm_duration seconds ago).
Rename spawnarg "wait" to "alarm_duration".
Simplify the Think() method a little.

Rev 9146
When returning to regular activity, synchronise the sweep and incline times to whichever is longer.
Dragofer

Dragofer

23.02.2021 09:38

developer   ~0013721

Rev 9149
Rev 16179
Ability to limit how far the camera can incline upwards or downwards from its starting orientation with "follow_incline_max_up" and "follow_incline_max_down" when tracking the player.
Thus enable "follow_incline" for Epifire's wall-mounted camera.
Old security camera's glass is no longer coloured when destroyed
Added an editor image for Epifire's security camera material.
Dragofer

Dragofer

23.02.2021 10:56

developer   ~0013722

Rev 9150
Rev 16180
Allow control over when the camera triggers its targets with spawnargs "trigger_alarm_start" and "trigger_alarm_end".
Also allow to set "break_up_target" in addition to "break_up_script", to be triggered when destroyed.
Dragofer

Dragofer

23.02.2021 16:45

developer   ~0013723

Last edited: 23.02.2021 16:50

View 2 revisions

Rev 9151
Add new script event for toggling player detection.
Add new script events for getting and setting health of the camera. Setting health to <= 0 will destroy it with fx.
Add new script event for setting the sight threshold of the camera.
Script event toggle_sweep() can now be called multiple times in one sweep without breaking sweep parameters.
Script event toggle_sweep() can now also disable following.
Rename alarm_duration to alertDuration internally.

Rev 16181
The scriptobject now calls the script event for toggling player detection, rather than setting the spawnarg "canSee". Internally the code still monitors the "canSee" spawnarg.
Remove empty ::init() and ::break_up() members from the scriptobject.
Add light effect to metal damage fx. Remove broken light effect from existing sparks fx.
Committed .exe since the scriptobject requires a new script event.
Dragofer

Dragofer

24.02.2021 13:40

developer   ~0013727

Rev 16182
Add a wallplate for the wall-mounted Epifire camera.
Add spawnarg "gear_speed" to ceiling mount for Epifire camera.
Remove a protrusion from the wall pivot model that was clipping with the head.
Add missing faces to the Epifire gear so that it can be better used as a standalone model.
Document "cameraTarget" spawnarg in the base entityDef.
Dragofer

Dragofer

28.02.2021 11:19

developer   ~0013743

Last edited: 28.02.2021 12:35

View 4 revisions

Rev 16194
Add pivot mounts for the old security camera for walls and ceilings, allowing to rotate both horizontally and vertically.
Add a compact version of the old security camera with a different origin, designed to fit into these pivot mounts.

Rev 16195
Make new gear and pivot scriptobjects compatible with custom versions.

Rev 9168
Rev 16196
Groundwork for constraining horizontal and vertical rotation.
VanishedOne

VanishedOne

28.02.2021 16:11

reporter   ~0013745

Probably out of scope, but I'll mention it in case you feel like investigating: https://github.com/TTimo/doom3.gpl/blob/master/neo/game/SecurityCamera.cpp#L516 apparently has code to turn the destroyed camera into a moveable and drop it to the ground. This was removed at some point and I've no idea why; maybe it didn't even work. But if it could be trivially brought back it might be nice as an optional feature for camera designs that suited it.
Dragofer

Dragofer

28.02.2021 18:45

developer   ~0013748

Yep this works as is, thanks for sharing that. The camera kind of pops out - should probably position it so that its collisionmodel is completely clear of anything else.
Would be especially good for something like an eyeball plant, to have it pop out of its socket.
Maybe it just didn't make it into the official release? Your link does say this is TImo's branch.
image.png (887,363 bytes)
VanishedOne

VanishedOne

28.02.2021 19:53

reporter   ~0013749

According to https://ttimo.github.io/doom3.gpl/ it's in the source as id released it, so unless the change came after the D3 SDK release (I don't fancy installing a .exe just to check some code), I've no idea. Cheers for that, anyway.
Dragofer

Dragofer

28.02.2021 21:29

developer   ~0013750

Last edited: 28.02.2021 21:31

View 2 revisions

Ah right, this segment was actually in the TDM code until grayman redesigned the whole security camera in rev 7195, where this was dropped. I assume this is because it didn’t fit too well to the original camera models.

This could be quite good if the models are designed with this in mind. Especially for something like an eyeball plant.
Dragofer

Dragofer

01.03.2021 09:02

developer   ~0013751

Last edited: 01.03.2021 10:00

View 2 revisions

Rev 9171, 9172
Security camera can now sweep 360° or more.
Dragofer

Dragofer

01.03.2021 21:01

developer   ~0013754

Last edited: 01.03.2021 21:06

View 5 revisions

Rev 9173
Rev 16199
- Reinstate code from pre-rev 7195 to “dislodge” the security camera when destroyed (turn into a moveable) and expand on it:
-- Dislodge occurs when a specified amount of negative health is surpassed. Either a) only on a large hit (fire arrow) or b) after taking enough cumulative damage.
-- Add more physics parameters and control them with spawnargs.
-- Integrate dislodging with the sparks system so sparks particle can be set not to appear if dislodged
- Adjust models & clipmodels such that the cameras have enough space to eject reliably.
- Dislodging is enabled for Epifire’s cameras by default. Could also be enabled for pivot-mounted old cameras, but not a good idea for the original old cameras.
- Pivots and gears are no longer solid, no longer absorbing projectiles like fire arrows.
- Pivots check their camera’s status more frequently to react faster in case it’s dislodged.
- Damaging the camera will now also trigger fx when it has already been destroyed.

Weaknesses currently:
- Not a true moveable. Makes no bounce sounds, can’t KO AIs, can’t be frobbed even after calling Set_Frobable(1).
- Seeing this should alert AIs.
Dragofer

Dragofer

02.03.2021 08:17

developer   ~0013755

Last edited: 02.03.2021 09:01

View 2 revisions

Rev 9174
Rev 16200
AIs become alerted if they see a destroyed security camera.

Rev 9175
Security cameras with sweepAngle over 180° properly resume their sweep after an interruption (power toggled or saw player without following him).
Dragofer

Dragofer

02.03.2021 14:16

developer   ~0013756

Last edited: 02.03.2021 23:01

View 6 revisions

Rev 9176. TDM no longer crashes at map load when a Response has been set on the security camera.

idSecurityCamera::spawn contained the following:

// SR CONTENTS_RESPONSE FIX
if( m_StimResponseColl->HasResponse() )
    physicsObj.SetContents( physicsObj.GetContents() | CONTENTS_RESPONSE );

physicsObj seems not to be initialised, so according to debug mode TDM crashes at GetContents() when a security camera with a Response is spawned.
Replacing physicsObj. with GetPhysics()-> fixes the crash and allows the security camera to Respond to stims.
physicsObj is only used in idSecurityCamera::Killed when the camera is dislodged from its mount, so it can probably be made into a local variable.

A similar problem might exist with other spawnclasses, too, since the code block above is quite common.


Rev 9177
Security camera is able to Respond to trigger stims and trigger signals.
Don't need to activate the physics object after being dislodged.

Rev 9178
Rev 16203
Now possible to frob the security camera.
Also allow to make dislodged security cameras frobable/unfrobable.

Rev 9179
Player is able to pick up a dislodged security camera.
Move "dislodge" code into its own method.
Dragofer

Dragofer

03.03.2021 09:26

developer   ~0013757

Rev 9180
Rev 16204
Transplant idMoveable::Collide to idSecurityCamera so that dislodged security cameras make sounds when colliding.
In theory they should also damage / knockout AIs, but I wasn't able to reproduce this behaviour even with existing heavy moveables.
Align physics spawnargs of security camera moveables with those of dislodged security cameras.
VanishedOne

VanishedOne

03.03.2021 14:58

reporter   ~0013758

Does it have a damage def? These spawnargs are in atdm:damage_moveable:

    "damage" "1" // scaled by mass & velocity at time of impact
    "scale_damage" "1" // scale damage before applying it
    "knockout" "1" // can cause a knockout, but mass and velocity also play a part
    "knockout_power" "0" // powered-up knockout, not used
    "push" "6"
    "kill_all" "0" // if = 1, allow the moveable to kill what it strikes
Dragofer

Dragofer

03.03.2021 19:49

developer   ~0013760

Last edited: 03.03.2021 19:54

View 2 revisions

Yeah it was missing a damage def, as well as a lot of other things that a TDM moveable requires to function, such as other code being able to recognise not only idMoveable, but also idSecurityCamera. I got it to work on my end (knocking out AIs, bounce sounds, etc.), but decided to revert it because there was simply too much non-security camera code to modify or replicate. It would be better to be replaced by a moveable and/or generate flinders.

Rev 9181
Rev 16205
Revert most of the recent dislodge-related changes, but keep the logic for when the camera decides to dislodge.
Dragofer

Dragofer

06.03.2021 09:08

developer   ~0013762

Last edited: 06.03.2021 09:44

View 3 revisions

Rev 9182
Rev 16206
Rework damage system:
- Add idSecurityCamera::Damage method for more control over what can damage the security camera:
- Add "damage_mult_" spawnargs to allow mappers to control how much swords, broadheads, fire arrows etc. can damage the security camera. Mappers can change these ingame and also specify their own damage_mult_ spawnargs for custom damage defs. By default only fire arrows can damage the camera now.
- Camera now flinderizes instead of dislodging upon taking a sufficiently large hit. Controlled by the "damage_flinderize" spawnarg. Flinders are yet to be made.
- Allow to specify a separate model and skin for when the camera is flinderized. Spawnargs: "broken_flinderized" and "skin_flinderized". The idea is to leave behind a static stump.

In idEntity:
- Add new bool m_bFlinderize (default true) to idEntity to control whether an entity flinderizes during idEntity::BecomeBroken.
- Hide broken models with "hideModelOnBreak" "1" even if a valid "broken" model has been specified. No .map or .def in core TDM or released FMs has used this spawnarg yet.
Dragofer

Dragofer

07.03.2021 10:22

developer   ~0013763

Last edited: 07.03.2021 21:12

View 5 revisions

Rev 9184
Rev 16210
Finetune damage system:
- also allow to specify custom damage_mult spawnargs for entityDefs of the inflictor
- custom damage_mult spawnargs take priority over standard damage_mult spawnargs
- let fire arrow splash damage attenuate faster
- clean up the logic

Also some tweaks to the tooltips of the security camera entityDefs in general.

Rev 9185
Add script events to set, rather than toggle, the state of the security camera as a whole ("power") and its subcomponents:
- On() and Off(), as with idLight
- state_light(boolean set)
- state_sweep(boolean set)
- state_see_player(boolean set)

The existing toggle events now call these new events to avoid code duplication.

Rev 9186
- Automatically detect whether the mapper has specified a looping sparks particle, thereby getting rid of the spawnarg "sparks_periodic". This is important for how the security camera will trigger the sparks particle (toggle on/off or cycleTrigger).
- Move the creation of the sparks particle into its own method, AddSparks, just like AddLight.

Rev 9187
Rev 16211
- Simplify the ::Damage method with some better usage of idStr/const char.
- Add new spawnarg "damage_splash_falloff" to allow mappers to modify (exponentially) how quickly splash damage decreases with distance.
Dragofer

Dragofer

08.03.2021 10:29

developer   ~0013768

Rev 9188
Rev 16212
Spawnarg "sweepSpeed" now sets speed rather than time.
Get rid of redundant spawnarg "sweepTime".
Introduce spawnarg "legacy" to mark old versions of the security camera that should still use sweepSpeed as if it was sweepTime.

Merge clipmodels with models. Old original security camera still uses a separate clipmodel.
Dragofer

Dragofer

24.04.2021 08:14

developer   ~0013901

Rev 9187
Fix use of const char and idStr in the ::Damage method, pertaining to custom spawnargs for specific damage sources.

Issue History

Date Modified Username Field Change
06.02.2021 18:38 Dragofer New Issue
06.02.2021 18:38 Dragofer Status new => assigned
06.02.2021 18:38 Dragofer Assigned To => Dragofer
06.02.2021 18:39 Dragofer Relationship added related to 0004731
06.02.2021 18:48 Dragofer Note Added: 0013660
06.02.2021 18:49 Dragofer Description Updated View Revisions
06.02.2021 18:56 Dragofer Description Updated View Revisions
07.02.2021 11:00 Dragofer Note Added: 0013663
07.02.2021 11:01 Dragofer Description Updated View Revisions
07.02.2021 11:03 Dragofer Note Edited: 0013663 View Revisions
07.02.2021 11:05 Dragofer Note Edited: 0013660 View Revisions
07.02.2021 13:02 Dragofer Description Updated View Revisions
07.02.2021 13:02 Dragofer Description Updated View Revisions
07.02.2021 15:06 Dragofer Description Updated View Revisions
08.02.2021 09:14 Dragofer Description Updated View Revisions
08.02.2021 09:17 Dragofer Note Added: 0013666
08.02.2021 09:20 Dragofer Note Edited: 0013666 View Revisions
08.02.2021 10:28 Dragofer Description Updated View Revisions
08.02.2021 11:29 Dragofer Description Updated View Revisions
08.02.2021 11:29 Dragofer Note Added: 0013667
08.02.2021 18:30 Dragofer Description Updated View Revisions
09.02.2021 09:38 Dragofer Note Added: 0013669
09.02.2021 09:39 Dragofer Description Updated View Revisions
09.02.2021 11:51 Dragofer Description Updated View Revisions
09.02.2021 12:30 Dragofer Relationship added parent of 0005529
09.02.2021 12:32 Dragofer Description Updated View Revisions
09.02.2021 22:07 Dragofer Relationship added parent of 0005531
10.02.2021 09:44 Dragofer Description Updated View Revisions
10.02.2021 09:45 Dragofer Description Updated View Revisions
10.02.2021 09:45 Dragofer Description Updated View Revisions
10.02.2021 10:49 Dragofer Note Added: 0013673
10.02.2021 10:50 Dragofer Note Edited: 0013673 View Revisions
10.02.2021 10:51 Dragofer Description Updated View Revisions
10.02.2021 10:51 Dragofer Description Updated View Revisions
10.02.2021 11:20 Dragofer Description Updated View Revisions
11.02.2021 07:33 Dragofer Note Added: 0013674
11.02.2021 07:33 Dragofer Description Updated View Revisions
11.02.2021 07:34 Dragofer Note Edited: 0013674 View Revisions
11.02.2021 08:00 Dragofer Note Edited: 0013674 View Revisions
11.02.2021 08:00 Dragofer Note Edited: 0013674 View Revisions
11.02.2021 09:07 Dragofer Description Updated View Revisions
11.02.2021 11:45 Dragofer Description Updated View Revisions
11.02.2021 11:47 Dragofer Description Updated View Revisions
11.02.2021 15:00 Dragofer Description Updated View Revisions
11.02.2021 15:01 Dragofer Description Updated View Revisions
11.02.2021 15:54 Dragofer Description Updated View Revisions
11.02.2021 15:58 Dragofer Description Updated View Revisions
13.02.2021 10:04 Dragofer Note Added: 0013678
13.02.2021 10:10 Dragofer Description Updated View Revisions
13.02.2021 10:42 Dragofer Description Updated View Revisions
13.02.2021 12:23 Dragofer Description Updated View Revisions
13.02.2021 13:31 Dragofer Description Updated View Revisions
13.02.2021 14:58 Dragofer Description Updated View Revisions
13.02.2021 16:35 Dragofer Description Updated View Revisions
13.02.2021 19:24 Dragofer Description Updated View Revisions
13.02.2021 23:23 Dragofer Description Updated View Revisions
13.02.2021 23:33 Dragofer Description Updated View Revisions
14.02.2021 09:11 Dragofer Note Added: 0013679
14.02.2021 09:37 Dragofer Description Updated View Revisions
14.02.2021 10:18 Dragofer Description Updated View Revisions
14.02.2021 10:37 Dragofer Description Updated View Revisions
14.02.2021 12:50 Dragofer Description Updated View Revisions
14.02.2021 12:51 Dragofer Note Added: 0013680
14.02.2021 13:24 Dragofer Note Added: 0013681
14.02.2021 13:25 Dragofer Description Updated View Revisions
14.02.2021 13:26 Dragofer Description Updated View Revisions
14.02.2021 15:19 Dragofer Note Edited: 0013681 View Revisions
14.02.2021 17:45 Dragofer Description Updated View Revisions
14.02.2021 17:57 Dragofer Description Updated View Revisions
15.02.2021 08:42 Dragofer Description Updated View Revisions
15.02.2021 09:34 Dragofer Note Added: 0013685
15.02.2021 09:35 Dragofer Description Updated View Revisions
15.02.2021 09:50 Dragofer Description Updated View Revisions
15.02.2021 09:51 Dragofer Note Edited: 0013685 View Revisions
15.02.2021 11:37 Dragofer Note Added: 0013686
15.02.2021 11:39 Dragofer Description Updated View Revisions
15.02.2021 13:00 Dragofer Note Edited: 0013686 View Revisions
15.02.2021 13:01 Dragofer Description Updated View Revisions
15.02.2021 17:23 Dragofer Description Updated View Revisions
16.02.2021 13:35 Dragofer Note Added: 0013689
16.02.2021 13:37 Dragofer Description Updated View Revisions
17.02.2021 08:40 Dragofer Note Added: 0013697
17.02.2021 08:41 Dragofer Description Updated View Revisions
17.02.2021 08:57 Dragofer Note Edited: 0013697 View Revisions
17.02.2021 08:58 Dragofer Description Updated View Revisions
17.02.2021 08:58 Dragofer Description Updated View Revisions
17.02.2021 09:11 Dragofer Description Updated View Revisions
17.02.2021 09:16 Dragofer Description Updated View Revisions
17.02.2021 09:54 Dragofer Note Added: 0013698
17.02.2021 09:55 Dragofer Description Updated View Revisions
17.02.2021 10:03 Dragofer Note Edited: 0013698 View Revisions
17.02.2021 10:17 Dragofer Note Edited: 0013698 View Revisions
17.02.2021 10:18 Dragofer Description Updated View Revisions
17.02.2021 10:20 Dragofer Description Updated View Revisions
17.02.2021 11:38 Dragofer Note Added: 0013699
17.02.2021 11:38 Dragofer Description Updated View Revisions
17.02.2021 11:39 Dragofer Description Updated View Revisions
17.02.2021 14:34 Dragofer Description Updated View Revisions
18.02.2021 11:24 Dragofer Description Updated View Revisions
18.02.2021 12:49 Dragofer Description Updated View Revisions
18.02.2021 12:53 Dragofer Description Updated View Revisions
18.02.2021 13:09 Dragofer Description Updated View Revisions
18.02.2021 13:16 Dragofer Description Updated View Revisions
18.02.2021 13:16 Dragofer Description Updated View Revisions
18.02.2021 13:32 Dragofer Description Updated View Revisions
18.02.2021 13:54 Dragofer Description Updated View Revisions
18.02.2021 13:55 Dragofer Description Updated View Revisions
18.02.2021 13:56 Dragofer Description Updated View Revisions
18.02.2021 13:56 Dragofer Description Updated View Revisions
18.02.2021 16:54 Dragofer Description Updated View Revisions
18.02.2021 16:55 Dragofer Description Updated View Revisions
18.02.2021 17:11 Dragofer Description Updated View Revisions
18.02.2021 21:14 Dragofer Description Updated View Revisions
19.02.2021 14:56 Dragofer Note Added: 0013706
19.02.2021 14:57 Dragofer Description Updated View Revisions
19.02.2021 14:58 Dragofer Description Updated View Revisions
19.02.2021 17:16 Dragofer Description Updated View Revisions
19.02.2021 17:21 Dragofer Description Updated View Revisions
19.02.2021 17:25 Dragofer Description Updated View Revisions
19.02.2021 17:32 Dragofer Description Updated View Revisions
19.02.2021 18:25 Dragofer Description Updated View Revisions
19.02.2021 18:44 Dragofer Description Updated View Revisions
19.02.2021 21:01 Dragofer Description Updated View Revisions
19.02.2021 21:04 Dragofer Description Updated View Revisions
19.02.2021 21:04 Dragofer Description Updated View Revisions
19.02.2021 22:31 Dragofer Description Updated View Revisions
21.02.2021 07:52 Dragofer Note Added: 0013708
21.02.2021 07:53 Dragofer Description Updated View Revisions
21.02.2021 07:53 Dragofer Note Edited: 0013708 View Revisions
21.02.2021 07:55 Dragofer Description Updated View Revisions
21.02.2021 07:56 Dragofer Note Edited: 0013708 View Revisions
21.02.2021 09:10 Dragofer Description Updated View Revisions
21.02.2021 09:29 Dragofer Description Updated View Revisions
21.02.2021 10:54 Dragofer Relationship added related to 0004615
21.02.2021 10:55 Dragofer Relationship added related to 0005485
22.02.2021 18:26 Dragofer Note Added: 0013717
22.02.2021 18:54 Dragofer Note Edited: 0013717 View Revisions
22.02.2021 18:56 Dragofer Description Updated View Revisions
22.02.2021 19:47 Dragofer Description Updated View Revisions
22.02.2021 19:49 Dragofer Description Updated View Revisions
22.02.2021 22:14 Dragofer Description Updated View Revisions
23.02.2021 09:38 Dragofer Note Added: 0013721
23.02.2021 09:39 Dragofer Description Updated View Revisions
23.02.2021 10:56 Dragofer Note Added: 0013722
23.02.2021 10:56 Dragofer Description Updated View Revisions
23.02.2021 13:07 Dragofer Description Updated View Revisions
23.02.2021 16:45 Dragofer Note Added: 0013723
23.02.2021 16:47 Dragofer Description Updated View Revisions
23.02.2021 16:50 Dragofer Note Edited: 0013723 View Revisions
23.02.2021 17:03 Dragofer Description Updated View Revisions
24.02.2021 11:38 Dragofer Description Updated View Revisions
24.02.2021 11:39 Dragofer Description Updated View Revisions
24.02.2021 13:40 Dragofer Note Added: 0013727
24.02.2021 13:41 Dragofer Description Updated View Revisions
24.02.2021 14:37 Dragofer Description Updated View Revisions
24.02.2021 14:38 Dragofer Description Updated View Revisions
28.02.2021 11:19 Dragofer Note Added: 0013743
28.02.2021 11:23 Dragofer Note Edited: 0013743 View Revisions
28.02.2021 11:23 Dragofer Description Updated View Revisions
28.02.2021 12:32 Dragofer Note Edited: 0013743 View Revisions
28.02.2021 12:35 Dragofer Note Edited: 0013743 View Revisions
28.02.2021 16:11 VanishedOne Note Added: 0013745
28.02.2021 18:45 Dragofer Note Added: 0013748
28.02.2021 18:45 Dragofer File Added: image.png
28.02.2021 19:53 VanishedOne Note Added: 0013749
28.02.2021 21:29 Dragofer Note Added: 0013750
28.02.2021 21:31 Dragofer Note Edited: 0013750 View Revisions
01.03.2021 09:02 Dragofer Note Added: 0013751
01.03.2021 10:00 Dragofer Note Edited: 0013751 View Revisions
01.03.2021 10:01 Dragofer Description Updated View Revisions
01.03.2021 12:22 Dragofer Description Updated View Revisions
01.03.2021 12:24 Dragofer Description Updated View Revisions
01.03.2021 12:25 Dragofer Description Updated View Revisions
01.03.2021 15:51 Dragofer Description Updated View Revisions
01.03.2021 21:01 Dragofer Note Added: 0013754
01.03.2021 21:02 Dragofer Note Edited: 0013754 View Revisions
01.03.2021 21:03 Dragofer Note Edited: 0013754 View Revisions
01.03.2021 21:03 Dragofer Description Updated View Revisions
01.03.2021 21:05 Dragofer Note Edited: 0013754 View Revisions
01.03.2021 21:06 Dragofer Note Edited: 0013754 View Revisions
01.03.2021 21:16 Dragofer Description Updated View Revisions
01.03.2021 21:19 Dragofer Description Updated View Revisions
02.03.2021 08:17 Dragofer Note Added: 0013755
02.03.2021 08:18 Dragofer Description Updated View Revisions
02.03.2021 09:01 Dragofer Note Edited: 0013755 View Revisions
02.03.2021 09:02 Dragofer Description Updated View Revisions
02.03.2021 09:43 Dragofer Description Updated View Revisions
02.03.2021 10:48 Dragofer Description Updated View Revisions
02.03.2021 13:35 Dragofer Description Updated View Revisions
02.03.2021 13:37 Dragofer Description Updated View Revisions
02.03.2021 14:16 Dragofer Note Added: 0013756
02.03.2021 14:17 Dragofer Description Updated View Revisions
02.03.2021 14:17 Dragofer Description Updated View Revisions
02.03.2021 14:17 Dragofer Description Updated View Revisions
02.03.2021 14:39 Dragofer Note Edited: 0013756 View Revisions
02.03.2021 17:28 Dragofer Description Updated View Revisions
02.03.2021 17:31 Dragofer Note Edited: 0013756 View Revisions
02.03.2021 19:48 Dragofer Note Edited: 0013756 View Revisions
02.03.2021 19:50 Dragofer Description Updated View Revisions
02.03.2021 19:50 Dragofer Description Updated View Revisions
02.03.2021 19:51 Dragofer Description Updated View Revisions
02.03.2021 19:54 Dragofer Note Edited: 0013756 View Revisions
02.03.2021 22:41 Dragofer Description Updated View Revisions
02.03.2021 22:59 Dragofer Note View State: 0013756: private
02.03.2021 23:00 Dragofer Note View State: 0013756: public
02.03.2021 23:01 Dragofer Note Edited: 0013756 View Revisions
02.03.2021 23:01 Dragofer Description Updated View Revisions
03.03.2021 09:26 Dragofer Note Added: 0013757
03.03.2021 09:27 Dragofer Description Updated View Revisions
03.03.2021 14:58 VanishedOne Note Added: 0013758
03.03.2021 19:49 Dragofer Note Added: 0013760
03.03.2021 19:51 Dragofer Description Updated View Revisions
03.03.2021 19:54 Dragofer Note Edited: 0013760 View Revisions
05.03.2021 07:28 Dragofer Description Updated View Revisions
05.03.2021 11:34 Dragofer Description Updated View Revisions
05.03.2021 13:58 Dragofer Description Updated View Revisions
06.03.2021 09:08 Dragofer Note Added: 0013762
06.03.2021 09:11 Dragofer Note Edited: 0013762 View Revisions
06.03.2021 09:44 Dragofer Note Edited: 0013762 View Revisions
06.03.2021 10:32 Dragofer Description Updated View Revisions
06.03.2021 15:58 Dragofer Description Updated View Revisions
06.03.2021 16:00 Dragofer Description Updated View Revisions
06.03.2021 16:28 Dragofer Description Updated View Revisions
06.03.2021 16:31 Dragofer Description Updated View Revisions
06.03.2021 16:44 Dragofer Description Updated View Revisions
06.03.2021 16:55 Dragofer Description Updated View Revisions
07.03.2021 10:22 Dragofer Note Added: 0013763
07.03.2021 10:36 Dragofer Description Updated View Revisions
07.03.2021 14:12 Dragofer Note Edited: 0013763 View Revisions
07.03.2021 14:13 Dragofer Description Updated View Revisions
07.03.2021 20:26 Dragofer Note Edited: 0013763 View Revisions
07.03.2021 20:29 Dragofer Description Updated View Revisions
07.03.2021 20:32 Dragofer Note Edited: 0013763 View Revisions
07.03.2021 21:12 Dragofer Note Edited: 0013763 View Revisions
07.03.2021 21:13 Dragofer Description Updated View Revisions
07.03.2021 23:03 Dragofer Description Updated View Revisions
07.03.2021 23:04 Dragofer Description Updated View Revisions
08.03.2021 10:29 Dragofer Note Added: 0013768
08.03.2021 10:29 Dragofer Description Updated View Revisions
08.03.2021 23:57 Dragofer Description Updated View Revisions
24.04.2021 07:55 Dragofer Description Updated View Revisions
24.04.2021 08:13 Dragofer Description Updated View Revisions
24.04.2021 08:14 Dragofer Note Added: 0013901