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

Go to the source code of this file.

Functions

void nade_veil_Apply (entity player)
void nade_veil_boom (entity this)
void nade_veil_touch (entity this, entity toucher)

Function Documentation

◆ nade_veil_Apply()

void nade_veil_Apply ( entity player)

Definition at line 34 of file veil.qc.

35{
36 if (player.nade_veil_time && player.nade_veil_time <= time)
37 {
38 player.nade_veil_time = 0;
39 if (player.vehicle)
40 player.vehicle.alpha = player.vehicle.nade_veil_prevalpha;
41 else
42 player.alpha = player.nade_veil_prevalpha;
43 }
44}
float time

References entity(), and time.

Referenced by MUTATOR_HOOKFUNCTION().

◆ nade_veil_boom()

void nade_veil_boom ( entity this)

Definition at line 28 of file veil.qc.

29{
32}
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
#define settouch(e, f)
Definition self.qh:73
entity nades_spawn_orb(entity this, float orb_lifetime, float orb_rad)
Spawns an orb for some nade types.
Definition sv_nades.qc:79
void nade_veil_touch(entity this, entity toucher)
Definition veil.qc:6
float autocvar_g_nades_veil_radius
Definition veil.qh:8
float autocvar_g_nades_veil_time
Definition veil.qh:7

References autocvar_g_nades_veil_radius, autocvar_g_nades_veil_time, entity(), nade_veil_touch(), nades_spawn_orb(), and settouch.

Referenced by nade_boom().

◆ nade_veil_touch()

void nade_veil_touch ( entity this,
entity toucher )

Definition at line 6 of file veil.qc.

7{
8 if (!IS_REAL_CLIENT(toucher) && !(IS_VEHICLE(toucher) && toucher.owner))
9 return;
10
11 entity real_toucher = (IS_VEHICLE(toucher) && toucher.owner) ? toucher.owner : toucher;
12
13 float tint_alpha;
14 if (SAME_TEAM(toucher, this.realowner))
15 {
16 tint_alpha = 0.45;
17 if (!real_toucher.nade_veil_time)
18 {
19 toucher.nade_veil_prevalpha = toucher.alpha;
20 toucher.alpha = -1;
21 }
22 }
23 else
24 tint_alpha = 0.75;
25 real_toucher.nade_veil_time = time + 0.1;
26}
entity entity toucher
Definition self.qh:72
#define SAME_TEAM(a, b)
Definition teams.qh:241
entity realowner
#define IS_REAL_CLIENT(v)
Definition utils.qh:17
#define IS_VEHICLE(v)
Definition utils.qh:24

References entity(), IS_REAL_CLIENT, IS_VEHICLE, realowner, SAME_TEAM, time, and toucher.

Referenced by nade_veil_boom().