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

Go to the source code of this file.

Functions

bool M_Wyvern_Attack (int attack_type, entity actor, entity targ,.entity weaponentity)
void M_Wyvern_Attack_Fireball (entity this)
void M_Wyvern_Attack_Fireball_Explode (entity this)
void M_Wyvern_Attack_Fireball_Touch (entity this, entity toucher)
 SOUND (WyvernAttack_FIRE, W_Sound("electro_fire"))
 spawnfunc (monster_wyvern)

Variables

float autocvar_g_monster_wyvern_attack_fireball_damage
float autocvar_g_monster_wyvern_attack_fireball_damagetime
float autocvar_g_monster_wyvern_attack_fireball_edgedamage
float autocvar_g_monster_wyvern_attack_fireball_force
float autocvar_g_monster_wyvern_attack_fireball_radius
float autocvar_g_monster_wyvern_attack_fireball_speed
float autocvar_g_monster_wyvern_damageforcescale = 0.6
float autocvar_g_monster_wyvern_health
string autocvar_g_monster_wyvern_loot = "cells"
float autocvar_g_monster_wyvern_speed_run
float autocvar_g_monster_wyvern_speed_stop
float autocvar_g_monster_wyvern_speed_walk

Function Documentation

◆ M_Wyvern_Attack()

bool M_Wyvern_Attack ( int attack_type,
entity actor,
entity targ,
.entity weaponentity )

Definition at line 101 of file wyvern.qc.

102{
103 switch (attack_type)
104 {
108 //actor.anim_finished = time + 1.2;
109 setanim(actor, actor.anim_shoot, false, true, true);
110 if (actor.animstate_endtime > time)
111 actor.anim_finished = actor.animstate_endtime;
112 else
113 actor.anim_finished = time + 1.2;
114 actor.attack_finished_single[0] = actor.anim_finished + 0.2;
115 return true;
116 }
117 return false;
118}
#define setanim(...)
Definition anim.qh:45
float time
void Monster_Delay(entity this, int repeat_count, float defer_amnt, void(entity) func)
const int MONSTER_ATTACK_MELEE
const int MONSTER_ATTACK_RANGED
void M_Wyvern_Attack_Fireball(entity this)
Definition wyvern.qc:92

References entity(), M_Wyvern_Attack_Fireball(), MONSTER_ATTACK_MELEE, MONSTER_ATTACK_RANGED, Monster_Delay(), setanim, and time.

◆ M_Wyvern_Attack_Fireball()

void M_Wyvern_Attack_Fireball ( entity this)

Definition at line 92 of file wyvern.qc.

93{
94 w_shotdir = normalize((this.enemy.origin + '0 0 10') - this.origin);
95 Weapon wep = WEP_WYVERN_ATTACK;
96 // TODO
97 .entity weaponentity = weaponentities[0];
98 wep.wr_think(wep, this, weaponentity, 1);
99}
fields which are explicitly/manually set are marked with "M", fields set automatically are marked wit...
Definition weapon.qh:42
virtual void wr_think()
(SERVER) logic to run every frame
Definition weapon.qh:98
vector normalize(vector v)
entity enemy
Definition sv_ctf.qh:153
vector w_shotdir
Definition tracing.qh:20
entity weaponentities[MAX_WEAPONSLOTS]
Definition weapon.qh:17

References enemy, entity(), normalize(), w_shotdir, weaponentities, and Weapon::wr_think().

Referenced by M_Wyvern_Attack().

◆ M_Wyvern_Attack_Fireball_Explode()

void M_Wyvern_Attack_Fireball_Explode ( entity this)

Definition at line 61 of file wyvern.qc.

62{
63 Send_Effect(EFFECT_FIREBALL_EXPLODE, this.origin, '0 0 0', 1);
64
65 entity own = this.realowner;
66
67 RadiusDamage(this, own,
71 own,
72 NULL,
76 NULL
77 );
78
81
82 delete(this);
83}
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
vector origin
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:943
float Fire_AddDamage(entity e, entity o, float d, float t, float dt)
Definition damage.qc:974
#define DMG_NOWEP
Definition damage.qh:104
void Send_Effect(entity eff, vector eff_loc, vector eff_vel, int eff_cnt)
Definition all.qc:120
#define FOREACH_ENTITY_RADIUS(org, dist, cond, body)
Definition iter.qh:160
#define NULL
Definition post.qh:14
int projectiledeathtype
Definition common.qh:21
const int DAMAGE_AIM
Definition subs.qh:81
#define MONSTER_SKILLMOD(mon)
entity realowner
float autocvar_g_monster_wyvern_attack_fireball_damage
Definition wyvern.qc:7
float autocvar_g_monster_wyvern_attack_fireball_edgedamage
Definition wyvern.qc:8
float autocvar_g_monster_wyvern_attack_fireball_force
Definition wyvern.qc:10
float autocvar_g_monster_wyvern_attack_fireball_radius
Definition wyvern.qc:11
float autocvar_g_monster_wyvern_attack_fireball_damagetime
Definition wyvern.qc:9

