X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fmiscfunctions.qh;h=a3dd45e51e5d3d247edbf5b914e1308d6f7ca6f8;hp=f6138a1abf6005bdea1c04a94ff25beac1da52b2;hb=ae2c1407ec9a05e4f501a6604a7cce8e1030df9f;hpb=464305bd2132971e2d24a19989baa94789ad9e68 diff --git a/qcsrc/server/miscfunctions.qh b/qcsrc/server/miscfunctions.qh index f6138a1ab..a3dd45e51 100644 --- a/qcsrc/server/miscfunctions.qh +++ b/qcsrc/server/miscfunctions.qh @@ -3,7 +3,7 @@ #include "t_items.qh" -#include "mutators/base.qh" +#include "mutators/events.qh" #include "mutators/gamemode_race.qh" #include "../common/constants.qh" @@ -15,7 +15,7 @@ #else string cvar_string_normal(string n) { - if (!(cvar_type(n) & 1)) + if (!(cvar_type(n) & CVAR_TYPEFLAG_EXISTS)) backtrace(strcat("Attempt to access undefined cvar: ", n)); return builtin_cvar_string(n); } @@ -32,10 +32,49 @@ float cvar_normal(string n) .float uncustomizeentityforclient_set; .float nottargeted; +entity eliminatedPlayers; +void EliminatedPlayers_Init(float(entity) isEliminated_func); + +string admin_name(void); + +void write_recordmarker(entity pl, float tstart, float dt); + +void play2all(string samp); + +void DistributeEvenly_Init(float amount, float totalweight); +float DistributeEvenly_Get(float weight); + +void modeleffect_spawn(string m, float s, float f, vector o, vector v, vector ang, vector angv, float s0, float s2, float a, float t1, float t2); + +void shockwave_spawn(string m, vector org, float sz, float t1, float t2); + +vector randompos(vector m1, vector m2); + +void play2team(float t, string filename); + +void GetCvars_handleFloat(string thisname, float f, .float field, string name); + +float spamsound(entity e, float chan, string samp, float vol, float _atten); + +void GetCvars_handleString(string thisname, float f, .string field, string name); + +void precache_all_playermodels(string pattern); + +void soundat(entity e, vector o, float chan, string samp, float vol, float _atten); + +void defer(float fdelay, void() func); + +void UncustomizeEntitiesRun(); +void InitializeEntitiesRun(); + +void stopsoundto(float _dest, entity e, float chan); +void soundtoat(float _dest, entity e, vector o, float chan, string samp, float vol, float _atten); +float ExponentialFalloff(float mindist, float maxdist, float halflifedist, float d); + +vector shotorg_adjust(vector vecs, float y_is_right, float visual); float DistributeEvenly_amount; float DistributeEvenly_totalweight; -var void remove(entity e); void objerror(string s); void droptofloor(); void() spawnfunc_info_player_deathmatch; // needed for the other spawnpoints @@ -68,6 +107,8 @@ float isPushable(entity e); float LostMovetypeFollow(entity ent); +string uid2name(string myuid); + float MoveToRandomMapLocation(entity e, float goodcontents, float badcontents, float badsurfaceflags, float attempts, float maxaboveground, float minviewdistance); string NearestLocation(vector p); @@ -116,6 +157,10 @@ const string STR_OBSERVER = "observer"; #define IS_REAL_CLIENT(v) (clienttype(v) == CLIENTTYPE_REAL) #define IS_NOT_A_CLIENT(v) (clienttype(v) == CLIENTTYPE_NOTACLIENT) +#define IS_MONSTER(v) (v.flags & FL_MONSTER) +#define IS_VEHICLE(v) (v.vehicle_flags & VHF_ISVEHICLE) +#define IS_TURRET(v) (v.turrcaps_flags & TFL_TURRCAPS_ISTURRET) + #define FOR_EACH_CLIENTSLOT(v) for(v = world; (v = nextent(v)) && (num_for_edict(v) <= maxclients); ) #define FOR_EACH_CLIENT(v) FOR_EACH_CLIENTSLOT(v) if(IS_CLIENT(v)) #define FOR_EACH_REALCLIENT(v) FOR_EACH_CLIENT(v) if(IS_REAL_CLIENT(v)) @@ -418,6 +463,6 @@ entity initialize_entity_first; float sound_allowed(float dest, entity e); void InitializeEntity(entity e, void(void) func, float order); void SetCustomizer(entity e, float(void) customizer, void(void) uncustomizer); -void Net_LinkEntity(entity e, float docull, float dt, float(entity, float) sendfunc); +void Net_LinkEntity(entity e, bool docull, float dt, bool(entity, int) sendfunc); #endif