Xonotic
buffs.qh File Reference
+ Include dependency graph for buffs.qh:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Buff
 

Macros

#define BUFF_SPAWNFUNC(e, b, t)
 
#define BUFF_SPAWNFUNC_Q3COMPAT(o, r)
 
#define BUFF_SPAWNFUNCS(e, b)
 
#define REGISTER_BUFF(id, inst)   REGISTER(StatusEffect, BUFF_##id, m_id, inst)
 

Functions

string Buff_UndeprecateName (string buffname)
 
 STATIC_INIT (REGISTER_BUFFS)
 

Macro Definition Documentation

◆ BUFF_SPAWNFUNC

#define BUFF_SPAWNFUNC (   e,
  b,
 
)

Definition at line 65 of file buffs.qh.

◆ BUFF_SPAWNFUNC_Q3COMPAT

#define BUFF_SPAWNFUNC_Q3COMPAT (   o,
 
)

Definition at line 67 of file buffs.qh.

◆ BUFF_SPAWNFUNCS

#define BUFF_SPAWNFUNCS (   e,
 
)

Definition at line 66 of file buffs.qh.

◆ REGISTER_BUFF

#define REGISTER_BUFF (   id,
  inst 
)    REGISTER(StatusEffect, BUFF_##id, m_id, inst)

Definition at line 16 of file buffs.qh.

Function Documentation

◆ Buff_UndeprecateName()

string Buff_UndeprecateName ( string  buffname)

Definition at line 1 of file all.inc.

Referenced by GiveItems().

2 {
3  switch(buffname)
4  {
5  case "ammoregen": return "ammo"; // Q3TA ammoregen
6  case "doubler": return "inferno"; // Q3TA doubler
7  case "scout": return "bash"; // Q3TA scout
8  case "guard": return "resistance"; // Q3TA guard
9  case "revival": case "regen": return "medic"; // WOP revival, Q3A regen
10  case "jumper": return "jump"; // WOP jumper
11  case "invulnerability": return "vampire"; // Q3TA invulnerability
12  case "kamikaze": return "vengeance"; // Q3TA kamikaze
13  case "teleporter": return "swapper"; // Q3A personal teleporter
14  default: return buffname;
15  }
16 }
+ Here is the caller graph for this function:

◆ STATIC_INIT()

STATIC_INIT ( REGISTER_BUFFS  )

Definition at line 40 of file buffs.qh.

References buff_Init(), buff_Init_Compat(), entity(), FOREACH, and team_forced.

40  {
41  FOREACH(StatusEffect, it.instanceOfBuff, {
42  it.m_sprite = strzone(strcat("buff-", it.netname));
43  });
44 }
#define FOREACH(list, cond, body)
Definition: iter.qh:19
+ Here is the call graph for this function: