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

Go to the source code of this file.

Macros

#define base   autocvar_g_buffs_inferno_burntime_factor
#define intersect_x   autocvar_g_buffs_inferno_burntime_target_damage
#define intersect_y   autocvar_g_buffs_inferno_burntime_target_time
#define offset_x   0
#define offset_y   autocvar_g_buffs_inferno_burntime_min_time

Functions

float buff_Inferno_CalculateDamage (float frag_damage)
float buff_Inferno_CalculateTime (float dmg)

Macro Definition Documentation

◆ base

◆ intersect_x

◆ intersect_y

◆ offset_x

#define offset_x   0

◆ offset_y

Function Documentation

◆ buff_Inferno_CalculateDamage()

float buff_Inferno_CalculateDamage ( float frag_damage)

Definition at line 19 of file inferno.qc.

20{
22}
float autocvar_g_buffs_inferno_damagemultiplier
Definition inferno.qh:10
float frag_damage
Definition sv_ctf.qc:2316

References autocvar_g_buffs_inferno_damagemultiplier, and frag_damage.

Referenced by MUTATOR_HOOKFUNCTION().

◆ buff_Inferno_CalculateTime()

float buff_Inferno_CalculateTime ( float dmg)

Definition at line 4 of file inferno.qc.

5{
6#define offset_x 0
7#define offset_y autocvar_g_buffs_inferno_burntime_min_time
8#define intersect_x autocvar_g_buffs_inferno_burntime_target_damage
9#define intersect_y autocvar_g_buffs_inferno_burntime_target_time
10#define base autocvar_g_buffs_inferno_burntime_factor
11 // Interpolates from (offset_x, offset_y) to (intersect_x, intersect_y) logarithmically with base
12 return offset_y + (intersect_y - offset_y) * logn(((dmg - offset_x) * ((base - 1) / intersect_x)) + 1, base);
13#undef offset_x
14#undef offset_y
15#undef intersect_x
16#undef intersect_y
17#undef base
18}
float dmg
Definition breakable.qc:12
#define intersect_x
#define offset_x
#define base
#define intersect_y
#define offset_y
float logn(float e, float base)
Definition mathlib.qc:99

References base, dmg, intersect_x, intersect_y, logn(), offset_x, and offset_y.

Referenced by MUTATOR_HOOKFUNCTION().