Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
breakable.qc File Reference
Include dependency graph for breakable.qc:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void func_breakable_behave_destroyed (entity this)
void func_breakable_behave_restore (entity this)
void func_breakable_colormod (entity this)
void func_breakable_damage (entity this, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force)
void func_breakable_destroy (entity this, entity actor, entity trigger)
void func_breakable_destroy_self (entity this)
void func_breakable_destroyed (entity this)
void func_breakable_init_for_player (entity this, entity player)
void func_breakable_look_destroyed (entity this)
void func_breakable_look_restore (entity this)
void func_breakable_reset (entity this)
void func_breakable_restore (entity this, entity actor, entity trigger)
void func_breakable_restore_self (entity this)
void func_breakable_setup (entity this)
void func_breakable_think (entity this)
void LaunchDebris (entity this, string debrisname, vector force)
 spawnfunc (func_breakable)
 spawnfunc (misc_breakablemodel)

Variables

string debris
vector debrisavelocityjitter
float debrisdamageforcescale
float debrisfadetime
vector debrisforce
float debrismovetype
float debrisskin
float debrissolid
float debristime
float debristimejitter
vector debrisvelocity
vector debrisvelocityjitter
float dmg
float dmg_edge
float dmg_force
float dmg_radius
string mdl_dead
entity sprite

Function Documentation

◆ func_breakable_behave_destroyed()

void func_breakable_behave_destroyed ( entity this)

Definition at line 133 of file breakable.qc.

134{
135 SetResourceExplicit(this, RES_HEALTH, this.max_health);
136 this.takedamage = DAMAGE_NO;
137 if(this.bot_attack)
139 this.bot_attack = false;
140 this.event_damage = func_null;
141 this.state = STATE_BROKEN;
143 this.use = func_null;
145 if (this.noise1)
147
148 IL_EACH(g_projectiles, it.classname == "grapplinghook" && it.aiment == this,
149 {
150 RemoveHook(it);
151 });
152}
float bot_attack
Definition api.qh:38
IntrusiveList g_bot_targets
Definition api.qh:149
void func_breakable_colormod(entity this)
Definition breakable.qc:81
const int BREAKABLE_NODAMAGE
Definition breakable.qh:5
const int STATE_BROKEN
Definition breakable.qh:8
float max_health
bool SetResourceExplicit(entity e, Resource res_type, float amount)
Sets the resource amount of an entity without calling any hooks.
int spawnflags
Definition ammo.qh:15
#define use
int state
ERASEABLE void IL_REMOVE(IntrusiveList this, entity it)
Remove any element, anywhere in the list.
#define IL_EACH(this, cond, body)
var void func_null()
IntrusiveList g_projectiles
Definition common.qh:58
const int CH_TRIGGER_SINGLE
Definition sound.qh:13
void stopsound(entity e, int chan)
Definition all.qc:109
string noise1
Definition subs.qh:83
const int DAMAGE_NO
Definition subs.qh:79
float takedamage
Definition subs.qh:78

References bot_attack, BREAKABLE_NODAMAGE, CH_TRIGGER_SINGLE, DAMAGE_NO, entity(), func_breakable_colormod(), func_null(), g_bot_targets, g_projectiles, IL_EACH, IL_REMOVE(), max_health, noise1, SetResourceExplicit(), spawnflags, state, STATE_BROKEN, stopsound(), takedamage, and use.

Referenced by func_breakable_destroyed(), and func_breakable_reset().

◆ func_breakable_behave_restore()

void func_breakable_behave_restore ( entity this)

Definition at line 161 of file breakable.qc.

