idTech4 engine has used on Doom 3 already had a destructible entity system for the destructible barrels, was that removed?
In Doom3 you can create debris entities and they become physics entities, never heard of this "flinder" stuff so I assume is a new TDM entity type.
Don't know if this is useful for TDM, if not ignore, but who knows could give some hints.
This was how I created a simple destructible wood barrel in Doom 3 engine.
First I defined the broken debris peace's: (yes they are individual entities and models)
entityDef debris_woodbarrel_1 {
"spawnclass" "idDebris"
"mins" "-3 -3 -3"
"maxs" "3 3 3"
"model" "models/maps/temple/mapobj/pipo broken/pipo_debri_1.lwo"
//"skin" "skins/exp_barrel_red"
"health" "0" // amount of damage projectile can take if damaged (0 means it can't be destroyed)
"velocity" "1 1 450" // how fast the projectile leaves the gun (or distance if fuse is 0)
"random_velocity" "1"
"angular_velocity" "105 215 10" // how the projectile is rotating when it leaves the gun
"thrust" "0" // the rate of acceleration (always in the direction of the projectiles model)
"thrust_start" "0" // when to start accelerating
"thrust_end" "0" // when to stop accelerating
"linear_friction" "1.0" // "air" friction
"angular_friction" "0.1"
"contact_friction" "0.9"
"bounce" "0.1" // how much speed a projectile retains when it bounces off of objects (coefficient of restitution). 0 means no bounce.
"mass" "50"
"gravity" "1066" // how much gravity affects the trajectory. gravity direction is same as the entity that fired it.
"fuse" "10" // how long before the projectile is removed or self-detonates. Use 0 for beam weapons (velocity == distance).
"detonate_on_fuse" "1" // whether projectile should detonate when it's fuse runs out
"detonate_on_death" "0" // whether projectile should detonate when it's "killed" (health runs out)
"detonate_on_world" "0" // whether projectile should detonate when it hits an obstacle
"detonate_on_actor" "0" // whether projectile should detonate when it hits a character in the game
"smoke_fly" "debristrail.prt" // particle effect while in the air
"snd_bounce" "tray_impact"
// parametric particles -- temp
"model_detonate" ""
"smoke_detonate" "" // particle effect when detonates
"smoke_fuse" ""
"smoke_bounce" ""
}
entityDef debris_woodbarrel_2 {
...
}
etc,
then I define the main entity:
entityDef moveable_woodbarrel {
"editor_color" "0 .5 .8"
"editor_mins" "-16 -16 0"
"editor_maxs" "16 16 48"
"editor_rotatable" "1"
"editor_usage" "Moveable woodbarrel. Works just like a func_moveable. However the barrel"
"editor_usage1" "has special handling to make it appear more round. This version also explodes when damaged enough."
"editor_usage2" "Only add model, model_detonate or model_burn or health to override defaults"
"editor_var burn" "number of seconds to burn before exploding."
"editor_model model_damage" "model to leave as damaged base"
"editor_model model_detonate" "ips model to switch to for explosion."
"editor_model model_burn" "ips model to show when on fire."
"editor_var def_debris" "add as many as you like, debris1, debris2, etc.. "
"editor_var health" "how much health the barrel has, default is 5. If burn is set to 1, the health is effectively doubled so you have to kill it twice to get the explosion"
"editor_var respawn" "if non zero the number of seconds to respawn after killed"
"editor_var respawn_range" "no player in distance range to actually respawn - default 256"
"editor_var respawn_again" "try again in seconds if player in range - default 10"
"editor_var triggerTargets" "if set to 1 will trigger targets after being killed"
"editor_mat mtr_lightExplode" "light shader to use for explosion"
"editor_mat mtr_lightBurn" "light shader to use for burning"
"spawnclass" "idExplodingBarrel"
"density" "0.02"
"friction" "0.2"
"bouncyness" "0.4"
"def_splash_damage" "damage_moverCrush"
"ignore_player" "1"
"model" "models/maps/temple/mapobj/pipo.lwo"
"def_debris" "debris_woodbarrel_1"
"def_debris1" "debris_woodbarrel_2"
"def_debris2" "debris_woodbarrel_3"
"def_debris3" "debris_woodbarrel_4"
"def_debris4" "debris_woodbarrel_5"
"def_debris5" "debris_woodbarrel_6"
"def_debris6" "debris_woodbarrel_7"
"def_debris7" "debris_woodbarrel_8"
"def_debris8" "debris_woodbarrel_9"
"health" "35"
"snd_explode" "wood_barrel_breaking"
"snd_bounce" "woodimpact"
}
This was the effect:
https://drive.google.com/file/d/1lsXwNssxp-QO3MZKOmUiBd1DWhd0V7HY/view?usp=sharing
Hope this helps.