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)
bool M_Wyvern_Attack_Fireball_Explode_cond (entity e)
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 106 of file wyvern.qc.

107{
108 switch (attack_type)
109 {
113 //actor.anim_finished = time + 1.2;
114 setanim(actor, actor.anim_shoot, false, true, true);
115 if (actor.animstate_endtime > time)
116 actor.anim_finished = actor.animstate_endtime;
117 else
118 actor.anim_finished = time + 1.2;
119 actor.attack_finished_single[0] = actor.anim_finished + 0.2;
120 return true;
121 }
122 return false;
123}
#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:97

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

98{
99 w_shotdir = normalize((this.enemy.origin + '0 0 10') - this.origin);
100 Weapon wep = WEP_WYVERN_ATTACK;
101 // TODO
102 .entity weaponentity = weaponentities[0];
103 wep.wr_think(wep, this, weaponentity, 1);
104}
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:152
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 65 of file wyvern.qc.

66{
67 Send_Effect(EFFECT_FIREBALL_EXPLODE, this.origin, '0 0 0', 1);
68
69 entity own = this.realowner;
70
71 RadiusDamage(this, own,
75 own,
76 NULL,
80 NULL
81 );
82
86
87 delete(this);
88}
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:937
float Fire_AddDamage(entity e, entity o, float d, float t, float dt)
Definition damage.qc:968
#define DMG_NOWEP
Definition damage.qh:104
void Send_Effect(entity eff, vector eff_loc, vector eff_vel, int eff_cnt)
Definition all.qc:155
entity WarpZone_SearchInRadius(vector org, float rad, float nomonsters, WarpZone_FindRadius_cond_callback_t cb)
Modified findradius aware of warpzones, that only includes entities that meet the "cb" criteria.
Definition common.qc:680
noref entity WarpZone_SearchInRadius_otherent
Free to use in the callback.
Definition common.qh:71
#define MOVE_NOTHING
Definition common.qh:35
#define NULL
Definition post.qh:14
int projectiledeathtype
Definition common.qh:33
#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
bool M_Wyvern_Attack_Fireball_Explode_cond(entity e)
Definition wyvern.qc:61
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, DMG_NOWEP, entity(), Fire_AddDamage(), M_Wyvern_Attack_Fireball_Explode_cond(), MONSTER_SKILLMOD, MOVE_NOTHING, NULL, origin, projectiledeathtype, RadiusDamage(), realowner, Send_Effect(), WarpZone_SearchInRadius(), and WarpZone_SearchInRadius_otherent.

Referenced by M_Wyvern_Attack_Fireball_Touch(), and SOUND().

◆ M_Wyvern_Attack_Fireball_Explode_cond()

bool M_Wyvern_Attack_Fireball_Explode_cond ( entity e)

Definition at line 61 of file wyvern.qc.

62{
63 return (e != WarpZone_SearchInRadius_otherent && e.takedamage == DAMAGE_AIM);
64}
const int DAMAGE_AIM
Definition subs.qh:81

References DAMAGE_AIM, entity(), and WarpZone_SearchInRadius_otherent.

Referenced by M_Wyvern_Attack_Fireball_Explode().

◆ M_Wyvern_Attack_Fireball_Touch()

void M_Wyvern_Attack_Fireball_Touch ( entity this,
entity toucher )

Definition at line 90 of file wyvern.qc.

91{
93
95}
entity entity toucher
Definition self.qh:76
#define PROJECTILE_TOUCH(e, t)
Definition common.qh:40
void M_Wyvern_Attack_Fireball_Explode(entity this)
Definition wyvern.qc:65

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

Referenced by SOUND().

◆ SOUND()

◆ spawnfunc()

spawnfunc ( monster_wyvern )

Definition at line 125 of file wyvern.qc.

126{
127 Monster_Spawn(this, true, MON_WYVERN);
128}
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.