162{
163 SetResourceExplicit(this, RES_HEALTH, this.max_health);
164 if(this.sprite)
165 {
167 WaypointSprite_UpdateHealth(this.sprite, GetResource(this, RES_HEALTH));
168 }
169 if(!(this.spawnflags & BREAKABLE_NODAMAGE))
170 {
171 this.takedamage = DAMAGE_AIM;
172 if(!this.bot_attack)
173 IL_PUSH(g_bot_targets, this);
174 this.bot_attack = true;
175 this.event_damage = func_breakable_damage;
176 }
178 this.use = func_breakable_destroy; // don't need to set it usually, as .use isn't reset
179 this.state = STATE_ALIVE;
180 //this.nextthink = 0; // cancel auto respawn
182 this.nextthink = time + 0.1;
184 if (this.noise1)
186}
void func_breakable_damage(entity this, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force)
Definition breakable.qc:267
void func_breakable_destroy(entity this, entity actor, entity trigger)
Definition breakable.qc:225
void func_breakable_think(entity this)
Definition breakable.qc:154
const int STATE_ALIVE
Definition breakable.qh:7
float GetResource(entity e, Resource res_type)
Returns the current amount of resource the given entity has.
float time
float nextthink
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
#define setthink(e, f)
const float VOL_BASE
Definition sound.qh:36
#define _sound(e, c, s, v, a)
Definition sound.qh:43
const float ATTEN_NORM
Definition sound.qh:30
const int DAMAGE_AIM
Definition subs.qh:81
entity sprite
Definition sv_assault.qc:11
void WaypointSprite_UpdateMaxHealth(entity e, float f)
void WaypointSprite_UpdateHealth(entity e, float f)

References _sound, ATTEN_NORM, bot_attack, BREAKABLE_NODAMAGE, CH_TRIGGER_SINGLE, DAMAGE_AIM, entity(), func_breakable_colormod(), func_breakable_damage(), func_breakable_destroy(), func_breakable_think(), g_bot_targets, GetResource(), IL_PUSH(), max_health, nextthink, noise1, SetResourceExplicit(), setthink, spawnflags, sprite, state, STATE_ALIVE, takedamage, time, use, VOL_BASE, WaypointSprite_UpdateHealth(), and WaypointSprite_UpdateMaxHealth().

Referenced by func_breakable_reset(), and func_breakable_restore().

◆ func_breakable_colormod()

void func_breakable_colormod ( entity this)

Definition at line 81 of file breakable.qc.

82{
83 float h;
85 return;
86 h = GetResource(this, RES_HEALTH) / this.max_health;
87 if(h < 0.25)
88 this.colormod = '1 0 0';
89 else if(h <= 0.75)
90 this.colormod = '1 0 0' + '0 1 0' * (2 * h - 0.5);
91 else
92 this.colormod = '1 1 1';
93}
const int BREAKABLE_INDICATE_DAMAGE
Definition breakable.qh:4
vector colormod
Definition powerups.qc:21

References BREAKABLE_INDICATE_DAMAGE, colormod, entity(), GetResource(), max_health, and spawnflags.

Referenced by destructible_heal(), func_breakable_behave_destroyed(), func_breakable_behave_restore(), and func_breakable_damage().

◆ func_breakable_damage()

void func_breakable_damage ( entity this,
entity inflictor,
entity attacker,
float damage,
int deathtype,
.entity weaponentity,
vector hitloc,
vector force )

Definition at line 267 of file breakable.qc.

268{
269 if(this.state == STATE_BROKEN)
270 return;
271 if(this.spawnflags & NOSPLASH)
272 if(!(DEATH_ISSPECIAL(deathtype)) && (deathtype & HITTYPE_SPLASH))
273 return;
274 if(this.team)
275 if(attacker.team == this.team)
276 return;
277 this.pain_finished = time;
278 TakeResource(this, RES_HEALTH, damage);
279 if(this.sprite)
280 {
282 WaypointSprite_UpdateHealth(this.sprite, GetResource(this, RES_HEALTH));
283 }
285
286 if(GetResource(this, RES_HEALTH) <= 0)
287 {
288 debrisforce = force;
289
290 this.takedamage = DAMAGE_NO;
291 this.event_damage = func_null;
292
293 if(IS_CLIENT(attacker)) //&& this.classname == "func_assault_destructible")
294 {
295 this.owner = attacker;
296 this.realowner = attacker;
297 }
298
299 // do not explode NOW but in the NEXT FRAME!
300 // because recursive calls to RadiusDamage are not allowed
301 this.nextthink = time;
304 }
305}
vector debrisforce
Definition breakable.qc:224
void func_breakable_destroy_self(entity this)
Definition breakable.qc:262
float pain_finished
void TakeResource(entity receiver, Resource res_type, float amount)
Takes an entity some resource.
entity owner
Definition main.qh:87
int team
Definition main.qh:188
#define IS_CLIENT(s)
Definition player.qh:242
#define CSQCMODEL_AUTOUPDATE(e)
#define DEATH_ISSPECIAL(t)
Definition all.qh:39
const int HITTYPE_SPLASH
Definition all.qh:30
const int NOSPLASH
Definition defs.qh:12
entity realowner
void WaypointSprite_Ping(entity e)

