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 92 of file wyvern.qc.

93{
94 switch(attack_type)
95 {
98 {
100 //actor.anim_finished = time + 1.2;
101 setanim(actor, actor.anim_shoot, false, true, true);
102 if(actor.animstate_endtime > time)
103 actor.anim_finished = actor.animstate_endtime;
104 else
105 actor.anim_finished = time + 1.2;
106 actor.attack_finished_single[0] = actor.anim_finished + 0.2;
107 return true;
108 }
109 }
110
111 return false;
112}
#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:83

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 83 of file wyvern.qc.

84{
85 w_shotdir = normalize((this.enemy.origin + '0 0 10') - this.origin);
86 Weapon wep = WEP_WYVERN_ATTACK;
87 // TODO
88 .entity weaponentity = weaponentities[0];
89 wep.wr_think(wep, this, weaponentity, 1);
90}
fields which are explicitly/manually set are marked with "M", fields set automatically are marked wit...
Definition weapon.qh:44
virtual void wr_think()
(SERVER) logic to run every frame
Definition weapon.qh:90
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 59 of file wyvern.qc.

60{
61 Send_Effect(EFFECT_FIREBALL_EXPLODE, this.origin, '0 0 0', 1);
62
63 entity own = this.realowner;
64
67
69 {
70 Fire_AddDamage(it, own, 5 * MONSTER_SKILLMOD(own), autocvar_g_monster_wyvern_attack_fireball_damagetime, this.projectiledeathtype);
71 });
72
73 delete(this);
74}
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:981
#define DMG_NOWEP
Definition damage.qh:104
void Send_Effect(entity eff, vector eff_loc, vector eff_vel, int eff_cnt)
Definition all.qc:124
#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
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

References autocvar_g_monster_wyvern_attack_fireball_damage, 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(), FOREACH_ENTITY_RADIUS, NULL, origin, projectiledeathtype, RadiusDamage(), realowner, and Send_Effect().

Referenced by M_Wyvern_Attack_Fireball_Touch().

◆ M_Wyvern_Attack_Fireball_Touch()

void M_Wyvern_Attack_Fireball_Touch ( entity this,
entity toucher )

Definition at line 76 of file wyvern.qc.

77{
79
81}
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:59

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

◆ SOUND()

SOUND ( WyvernAttack_FIRE ,
W_Sound("electro_fire")  )

◆ spawnfunc()

spawnfunc ( monster_wyvern )

Definition at line 114 of file wyvern.qc.

114{ Monster_Spawn(this, true, MON_WYVERN); }
bool Monster_Spawn(entity this, bool check_appear, Monster mon)

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.

◆ 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.

◆ 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.