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

Go to the source code of this file.

Functions

 MUTATOR_HOOKFUNCTION (spawn_unique, PlayerSpawn)
 MUTATOR_HOOKFUNCTION (spawn_unique, Spawn_Score)
 REGISTER_MUTATOR (spawn_unique, expr_evaluate(autocvar_g_spawn_unique))

Function Documentation

◆ MUTATOR_HOOKFUNCTION() [1/2]

MUTATOR_HOOKFUNCTION ( spawn_unique ,
PlayerSpawn  )

Definition at line 17 of file sv_spawn_unique.qc.

18{
19 entity player = M_ARGV(0, entity);
20 entity spawn_spot = M_ARGV(1, entity);
21
22 player.su_last_point = spawn_spot;
23}
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
#define M_ARGV(x, type)
Definition events.qh:17

References entity(), and M_ARGV.

◆ MUTATOR_HOOKFUNCTION() [2/2]

MUTATOR_HOOKFUNCTION ( spawn_unique ,
Spawn_Score  )

Definition at line 5 of file sv_spawn_unique.qc.

6{
7 entity player = M_ARGV(0, entity);
8 entity spawn_spot = M_ARGV(1, entity);
9 vector spawn_score = M_ARGV(2, vector);
10
11 if(spawn_spot == player.su_last_point)
12 spawn_score.x = 0.1; // extremely low priority but still selectable
13
14 M_ARGV(2, vector) = spawn_score;
15}
vector
Definition self.qh:92

References entity(), M_ARGV, Spawn_Score(), and vector.

◆ REGISTER_MUTATOR()

REGISTER_MUTATOR ( spawn_unique ,
expr_evaluate(autocvar_g_spawn_unique)  )