References CSQCMODEL_AUTOUPDATE, DAMAGE_NO, DEATH_ISSPECIAL, debrisforce, entity(), func_breakable_colormod(), func_breakable_destroy_self(), func_null(), GetResource(), HITTYPE_SPLASH, IS_CLIENT, nextthink, NOSPLASH, owner, pain_finished, realowner, setthink, spawnflags, sprite, state, STATE_BROKEN, takedamage, TakeResource(), team, time, vector, WaypointSprite_Ping(), and WaypointSprite_UpdateHealth().

Referenced by func_breakable_behave_restore().

◆ func_breakable_destroy()

void func_breakable_destroy ( entity this,
entity actor,
entity trigger )

Definition at line 225 of file breakable.qc.

226{
227 float n, i;
228 string oldmsg;
229
230 entity act = this.owner;
231 this.owner = NULL; // set by W_PrepareExplosionByDamage
232
233 // now throw around the debris
234 n = tokenize_console(this.debris);
235 for(i = 0; i < n; ++i)
236 LaunchDebris(this, argv(i), debrisforce);
237
239
240 if(this.noise)
241 _sound (this, CH_TRIGGER, this.noise, VOL_BASE, ATTEN_NORM);
242
243 if(this.dmg)
244 RadiusDamage(this, act, this.dmg, this.dmg_edge, this.dmg_radius, this, NULL, this.dmg_force, DEATH_HURTTRIGGER.m_id, DMG_NOWEP, NULL);
245
246 if(this.cnt) // TODO
247 __pointparticles(this.cnt, this.absmin * 0.5 + this.absmax * 0.5, '0 0 0', this.count);
248
249 if(this.respawntime)
250 {
253 this.nextthink = time + this.respawntime + crandom() * this.respawntimejitter;
254 }
255
256 oldmsg = this.message;
257 this.message = "";
258 SUB_UseTargets(this, act, trigger);
259 this.message = oldmsg;
260}
float dmg_force
Definition breakable.qc:15
void func_breakable_restore_self(entity this)
Definition breakable.qc:209
float dmg
Definition breakable.qc:12
float dmg_edge
Definition breakable.qc:13
string debris
Definition breakable.qc:28
void func_breakable_destroyed(entity this)
Definition breakable.qc:197
void LaunchDebris(entity this, string debrisname, vector force)
Definition breakable.qc:51
float dmg_radius
Definition breakable.qc:14
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
float cnt
Definition powerups.qc:24
string message
Definition powerups.qc:19
float count
Definition powerups.qc:22
vector absmax
vector absmin
float RadiusDamage(entity inflictor, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float forceintensity, int deathtype,.entity weaponentity, entity directhitentity)
Definition damage.qc:981
#define DMG_NOWEP
Definition damage.qh:104
#define tokenize_console
void SUB_UseTargets(entity this, entity actor, entity trigger)
Definition triggers.qc:344
string argv(float n)
#define NULL
Definition post.qh:14
#define crandom()
Returns a random number between -1.0 and 1.0.
Definition random.qh:32
float respawntimejitter
Definition items.qh:31
float respawntime
Definition items.qh:30
const int CH_TRIGGER
Definition sound.qh:12
string noise
Definition subs.qh:83

