+#include "breakable.qh"
#ifdef SVQC
#include <server/g_subs.qh>
#include <server/g_damage.qh>
-#include <server/bot/bot.qh>
+#include <server/bot/api.qh>
#include <common/csqcmodel_settings.qh>
#include <lib/csqcmodel/sv_model.qh>
#include <server/weapons/common.qh>
dbr.skin = this.debrisskin;
dbr.colormap = this.colormap; // inherit team colors
dbr.owner = this; // do not be affected by our own explosion
- dbr.movetype = this.debrismovetype;
+ set_movetype(dbr, this.debrismovetype);
dbr.solid = this.debrissolid;
if(dbr.solid != SOLID_BSP) // SOLID_BSP has exact collision, MAYBE this works? TODO check this out
setsize(dbr, '0 0 0', '0 0 0'); // needed for performance, until engine can deal better with it
{
this.health = this.max_health;
this.takedamage = DAMAGE_NO;
+ if(this.bot_attack)
+ IL_REMOVE(g_bot_targets, this);
this.bot_attack = false;
this.event_damage = func_null;
this.state = 1;
if(!(this.spawnflags & 4))
{
this.takedamage = DAMAGE_AIM;
+ if(!this.bot_attack)
+ IL_PUSH(g_bot_targets, this);
this.bot_attack = true;
this.event_damage = func_breakable_damage;
}
this.reset = func_breakable_reset;
this.reset(this);
- this.init_for_player_needed = 1;
+ IL_PUSH(g_initforplayer, this);
this.init_for_player = func_breakable_init_for_player;
CSQCMODEL_AUTOINIT(this);