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

Go to the source code of this file.

Functions

void nade_Effect (entity player, entity eff, int eff_cnt)
 Network nade effect data to player.

Variables

float animstate_entime
float height
float ltime
const int SF_NADEORB_LIFETIME_FLOAT = BIT(0)
const int SF_NADEORB_RADIUS_FLOAT = BIT(1)
float update_time

Function Documentation

◆ nade_Effect()

void nade_Effect ( entity player,
entity eff,
int eff_cnt )

Network nade effect data to player.

Definition at line 147 of file net.qc.

148{
149 if (time < player.nade_special_time)
150 return;
151 player.nade_special_time = time + 1/16; // 0.0625; prevent spam
152
153 if (player.alpha >= 0 && eff_cnt)
154 {
155 WriteHeader(MSG_BROADCAST, Nade_Orb_Effect);
156 WriteByte(MSG_BROADCAST, etof(player));
157 WriteByte(MSG_BROADCAST, (min(eff_cnt, BITS(7)) << 1) | (eff == EFFECT_AMMO_REGEN)); // bit 0 is the effect type, remaining are the count (right-shifted by 1)
158 }
159}
#define BITS(n)
Definition bits.qh:9
float time
WriteByte(chan, ent.angles.y/DEC_FACTOR)
#define WriteHeader(to, id)
Definition net.qh:265
float min(float f,...)
float MSG_BROADCAST
Definition menudefs.qc:55
#define etof(e)
Definition misc.qh:25

References BITS, entity(), etof, min(), MSG_BROADCAST, time, WriteByte(), and WriteHeader.

Referenced by nade_ammo_touch(), and nade_heal_touch().

Variable Documentation

◆ animstate_entime

float animstate_entime

Definition at line 12 of file net.qh.

◆ height

float height

Definition at line 13 of file net.qh.

◆ ltime

◆ SF_NADEORB_LIFETIME_FLOAT

const int SF_NADEORB_LIFETIME_FLOAT = BIT(0)

Definition at line 5 of file net.qh.

Referenced by NET_HANDLE(), and orb_send().

◆ SF_NADEORB_RADIUS_FLOAT

const int SF_NADEORB_RADIUS_FLOAT = BIT(1)

Definition at line 6 of file net.qh.

Referenced by NET_HANDLE(), and orb_send().

◆ update_time

float update_time

Definition at line 11 of file net.qh.

Referenced by classfield(), orb_draw(), and Scoreboard_UpdatePlayerTeams().