References _sound, absmax, absmin, argv(), ATTEN_NORM, CH_TRIGGER, cnt, count, crandom, CSQCMODEL_AUTOUPDATE, debris, debrisforce, dmg, dmg_edge, dmg_force, DMG_NOWEP, dmg_radius, entity(), func_breakable_destroyed(), func_breakable_restore_self(), LaunchDebris(), message, nextthink, noise, NULL, owner, RadiusDamage(), respawntime, respawntimejitter, setthink, SUB_UseTargets(), time, tokenize_console, and VOL_BASE.

Referenced by func_breakable_behave_restore(), func_breakable_destroy_self(), and func_breakable_setup().

◆ func_breakable_destroy_self()

void func_breakable_destroy_self ( entity this)

Definition at line 262 of file breakable.qc.

263{
265}

References entity(), func_breakable_destroy(), and NULL.

Referenced by func_breakable_damage().

◆ func_breakable_destroyed()

void func_breakable_destroyed ( entity this)

Definition at line 197 of file breakable.qc.

198{
201}
void func_breakable_behave_destroyed(entity this)
Definition breakable.qc:133
void func_breakable_look_destroyed(entity this)
Definition breakable.qc:95

References entity(), func_breakable_behave_destroyed(), and func_breakable_look_destroyed().

Referenced by func_breakable_destroy().

◆ func_breakable_init_for_player()

void func_breakable_init_for_player ( entity this,
entity player )

Definition at line 188 of file breakable.qc.

189{
190 if (this.noise1 && this.state == STATE_ALIVE && IS_REAL_CLIENT(player))
191 {
192 msg_entity = player;
194 }
195}
float MSG_ONE
Definition menudefs.qc:56
entity msg_entity
Definition progsdefs.qc:63
void soundto(int _dest, entity e, int chan, string samp, float vol, float _atten, float _pitch)
Definition all.qc:74
#define IS_REAL_CLIENT(v)
Definition utils.qh:17

References ATTEN_NORM, CH_TRIGGER_SINGLE, entity(), IS_REAL_CLIENT, msg_entity, MSG_ONE, noise1, soundto(), state, STATE_ALIVE, and VOL_BASE.

Referenced by func_breakable_setup().

◆ func_breakable_look_destroyed()

void func_breakable_look_destroyed ( entity this)

Definition at line 95 of file breakable.qc.

96{
97 float floorZ;
98
99 if(this.solid == SOLID_BSP) // in case a misc_follow moved me, save the current origin first
100 this.dropped_origin = this.origin;
101
102 this.solid = SOLID_NOT; // before setorigin/_setmodel to prevent area grid linking
103
104 if(this.mdl_dead == "")
105 {
106 setorigin (this, this.origin); // unlink
107 this.effects |= EF_NODRAW;
108 }
109 else {
110 if (this.origin == '0 0 0') { // probably no origin brush, so don't spawn in the middle of the map..
111 floorZ = this.absmin.z;
112 setorigin(this, ((this.absmax + this.absmin) * 0.5));
113 this.origin_z = floorZ;
114 }
115 _setmodel(this, this.mdl_dead);
117 this.effects &= ~EF_NODRAW;
118 }
119}
string mdl_dead
Definition breakable.qc:27
const float SOLID_NOT
float effects
vector origin
const float EF_NODRAW
const float SOLID_BSP
solid
Definition ent_cs.qc:165
void ApplyMinMaxScaleAngles(entity e)
Definition subs.qc:393
vector dropped_origin
Definition world.qh:154

References absmax, absmin, ApplyMinMaxScaleAngles(), dropped_origin, EF_NODRAW, effects, entity(), mdl_dead, origin, solid, SOLID_BSP, and SOLID_NOT.

Referenced by func_breakable_destroyed().

◆ func_breakable_look_restore()

void func_breakable_look_restore ( entity this)

Definition at line 121 of file breakable.qc.

122{
123 this.solid = SOLID_BSP; // before _setmodel/setorigin to ensure area grid linking
124
125 _setmodel(this, this.mdl);
127 this.effects &= ~EF_NODRAW;
128
129 if(this.mdl_dead != "") // only do this if we use mdl_dead, to behave better with misc_follow
130 setorigin(this, this.dropped_origin);
131}
string mdl
Definition item.qh:89

