33 STAT(MOVEVARS_HIGHSPEED, player) *= 0.5;
56 setanim(actor, actor.anim_shoot,
true,
true,
true);
57 if(actor.animstate_endtime >
time)
58 actor.anim_finished = actor.animstate_endtime;
60 actor.anim_finished =
time + 1;
61 actor.attack_finished_single[0] = actor.anim_finished + 0.2;
75 actor.attack_range = 60;
87 RadiusDamage(
this, this.
realowner, 0, 0, 25,
NULL,
NULL, 25, this.
projectiledeathtype,
DMG_NOWEP,
NULL);
91 StatusEffects_apply(STATUSEFFECT_Webbed, it, time + autocvar_g_monster_spider_attack_web_damagetime, 0);
114 entity proj =
new(plasma);
115 proj.owner = proj.realowner =
this;
118 proj.bot_dodge =
true;
119 proj.bot_dodgerating = 0;
120 proj.nextthink =
time + 5;
122 proj.projectiledeathtype = DEATH_MONSTER_SPIDER.m_id;
130 setsize(proj,
'-4 -4 -4',
'4 4 4');
132 proj.damageforcescale = 0;
138 proj.damagedbycontents =
true;
141 proj.bouncefactor = 0.3;
142 proj.bouncestop = 0.05;
150 Weapon wep = WEP_SPIDER_ATTACK;
155 wep.
wr_think(wep, actor, weaponentity, 2);
162 wep.
wr_think(wep, actor, weaponentity, 1);
184 setanim(actor, ((
random() > 0.5) ? actor.anim_pain2 : actor.anim_pain1),
true,
true,
false);
185 actor.pain_finished = actor.animstate_endtime;
192 setanim(actor, ((
random() > 0.5) ? actor.anim_die2 : actor.anim_die1),
false,
true,
true);
201 actor.anim_melee =
animfixfps(actor,
'0 1 5', none);
202 actor.anim_die1 =
animfixfps(actor,
'1 1 1', none);
203 actor.anim_die2 =
animfixfps(actor,
'2 1 1', none);
204 actor.anim_shoot =
animfixfps(actor,
'3 1 1', none);
206 actor.anim_idle =
animfixfps(actor,
'5 1 1', none);
208 actor.anim_pain1 =
animfixfps(actor,
'7 1 1', none);
209 actor.anim_pain2 =
animfixfps(actor,
'8 1 1', none);
211 actor.anim_walk =
animfixfps(actor,
'10 1 1', none);
212 actor.anim_run =
animfixfps(actor,
'10 1 1', none);
244 PAR(_(
"The Spider is a large mechanically-enhanced arachnoid adept at hunting speedy enemies."));
245 PAR(_(
"To slow down its target, the Spider launches a synthetic web-like substance from its cannons. "
246 "Approaching its enwebbed prey, the Spider will inflict a series of high damage bites."));
IntrusiveList g_bot_dodge
#define REGISTER_MUTATOR(...)
#define MUTATOR_HOOKFUNCTION(...)
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
float GetResource(entity e, Resource res_type)
Returns the current amount of resource the given entity has.
bool SetResourceExplicit(entity e, Resource res_type, float amount)
Sets the resource amount of an entity without calling any hooks.
fields which are explicitly/manually set are marked with "M", fields set automatically are marked wit...
virtual void wr_think()
(SERVER) logic to run every frame
void CSQCProjectile(entity e, float clientanimate, int type, float docull)
float RadiusDamage(entity inflictor, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float forceintensity, int deathtype,.entity weaponentity, entity directhitentity)
IntrusiveList g_damagedbycontents
void Send_Effect(entity eff, vector eff_loc, vector eff_vel, int eff_cnt)
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
#define FOREACH_ENTITY_RADIUS(org, dist, cond, body)
vector animfixfps(entity e, vector a, vector b)
void set_movetype(entity this, int mt)
const int MOVETYPE_BOUNCE
#define METHOD(cname, name, prototype)
const int PROJECTILE_ELECTRO
void adaptor_think2use_hittype_splash(entity this)
#define PROJECTILE_TOUCH(e, t)
IntrusiveList g_projectiles
#define PROJECTILE_MAKETRIGGER(e)
#define sound(e, c, s, v, a)
string W_Sound(string w_snd)
#define SOUND(name, path)
float autocvar_g_monster_spider_attack_bite_delay
float autocvar_g_monster_spider_damageforcescale
string autocvar_g_monster_spider_loot
void M_Spider_Attack_Web_Explode_use(entity this, entity actor, entity trigger)
float autocvar_g_monster_spider_attack_web_delay
float autocvar_g_monster_spider_attack_web_speed
bool M_Spider_Attack(int attack_type, entity actor, entity targ,.entity weaponentity)
float autocvar_g_monster_spider_speed_stop
float autocvar_g_monster_spider_speed_run
void M_Spider_Attack_Web(entity this)
float autocvar_g_monster_spider_speed_walk
float autocvar_g_monster_spider_health
void M_Spider_Attack_Web_Explode(entity this)
float autocvar_g_monster_spider_attack_web_range
void M_Spider_Attack_Web_Touch(entity this, entity toucher)
float autocvar_g_monster_spider_attack_bite_damage
float autocvar_g_monster_spider_attack_web_damagetime
float autocvar_g_monster_spider_attack_web_speed_up
bool StatusEffects_active(StatusEffect this, entity actor)
#define PAR(...)
Adds an individually translatable paragraph to PAGE_TEXT without having to deal with strcat and sprin...
bool Monster_Spawn(entity this, bool check_appear, Monster mon)
entity Monster_FindTarget(entity this)
void monster_makevectors(entity this, entity targ)
bool Monster_Attack_Melee(entity this, entity targ, float damg, vector anim, float er, float animtime, int deathtype, bool dostop)
const int MONSTER_ATTACK_MELEE
const int MONSTER_ATTACK_RANGED
void W_SetupProjVelocity_Explicit(entity proj, vector dir, vector upDir, float pSpeed, float pUpSpeed, float pZSpeed, float spread, float forceAbsolute)
#define W_SetupShot_Dir(ent, wepent, s_forward, antilag, recoil, snd, chan, maxdamage, deathtype)
#define CENTER_OR_VIEWOFS(ent)
#define vdist(v, cmp, f)
Vector distance comparison, avoids sqrt()
void weapon_thinkf(entity actor,.entity weaponentity, WFRAME fr, float t, void(Weapon thiswep, entity actor,.entity weaponentity, int fire) func)
bool weapon_prepareattack(Weapon thiswep, entity actor,.entity weaponentity, bool secondary, float attacktime)
void w_ready(Weapon thiswep, entity actor,.entity weaponentity, int fire)