References autocvar_g_monster_wyvern_attack_fireball_damage, autocvar_g_monster_wyvern_attack_fireball_damagetime, autocvar_g_monster_wyvern_attack_fireball_edgedamage, autocvar_g_monster_wyvern_attack_fireball_force, autocvar_g_monster_wyvern_attack_fireball_radius, DAMAGE_AIM, DMG_NOWEP, entity(), Fire_AddDamage(), FOREACH_ENTITY_RADIUS, MONSTER_SKILLMOD, NULL, origin, projectiledeathtype, RadiusDamage(), realowner, and Send_Effect().

Referenced by M_Wyvern_Attack_Fireball_Touch(), and SOUND().

◆ M_Wyvern_Attack_Fireball_Touch()

void M_Wyvern_Attack_Fireball_Touch ( entity this,
entity toucher )

Definition at line 85 of file wyvern.qc.

86{
88
90}
entity entity toucher
Definition self.qh:72
#define PROJECTILE_TOUCH(e, t)
Definition common.qh:28
void M_Wyvern_Attack_Fireball_Explode(entity this)
Definition wyvern.qc:61

References entity(), M_Wyvern_Attack_Fireball_Explode(), PROJECTILE_TOUCH, and toucher.

Referenced by SOUND().

◆ SOUND()

◆ spawnfunc()

spawnfunc ( monster_wyvern )

Definition at line 120 of file wyvern.qc.

121{
122 Monster_Spawn(this, true, MON_WYVERN);
123}
bool Monster_Spawn(entity this, bool check_appear, Monster mon)
Setup the basic required properties for a monster.

References Monster_Spawn().

Variable Documentation

◆ autocvar_g_monster_wyvern_attack_fireball_damage

float autocvar_g_monster_wyvern_attack_fireball_damage

Definition at line 7 of file wyvern.qc.

Referenced by M_Wyvern_Attack_Fireball_Explode().

◆ autocvar_g_monster_wyvern_attack_fireball_damagetime

float autocvar_g_monster_wyvern_attack_fireball_damagetime

Definition at line 9 of file wyvern.qc.

Referenced by M_Wyvern_Attack_Fireball_Explode().

◆ autocvar_g_monster_wyvern_attack_fireball_edgedamage

float autocvar_g_monster_wyvern_attack_fireball_edgedamage

Definition at line 8 of file wyvern.qc.

Referenced by M_Wyvern_Attack_Fireball_Explode().

◆ autocvar_g_monster_wyvern_attack_fireball_force

float autocvar_g_monster_wyvern_attack_fireball_force

Definition at line 10 of file wyvern.qc.

Referenced by M_Wyvern_Attack_Fireball_Explode().

◆ autocvar_g_monster_wyvern_attack_fireball_radius

float autocvar_g_monster_wyvern_attack_fireball_radius

Definition at line 11 of file wyvern.qc.

Referenced by M_Wyvern_Attack_Fireball_Explode().

◆ autocvar_g_monster_wyvern_attack_fireball_speed

float autocvar_g_monster_wyvern_attack_fireball_speed

Definition at line 12 of file wyvern.qc.

Referenced by SOUND().

◆ autocvar_g_monster_wyvern_damageforcescale

float autocvar_g_monster_wyvern_damageforcescale = 0.6

Definition at line 6 of file wyvern.qc.

◆ autocvar_g_monster_wyvern_health

float autocvar_g_monster_wyvern_health

Definition at line 4 of file wyvern.qc.

◆ autocvar_g_monster_wyvern_loot

string autocvar_g_monster_wyvern_loot = "cells"

Definition at line 5 of file wyvern.qc.

◆ autocvar_g_monster_wyvern_speed_run

float autocvar_g_monster_wyvern_speed_run

Definition at line 14 of file wyvern.qc.

◆ autocvar_g_monster_wyvern_speed_stop

float autocvar_g_monster_wyvern_speed_stop

Definition at line 13 of file wyvern.qc.

◆ autocvar_g_monster_wyvern_speed_walk

float autocvar_g_monster_wyvern_speed_walk

Definition at line 15 of file wyvern.qc.