References ApplyMinMaxScaleAngles(), dropped_origin, EF_NODRAW, effects, entity(), mdl, mdl_dead, solid, and SOLID_BSP.

Referenced by func_breakable_reset(), and func_breakable_restore().

◆ func_breakable_reset()

void func_breakable_reset ( entity this)

Definition at line 307 of file breakable.qc.

308{
309 this.team = this.team_saved;
311 if(this.spawnflags & START_DISABLED)
313 else
315}
void func_breakable_look_restore(entity this)
Definition breakable.qc:121
void func_breakable_behave_restore(entity this)
Definition breakable.qc:161
const int START_DISABLED
Definition defs.qh:7
int team_saved
Definition vote.qh:70

References entity(), func_breakable_behave_destroyed(), func_breakable_behave_restore(), func_breakable_look_restore(), spawnflags, START_DISABLED, team, and team_saved.

Referenced by func_breakable_setup().

◆ func_breakable_restore()

void func_breakable_restore ( entity this,
entity actor,
entity trigger )

◆ func_breakable_restore_self()

void func_breakable_restore_self ( entity this)

Definition at line 209 of file breakable.qc.

210{
211 // TODO: use a clipgroup for all func_breakables so they don't collide with eachother
212 float oldhit = this.dphitcontentsmask;
213 this.dphitcontentsmask = DPCONTENTS_BODY; // we really only care about when players are standing inside, obey the mapper in other cases!
214 tracebox(this.origin, this.mins, this.maxs, this.origin, MOVE_NORMAL, this);
215 this.dphitcontentsmask = oldhit;
217 {
218 this.nextthink = time + 5; // retry every 5 seconds until the area becomes clear
219 return;
220 }
222}
void func_breakable_restore(entity this, entity actor, entity trigger)
Definition breakable.qc:203
const float MOVE_NORMAL
vector mins
float DPCONTENTS_BODY
float trace_startsolid
vector maxs
float trace_fraction
float dphitcontentsmask

References DPCONTENTS_BODY, dphitcontentsmask, entity(), func_breakable_restore(), maxs, mins, MOVE_NORMAL, nextthink, NULL, origin, time, trace_fraction, and trace_startsolid.

Referenced by func_breakable_destroy().

◆ func_breakable_setup()

void func_breakable_setup ( entity this)

Definition at line 317 of file breakable.qc.

318{
319 float n, i;
320 if(!GetResource(this, RES_HEALTH))
321 SetResourceExplicit(this, RES_HEALTH, 100);
322 this.max_health = GetResource(this, RES_HEALTH);
323
324 // yes, I know, MOVETYPE_NONE is not available here, not that one would want it here anyway
326 if(!this.debrissolid) this.debrissolid = SOLID_NOT;
327 if(this.debrisvelocity == '0 0 0') this.debrisvelocity = '0 0 140';
328 if(this.debrisvelocityjitter == '0 0 0') this.debrisvelocityjitter = '70 70 70';
329 if(this.debrisavelocityjitter == '0 0 0') this.debrisavelocityjitter = '600 600 600';
330 if(!this.debristime) this.debristime = 3.5;
331 if(!this.debristimejitter) this.debristime = 2.5;
332
333 if(this.mdl != "")
334 this.cnt = _particleeffectnum(this.mdl);
335 if(this.count == 0)
336 this.count = 1;
337
338 if(this.message == "")
339 this.message = "got too close to an explosion";
340 if(this.message2 == "")
341 this.message2 = "was pushed into an explosion by";
342 if(!this.dmg_radius)
343 this.dmg_radius = 150;
344 if(!this.dmg_force)
345 this.dmg_force = 200;
346
347 this.mdl = this.model;
348 SetBrushEntityModel(this, true);
349
352 else
354
356 {
357 this.takedamage = DAMAGE_NO;
358 this.event_damage = func_null;
359 this.bot_attack = false;
360 this.monster_attack = false;
361 }
362
363 // precache all the models
364 if (this.mdl_dead)
365 precache_model(this.mdl_dead);
366 n = tokenize_console(this.debris);
367 for(i = 0; i < n; ++i)
368 precache_model(argv(i));
369 if(this.noise)
370 precache_sound(this.noise);
371 if(this.noise1)
373
374 this.team_saved = this.team;
375 IL_PUSH(g_saved_team, this);
376 this.dropped_origin = this.origin;
377
378 this.reset = func_breakable_reset;
379 this.reset(this);
380
381 if(this.monster_attack)
383
385 this.init_for_player = func_breakable_init_for_player;
386
387 CSQCMODEL_AUTOINIT(this);
388}
void func_breakable_init_for_player(entity this, entity player)
Definition breakable.qc:188
float debrissolid
Definition breakable.qc:17
vector debrisvelocityjitter
Definition breakable.qc:19
float debristimejitter
Definition breakable.qc:22
vector debrisavelocityjitter
Definition breakable.qc:20
float debrismovetype
Definition breakable.qc:16
void func_breakable_reset(entity this)
Definition breakable.qc:307
vector debrisvelocity
Definition breakable.qc:18
float debristime
Definition breakable.qc:21
#define CSQCMODEL_AUTOINIT(e)
model
Definition ent_cs.qc:139
string precache_sound(string sample)
const int MOVETYPE_BOUNCE
Definition movetypes.qh:139
IntrusiveList g_initforplayer
Definition client.qh:370
IntrusiveList g_saved_team
Definition vote.qh:79
void SetBrushEntityModel(entity this, bool with_lod)
Definition subs.qc:420
bool monster_attack
IntrusiveList g_monster_targets
string message2
Definition triggers.qh:19

