X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fmiscfunctions.qc;h=88b29fe27123dd2138058b573137baffbea0dab7;hb=90a5b3918920a8235311e850fe239044acefe6c8;hp=cb390a5f99c2207a4c6d711ed92f987caead17fd;hpb=70dbd52151c76d8300738a163ed92768ad606b15;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index cb390a5f9..88b29fe27 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -893,12 +893,18 @@ void readplayerstartcvars() if (g_weaponarena) { + g_minstagib = 0; // incompatible + g_pinata = 0; // incompatible + g_weapon_stay = 0; // incompatible start_weapons = g_weaponarena; if(!(g_lms || g_ca)) start_items |= IT_UNLIMITED_AMMO; } else if (g_minstagib) { + g_pinata = 0; // incompatible + g_weapon_stay = 0; // incompatible + g_bloodloss = 0; // incompatible start_health = 100; start_armorvalue = 0; start_weapons = WEPBIT_MINSTANEX; @@ -922,6 +928,9 @@ void readplayerstartcvars() if(!cvar("g_use_ammunition")) start_items |= IT_UNLIMITED_AMMO; + if(cvar("g_nexball")) + start_items |= IT_UNLIMITED_SUPERWEAPONS; // FIXME BAD BAD BAD BAD HACK, NEXBALL SHOULDN'T ABUSE PORTO'S WEAPON SLOT + if(g_minstagib) { start_ammo_cells = cvar("g_minstagib_ammo_start"); @@ -1069,6 +1078,8 @@ void readlevelcvars(void) MUTATOR_ADD(mutator_vampire); if(cvar("g_spawn_near_teammate")) MUTATOR_ADD(mutator_spawn_near_teammate); + if(cvar("g_physical_items")) + MUTATOR_ADD(mutator_physical_items); // is this a mutator? is this a mode? if(cvar("g_sandbox")) @@ -1977,35 +1988,33 @@ float WarpZone_Projectile_Touch_ImpactFilter_Callback() } #define PROJECTILE_TOUCH if(WarpZone_Projectile_Touch()) return -float MAX_IPBAN_URIS = 16; - -float URI_GET_DISCARD = 0; -float URI_GET_IPBAN = 1; -float URI_GET_IPBAN_END = 16; +#define ITEM_TOUCH_NEEDKILL() (((trace_dpstartcontents | trace_dphitcontents) & DPCONTENTS_NODROP) || (trace_dphitq3surfaceflags & Q3SURFACEFLAG_SKY)) +#define ITEM_DAMAGE_NEEDKILL(dt) (((dt) == DEATH_HURTTRIGGER) || ((dt) == DEATH_SLIME) || ((dt) == DEATH_LAVA) || ((dt) == DEATH_SWAMP)) void URI_Get_Callback(float id, float status, string data) { - dprint("Received HTTP request data for id ", ftos(id), "; status is ", ftos(status), "\nData is:\n"); - dprint(data); - dprint("\nEnd of data.\n"); - - if(url_URI_Get_Callback(id, status, data)) - { - // handled - } - else if (id == URI_GET_DISCARD) - { - // discard - } - else if (id >= URI_GET_IPBAN && id <= URI_GET_IPBAN_END) - { - // online ban list - OnlineBanList_URI_Get_Callback(id, status, data); - } - else - { - print("Received HTTP request data for an invalid id ", ftos(id), ".\n"); - } + if(url_URI_Get_Callback(id, status, data)) + { + // handled + } + else if (id == URI_GET_DISCARD) + { + // discard + } + else if (id >= URI_GET_CURL && id <= URI_GET_CURL_END) + { + // sv_cmd curl + Curl_URI_Get_Callback(id, status, data); + } + else if (id >= URI_GET_IPBAN && id <= URI_GET_IPBAN_END) + { + // online ban list + OnlineBanList_URI_Get_Callback(id, status, data); + } + else + { + print("Received HTTP request data for an invalid id ", ftos(id), ".\n"); + } } string uid2name(string myuid) {