X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fspawnpoints.qh;h=1609201c2f1c3d601d361b2c39b451b64bf67e50;hb=969dc49d01d650a812706aba16c765af488605d0;hp=e697001c18145e96233de28a8bfba1e436f59503;hpb=802d673ea15260b02ce6760839cc40a2a57b21b1;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/spawnpoints.qh b/qcsrc/server/spawnpoints.qh index e697001c1..1609201c2 100644 --- a/qcsrc/server/spawnpoints.qh +++ b/qcsrc/server/spawnpoints.qh @@ -1,11 +1,18 @@ -#ifndef SPAWNPOINTS_H -#define SPAWNPOINTS_H +#pragma once + +// spawnpoint prios +const int SPAWN_PRIO_NEAR_TEAMMATE_FOUND = 200; +const int SPAWN_PRIO_NEAR_TEAMMATE_SAMETEAM = 100; +const int SPAWN_PRIO_RACE_PREVIOUS_SPAWN = 50; +const int SPAWN_PRIO_GOOD_DISTANCE = 10; .vector spawnpoint_score; float spawnpoint_nag; -float SpawnEvent_Send(entity to, int sf); -entity Spawn_FilterOutBadSpots(entity firstspot, float mindist, float teamcheck); -entity SelectSpawnPoint (float anypoint); -void spawnfunc_info_player_deathmatch(); -void spawnpoint_use(); -#endif +bool SpawnEvent_Send(entity this, entity to, int sf); +entity Spawn_FilterOutBadSpots(entity this, entity firstspot, float mindist, float teamcheck, bool targetcheck); +entity SelectSpawnPoint(entity this, bool anypoint); +spawnfunc(info_player_deathmatch); +void spawnpoint_use(entity this, entity actor, entity trigger); + +USING(spawn_evalfunc_t, vector(entity this, entity player, entity spot, vector current)); +.spawn_evalfunc_t spawn_evalfunc;