References argv(), bot_attack, BREAKABLE_NODAMAGE, cnt, count, CSQCMODEL_AUTOINIT, DAMAGE_NO, debris, debrisavelocityjitter, debrismovetype, debrissolid, debristime, debristimejitter, debrisvelocity, debrisvelocityjitter, dmg_force, dmg_radius, dropped_origin, entity(), func_breakable_destroy(), func_breakable_init_for_player(), func_breakable_reset(), func_breakable_restore(), func_null(), g_initforplayer, g_monster_targets, g_saved_team, GetResource(), IL_PUSH(), max_health, mdl, mdl_dead, message, message2, model, monster_attack, MOVETYPE_BOUNCE, noise, noise1, origin, precache_sound(), SetBrushEntityModel(), SetResourceExplicit(), SOLID_NOT, spawnflags, takedamage, team, team_saved, tokenize_console, and use.

Referenced by CheatCommand(), spawnfunc(), spawnfunc(), and spawnfunc().

◆ func_breakable_think()

void func_breakable_think ( entity this)

Definition at line 154 of file breakable.qc.

155{
156 this.nextthink = time;
158}

References CSQCMODEL_AUTOUPDATE, entity(), nextthink, and time.

Referenced by func_breakable_behave_restore().

◆ LaunchDebris()

void LaunchDebris ( entity this,
string debrisname,
vector force )

Definition at line 51 of file breakable.qc.

52{
53 entity dbr = new(debris);
54 vector org = this.absmin
55 + '1 0 0' * random() * (this.absmax.x - this.absmin.x)
56 + '0 1 0' * random() * (this.absmax.y - this.absmin.y)
57 + '0 0 1' * random() * (this.absmax.z - this.absmin.z);
58 setorigin(dbr, org);
59 _setmodel (dbr, debrisname );
60 dbr.skin = this.debrisskin;
61 dbr.colormap = this.colormap; // inherit team colors
62 dbr.owner = this; // do not be affected by our own explosion
64 dbr.solid = this.debrissolid;
65 if(dbr.solid != SOLID_BSP) // SOLID_BSP has exact collision, MAYBE this works? TODO check this out
66 setsize(dbr, '0 0 0', '0 0 0'); // needed for performance, until engine can deal better with it
67 dbr.velocity_x = this.debrisvelocity.x + this.debrisvelocityjitter.x * crandom();
68 dbr.velocity_y = this.debrisvelocity.y + this.debrisvelocityjitter.y * crandom();
69 dbr.velocity_z = this.debrisvelocity.z + this.debrisvelocityjitter.z * crandom();
70 dbr.velocity = dbr.velocity + force * this.debrisdamageforcescale;
71 dbr.angles = this.angles;
72 dbr.avelocity_x = random()*this.debrisavelocityjitter.x;
73 dbr.avelocity_y = random()*this.debrisavelocityjitter.y;
74 dbr.avelocity_z = random()*this.debrisavelocityjitter.z;
75 dbr.damageforcescale = this.debrisdamageforcescale;
76 if(dbr.damageforcescale)
77 dbr.takedamage = DAMAGE_YES;
79}
float debrisskin
Definition breakable.qc:25
float debrisfadetime
Definition breakable.qc:23
float debrisdamageforcescale
Definition breakable.qc:24
float colormap
ent angles
Definition ent_cs.qc:121
float random(void)
void set_movetype(entity this, int mt)
Definition movetypes.qc:4
vector
Definition self.qh:92
vector org
Definition self.qh:92
void SUB_SetFade(entity ent, float vanish_time, float fading_time)
Definition subs.qc:77
const int DAMAGE_YES
Definition subs.qh:80

References absmax, absmin, angles, colormap, crandom, DAMAGE_YES, debris, debrisavelocityjitter, debrisdamageforcescale, debrisfadetime, debrismovetype, debrisskin, debrissolid, debristime, debristimejitter, debrisvelocity, debrisvelocityjitter, entity(), org, random(), set_movetype(), SOLID_BSP, SUB_SetFade(), time, and vector.

Referenced by func_breakable_destroy().

◆ spawnfunc() [1/2]

spawnfunc ( func_breakable )

Definition at line 394 of file breakable.qc.

394{ func_breakable_setup(this); }
void func_breakable_setup(entity this)
Definition breakable.qc:317

References func_breakable_setup().

◆ spawnfunc() [2/2]

spawnfunc ( misc_breakablemodel )

Definition at line 391 of file breakable.qc.

391{ func_breakable_setup(this); }

References func_breakable_setup().

Variable Documentation

◆ debris

string debris

Definition at line 28 of file breakable.qc.

Referenced by func_breakable_destroy(), func_breakable_setup(), and LaunchDebris().

◆ debrisavelocityjitter

vector debrisavelocityjitter

Definition at line 20 of file breakable.qc.

Referenced by func_breakable_setup(), and LaunchDebris().

◆ debrisdamageforcescale

float debrisdamageforcescale

Definition at line 24 of file breakable.qc.

Referenced by LaunchDebris().

◆ debrisfadetime

float debrisfadetime

Definition at line 23 of file breakable.qc.

Referenced by LaunchDebris().

◆ debrisforce

vector debrisforce

Definition at line 224 of file breakable.qc.

Referenced by func_breakable_damage(), and func_breakable_destroy().

◆ debrismovetype

float debrismovetype

Definition at line 16 of file breakable.qc.

Referenced by func_breakable_setup(), and LaunchDebris().

◆ debrisskin

float debrisskin

Definition at line 25 of file breakable.qc.

Referenced by LaunchDebris().

◆ debrissolid

float debrissolid

Definition at line 17 of file breakable.qc.

Referenced by func_breakable_setup(), and LaunchDebris().

◆ debristime

float debristime

Definition at line 21 of file breakable.qc.

Referenced by func_breakable_setup(), and LaunchDebris().

◆ debristimejitter

float debristimejitter

Definition at line 22 of file breakable.qc.

Referenced by func_breakable_setup(), and LaunchDebris().

◆ debrisvelocity

vector debrisvelocity

Definition at line 18 of file breakable.qc.

Referenced by func_breakable_setup(), and LaunchDebris().

◆ debrisvelocityjitter

vector debrisvelocityjitter

Definition at line 19 of file breakable.qc.

Referenced by func_breakable_setup(), and LaunchDebris().

◆ dmg

◆ dmg_edge

◆ dmg_force

◆ dmg_radius

◆ mdl_dead

◆ sprite

entity sprite

Definition at line 10 of file breakable.qc.