From: Rudolf Polzer Date: Mon, 9 Feb 2015 12:10:36 +0000 (+0100) Subject: Merge branch 'master' into divVerent/item_ammo X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=85917474b9222c8b4eff50e246fb2688938e528b;p=xonotic%2Fxonotic-data.pk3dir.git Merge branch 'master' into divVerent/item_ammo Conflicts: qcsrc/server/autocvars.qh qcsrc/server/miscfunctions.qc qcsrc/server/progs.src qcsrc/server/t_quake3.qc --- 85917474b9222c8b4eff50e246fb2688938e528b diff --cc qcsrc/server/autocvars.qh index 893b7d15c,bcb9d28d7..6a23c47bd --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@@ -1254,4 -840,46 +840,47 @@@ float autocvar_g_campcheck_damage float autocvar_g_campcheck_distance; float autocvar_g_campcheck_interval; float autocvar_g_jump_grunt; +float autocvar_g_balance_ammodistribution_force; + float autocvar_g_overkill_powerups_replace; + float autocvar_g_overkill_superguns_respawn_time; + float autocvar_g_overkill_100h_anyway; + float autocvar_g_overkill_100a_anyway; + float autocvar_g_overkill_ammo_charge; + float autocvar_g_overkill_ammo_charge_notice; + float autocvar_g_overkill_ammo_charge_limit; + float autocvar_g_spawn_near_teammate_distance; + float autocvar_g_spawn_near_teammate_ignore_spawnpoint; + float autocvar_g_spawn_near_teammate_ignore_spawnpoint_delay; + float autocvar_g_spawn_near_teammate_ignore_spawnpoint_delay_death; + float autocvar_g_spawn_near_teammate_ignore_spawnpoint_check_health; + float autocvar_g_spawn_near_teammate_ignore_spawnpoint_closetodeath; + float autocvar_g_buffs_waypoint_distance; + float autocvar_g_buffs_randomize; + float autocvar_g_buffs_random_lifetime; + float autocvar_g_buffs_random_location; + float autocvar_g_buffs_random_location_attempts; + float autocvar_g_buffs_spawn_count; + float autocvar_g_buffs_replace_powerups; + float autocvar_g_buffs_cooldown_activate; + float autocvar_g_buffs_cooldown_respawn; + float autocvar_g_buffs_resistance_blockpercent; + float autocvar_g_buffs_medic_survive_chance; + float autocvar_g_buffs_medic_survive_health; + float autocvar_g_buffs_medic_rot; + float autocvar_g_buffs_medic_max; + float autocvar_g_buffs_medic_regen; + float autocvar_g_buffs_vengeance_damage_multiplier; + float autocvar_g_buffs_bash_force; + float autocvar_g_buffs_bash_force_self; + float autocvar_g_buffs_disability_time; + float autocvar_g_buffs_disability_speed; + float autocvar_g_buffs_disability_rate; + float autocvar_g_buffs_speed_speed; + float autocvar_g_buffs_speed_rate; + float autocvar_g_buffs_speed_damage_take; + float autocvar_g_buffs_speed_regen; + float autocvar_g_buffs_vampire_damage_steal; + float autocvar_g_buffs_invisible_alpha; + float autocvar_g_buffs_flight_gravity; + float autocvar_g_buffs_jump_height; + #endif diff --cc qcsrc/server/miscfunctions.qc index 4586a9def,d998ea799..00229badf --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@@ -1418,26 -1125,7 +1125,6 @@@ void precache( #include "precache-for-csqc.inc" } - // WARNING: this kills the trace globals - #define EXACTTRIGGER_TOUCH if(WarpZoneLib_ExactTrigger_Touch()) return - #define EXACTTRIGGER_INIT WarpZoneLib_ExactTrigger_Init() - - #define INITPRIO_FIRST 0 - #define INITPRIO_GAMETYPE 0 - #define INITPRIO_GAMETYPE_FALLBACK 1 - #define INITPRIO_PREBECOME 4 - #define INITPRIO_BECOME 5 - #define INITPRIO_FINDTARGET 10 - #define INITPRIO_DROPTOFLOOR 20 - #define INITPRIO_SETLOCATION 90 - #define INITPRIO_LINKDOORS 91 - #define INITPRIO_LAST 99 - - .void(void) initialize_entity; - .float initialize_entity_order; - .entity initialize_entity_next; - entity initialize_entity_first; -- void make_safe_for_remove(entity e) { if (e.initialize_entity) diff --cc qcsrc/server/miscfunctions.qh index 000000000,f19f53fd0..49a92cefa mode 000000,100644..100644 --- a/qcsrc/server/miscfunctions.qh +++ b/qcsrc/server/miscfunctions.qh @@@ -1,0 -1,431 +1,433 @@@ + #ifndef MISCFUNCTIONS_H + #define MISCFUNCTIONS_H + + #include "t_items.qh" + + #include "mutators/base.qh" + #include "mutators/gamemode_race.qh" + + #include "../common/constants.qh" + #include "../common/mapinfo.qh" + + #ifdef RELEASE + #define cvar_string_normal builtin_cvar_string + #define cvar_normal builtin_cvar + #else + string cvar_string_normal(string n) + { + if (!(cvar_type(n) & 1)) + backtrace(strcat("Attempt to access undefined cvar: ", n)); + return builtin_cvar_string(n); + } + + float cvar_normal(string n) + { + return stof(cvar_string_normal(n)); + } + #endif + #define cvar_set_normal builtin_cvar_set + + .vector dropped_origin; + .void(void) uncustomizeentityforclient; + .float uncustomizeentityforclient_set; + .float nottargeted; + + + 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 + void() spawnpoint_use; + void() SUB_Remove; + + void attach_sameorigin(entity e, entity to, string tag); + + void crosshair_trace(entity pl); + + void crosshair_trace_plusvisibletriggers(entity pl); + + void detach_sameorigin(entity e); + + void follow_sameorigin(entity e, entity to); + + string formatmessage(string msg); + + void GameLogEcho(string s); + + void GameLogInit(); + + void GameLogClose(); + + void GetCvars(float f); + + string GetMapname(); + + float isPushable(entity e); + + float LostMovetypeFollow(entity ent); + + float MoveToRandomMapLocation(entity e, float goodcontents, float badcontents, float badsurfaceflags, float attempts, float maxaboveground, float minviewdistance); + + string NearestLocation(vector p); + + void play2(entity e, string filename); + + string playername(entity p); + + void precache(); + + void remove_safely(entity e); + + void remove_unsafely(entity e); + + void SetMovetypeFollow(entity ent, entity e); + + vector shotorg_adjust_values(vector vecs, float y_is_right, float visual, float algn); + + void soundto(float dest, entity e, float chan, string samp, float vol, float atten); + + void stopsound(entity e, float chan); + + float tracebox_hits_box(vector start, vector mi, vector ma, vector end, vector thmi, vector thma); + + void traceline_antilag (entity source, vector v1, vector v2, float nomonst, entity forent, float lag); + + void WarpZone_crosshair_trace(entity pl); + + void WarpZone_traceline_antilag (entity source, vector v1, vector v2, float nomonst, entity forent, float lag); + + + #define IFTARGETED if(!self.nottargeted && self.targetname != "") + + #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)) + + #define PROJECTILE_TOUCH if(WarpZone_Projectile_Touch()) return + + #define move_out_of_solid(e) WarpZoneLib_MoveOutOfSolid(e) + + const string STR_PLAYER = "player"; + const string STR_SPECTATOR = "spectator"; + const string STR_OBSERVER = "observer"; + + #define IS_PLAYER(v) (v.classname == STR_PLAYER) + #define IS_SPEC(v) (v.classname == STR_SPECTATOR) + #define IS_OBSERVER(v) (v.classname == STR_OBSERVER) + #define IS_CLIENT(v) (v.flags & FL_CLIENT) + #define IS_BOT_CLIENT(v) (clienttype(v) == CLIENTTYPE_BOT) + #define IS_REAL_CLIENT(v) (clienttype(v) == CLIENTTYPE_REAL) + #define IS_NOT_A_CLIENT(v) (clienttype(v) == CLIENTTYPE_NOTACLIENT) + + #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)) + + #define FOR_EACH_PLAYER(v) FOR_EACH_CLIENT(v) if(IS_PLAYER(v)) + #define FOR_EACH_SPEC(v) FOR_EACH_CLIENT(v) if (!IS_PLAYER(v)) // Samual: shouldn't this be IS_SPEC(v)? and rather create a separate macro to include observers too + #define FOR_EACH_REALPLAYER(v) FOR_EACH_REALCLIENT(v) if(IS_PLAYER(v)) + + #define FOR_EACH_MONSTER(v) for(v = world; (v = findflags(v, flags, FL_MONSTER)) != world; ) + + #define CENTER_OR_VIEWOFS(ent) (ent.origin + (IS_PLAYER(ent) ? ent.view_ofs : ((ent.mins + ent.maxs) * 0.5))) + + // copies a string to a tempstring (so one can strunzone it) + string strcat1(string s) = #115; // FRIK_FILE + + float logfile_open; + float logfile; + + #define strstr strstrofs + /* + // NOTE: DO NOT USE THIS FUNCTION TOO OFTEN. + // IT WILL MOST PROBABLY DESTROY _ALL_ OTHER TEMP + // STRINGS AND TAKE QUITE LONG. haystack and needle MUST + // BE CONSTANT OR strzoneD! + float strstr(string haystack, string needle, float offset) + { + float len, endpos; + string found; + len = strlen(needle); + endpos = strlen(haystack) - len; + while(offset <= endpos) + { + found = substring(haystack, offset, len); + if(found == needle) + return offset; + offset = offset + 1; + } + return -1; + } + */ + + const float NUM_NEAREST_ENTITIES = 4; + entity nearest_entity[NUM_NEAREST_ENTITIES]; + float nearest_length[NUM_NEAREST_ENTITIES]; + + + //#NO AUTOCVARS START + + float g_pickup_shells; + float g_pickup_shells_max; + float g_pickup_nails; + float g_pickup_nails_max; + float g_pickup_rockets; + float g_pickup_rockets_max; + float g_pickup_cells; + float g_pickup_cells_max; + float g_pickup_plasma; + float g_pickup_plasma_max; + float g_pickup_fuel; + float g_pickup_fuel_jetpack; + float g_pickup_fuel_max; + float g_pickup_armorsmall; + float g_pickup_armorsmall_max; + float g_pickup_armorsmall_anyway; + float g_pickup_armormedium; + float g_pickup_armormedium_max; + float g_pickup_armormedium_anyway; + float g_pickup_armorbig; + float g_pickup_armorbig_max; + float g_pickup_armorbig_anyway; + float g_pickup_armorlarge; + float g_pickup_armorlarge_max; + float g_pickup_armorlarge_anyway; + float g_pickup_healthsmall; + float g_pickup_healthsmall_max; + float g_pickup_healthsmall_anyway; + float g_pickup_healthmedium; + float g_pickup_healthmedium_max; + float g_pickup_healthmedium_anyway; + float g_pickup_healthlarge; + float g_pickup_healthlarge_max; + float g_pickup_healthlarge_anyway; + float g_pickup_healthmega; + float g_pickup_healthmega_max; + float g_pickup_healthmega_anyway; + float g_pickup_ammo_anyway; + float g_pickup_weapons_anyway; + float g_weaponarena; + WepSet g_weaponarena_weapons; + float g_weaponarena_random; + float g_weaponarena_random_with_blaster; + string g_weaponarena_list; + float g_weaponspeedfactor; + float g_weaponratefactor; + float g_weapondamagefactor; + float g_weaponforcefactor; + float g_weaponspreadfactor; + + WepSet start_weapons; + WepSet start_weapons_default; + WepSet start_weapons_defaultmask; + int start_items; + float start_ammo_shells; + float start_ammo_nails; + float start_ammo_rockets; + float start_ammo_cells; + float start_ammo_plasma; + float start_ammo_fuel; + float start_health; + float start_armorvalue; + WepSet warmup_start_weapons; + WepSet warmup_start_weapons_default; + WepSet warmup_start_weapons_defaultmask; + #define WARMUP_START_WEAPONS ((g_warmup_allguns == 1) ? (warmup_start_weapons & (weaponsInMap | start_weapons)) : warmup_start_weapons) + float warmup_start_ammo_shells; + float warmup_start_ammo_nails; + float warmup_start_ammo_rockets; + float warmup_start_ammo_cells; + float warmup_start_ammo_plasma; + float warmup_start_ammo_fuel; + float warmup_start_health; + float warmup_start_armorvalue; + float g_weapon_stay; + + float want_weapon(entity weaponinfo, float allguns); // WEAPONTODO: what still needs done? + void readplayerstartcvars(); + + float g_bugrigs; + float g_bugrigs_planar_movement; + float g_bugrigs_planar_movement_car_jumping; + float g_bugrigs_reverse_spinning; + float g_bugrigs_reverse_speeding; + float g_bugrigs_reverse_stopping; + float g_bugrigs_air_steering; + float g_bugrigs_angle_smoothing; + float g_bugrigs_friction_floor; + float g_bugrigs_friction_brake; + float g_bugrigs_friction_air; + float g_bugrigs_accel; + float g_bugrigs_speed_ref; + float g_bugrigs_speed_pow; + float g_bugrigs_steer; + + float sv_autotaunt; + float sv_taunt; + + string GetGametype(); // g_world.qc + void mutators_add(); // mutators.qc + void readlevelcvars(void) + { + // load mutators + mutators_add(); + + if(cvar("sv_allow_fullbright")) + serverflags |= SERVERFLAG_ALLOW_FULLBRIGHT; + + g_bugrigs = cvar("g_bugrigs"); + g_bugrigs_planar_movement = cvar("g_bugrigs_planar_movement"); + g_bugrigs_planar_movement_car_jumping = cvar("g_bugrigs_planar_movement_car_jumping"); + g_bugrigs_reverse_spinning = cvar("g_bugrigs_reverse_spinning"); + g_bugrigs_reverse_speeding = cvar("g_bugrigs_reverse_speeding"); + g_bugrigs_reverse_stopping = cvar("g_bugrigs_reverse_stopping"); + g_bugrigs_air_steering = cvar("g_bugrigs_air_steering"); + g_bugrigs_angle_smoothing = cvar("g_bugrigs_angle_smoothing"); + g_bugrigs_friction_floor = cvar("g_bugrigs_friction_floor"); + g_bugrigs_friction_brake = cvar("g_bugrigs_friction_brake"); + g_bugrigs_friction_air = cvar("g_bugrigs_friction_air"); + g_bugrigs_accel = cvar("g_bugrigs_accel"); + g_bugrigs_speed_ref = cvar("g_bugrigs_speed_ref"); + g_bugrigs_speed_pow = cvar("g_bugrigs_speed_pow"); + g_bugrigs_steer = cvar("g_bugrigs_steer"); + + g_instagib = cvar("g_instagib"); + + sv_clones = cvar("sv_clones"); + sv_foginterval = cvar("sv_foginterval"); + g_cloaked = cvar("g_cloaked"); + g_footsteps = cvar("g_footsteps"); + g_grappling_hook = cvar("g_grappling_hook"); + g_jetpack = cvar("g_jetpack"); + sv_maxidle = cvar("sv_maxidle"); + sv_maxidle_spectatorsareidle = cvar("sv_maxidle_spectatorsareidle"); + sv_autotaunt = cvar("sv_autotaunt"); + sv_taunt = cvar("sv_taunt"); + + warmup_stage = cvar("g_warmup"); + g_warmup_limit = cvar("g_warmup_limit"); + g_warmup_allguns = cvar("g_warmup_allguns"); + g_warmup_allow_timeout = cvar("g_warmup_allow_timeout"); + + if ((g_race && g_race_qualifying == 2) || g_assault || cvar("g_campaign")) + warmup_stage = 0; // these modes cannot work together, sorry + + g_pickup_respawntime_weapon = cvar("g_pickup_respawntime_weapon"); + g_pickup_respawntime_superweapon = cvar("g_pickup_respawntime_superweapon"); + g_pickup_respawntime_ammo = cvar("g_pickup_respawntime_ammo"); + g_pickup_respawntime_short = cvar("g_pickup_respawntime_short"); + g_pickup_respawntime_medium = cvar("g_pickup_respawntime_medium"); + g_pickup_respawntime_long = cvar("g_pickup_respawntime_long"); + g_pickup_respawntime_powerup = cvar("g_pickup_respawntime_powerup"); + g_pickup_respawntimejitter_weapon = cvar("g_pickup_respawntimejitter_weapon"); + g_pickup_respawntimejitter_superweapon = cvar("g_pickup_respawntimejitter_superweapon"); + g_pickup_respawntimejitter_ammo = cvar("g_pickup_respawntimejitter_ammo"); + g_pickup_respawntimejitter_short = cvar("g_pickup_respawntimejitter_short"); + g_pickup_respawntimejitter_medium = cvar("g_pickup_respawntimejitter_medium"); + g_pickup_respawntimejitter_long = cvar("g_pickup_respawntimejitter_long"); + g_pickup_respawntimejitter_powerup = cvar("g_pickup_respawntimejitter_powerup"); + + g_weaponspeedfactor = cvar("g_weaponspeedfactor"); + g_weaponratefactor = cvar("g_weaponratefactor"); + g_weapondamagefactor = cvar("g_weapondamagefactor"); + g_weaponforcefactor = cvar("g_weaponforcefactor"); + g_weaponspreadfactor = cvar("g_weaponspreadfactor"); + + g_pickup_shells = cvar("g_pickup_shells"); + g_pickup_shells_max = cvar("g_pickup_shells_max"); + g_pickup_nails = cvar("g_pickup_nails"); + g_pickup_nails_max = cvar("g_pickup_nails_max"); + g_pickup_rockets = cvar("g_pickup_rockets"); + g_pickup_rockets_max = cvar("g_pickup_rockets_max"); + g_pickup_cells = cvar("g_pickup_cells"); + g_pickup_cells_max = cvar("g_pickup_cells_max"); + g_pickup_plasma = cvar("g_pickup_plasma"); + g_pickup_plasma_max = cvar("g_pickup_plasma_max"); + g_pickup_fuel = cvar("g_pickup_fuel"); + g_pickup_fuel_jetpack = cvar("g_pickup_fuel_jetpack"); + g_pickup_fuel_max = cvar("g_pickup_fuel_max"); + g_pickup_armorsmall = cvar("g_pickup_armorsmall"); + g_pickup_armorsmall_max = cvar("g_pickup_armorsmall_max"); + g_pickup_armorsmall_anyway = cvar("g_pickup_armorsmall_anyway"); + g_pickup_armormedium = cvar("g_pickup_armormedium"); + g_pickup_armormedium_max = cvar("g_pickup_armormedium_max"); + g_pickup_armormedium_anyway = cvar("g_pickup_armormedium_anyway"); + g_pickup_armorbig = cvar("g_pickup_armorbig"); + g_pickup_armorbig_max = cvar("g_pickup_armorbig_max"); + g_pickup_armorbig_anyway = cvar("g_pickup_armorbig_anyway"); + g_pickup_armorlarge = cvar("g_pickup_armorlarge"); + g_pickup_armorlarge_max = cvar("g_pickup_armorlarge_max"); + g_pickup_armorlarge_anyway = cvar("g_pickup_armorlarge_anyway"); + g_pickup_healthsmall = cvar("g_pickup_healthsmall"); + g_pickup_healthsmall_max = cvar("g_pickup_healthsmall_max"); + g_pickup_healthsmall_anyway = cvar("g_pickup_healthsmall_anyway"); + g_pickup_healthmedium = cvar("g_pickup_healthmedium"); + g_pickup_healthmedium_max = cvar("g_pickup_healthmedium_max"); + g_pickup_healthmedium_anyway = cvar("g_pickup_healthmedium_anyway"); + g_pickup_healthlarge = cvar("g_pickup_healthlarge"); + g_pickup_healthlarge_max = cvar("g_pickup_healthlarge_max"); + g_pickup_healthlarge_anyway = cvar("g_pickup_healthlarge_anyway"); + g_pickup_healthmega = cvar("g_pickup_healthmega"); + g_pickup_healthmega_max = cvar("g_pickup_healthmega_max"); + g_pickup_healthmega_anyway = cvar("g_pickup_healthmega_anyway"); + + g_pickup_ammo_anyway = cvar("g_pickup_ammo_anyway"); + g_pickup_weapons_anyway = cvar("g_pickup_weapons_anyway"); + + g_weapon_stay = cvar(strcat("g_", GetGametype(), "_weapon_stay")); + if(!g_weapon_stay) + g_weapon_stay = cvar("g_weapon_stay"); + + if (!warmup_stage) + game_starttime = time + cvar("g_start_delay"); + + for(int i = WEP_FIRST; i <= WEP_LAST; ++i) + WEP_ACTION(i, WR_INIT); + + readplayerstartcvars(); + } + + //#NO AUTOCVARS END + + + // Sound functions + //string precache_sound (string s) = #19; + // hack + float precache_sound_index (string s) = #19; + + const float SND_VOLUME = 1; + const float SND_ATTENUATION = 2; + const float SND_LARGEENTITY = 8; + const float SND_LARGESOUND = 16; + + // WARNING: this kills the trace globals + #define EXACTTRIGGER_TOUCH if(WarpZoneLib_ExactTrigger_Touch()) return + #define EXACTTRIGGER_INIT WarpZoneLib_ExactTrigger_Init() + + const float INITPRIO_FIRST = 0; + const float INITPRIO_GAMETYPE = 0; + const float INITPRIO_GAMETYPE_FALLBACK = 1; ++const float INITPRIO_PREBECOME = 4 ++const float INITPRIO_BECOME = 5 + const float INITPRIO_FINDTARGET = 10; + const float INITPRIO_DROPTOFLOOR = 20; + const float INITPRIO_SETLOCATION = 90; + const float INITPRIO_LINKDOORS = 91; + const float INITPRIO_LAST = 99; + + .void(void) initialize_entity; + .float initialize_entity_order; + .entity initialize_entity_next; + 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); + + #endif diff --cc qcsrc/server/progs.src index 7d18944ba,85e75cda9..9f018ff57 --- a/qcsrc/server/progs.src +++ b/qcsrc/server/progs.src @@@ -2,273 -2,113 +2,114 @@@ ../common/util-pre.qh sys-pre.qh - ../dpdefs/progsdefs.qc - ../dpdefs/dpextensions.qc + ../dpdefs/progsdefs.qh + ../dpdefs/dpextensions.qh sys-post.qh - ../warpzonelib/anglestransform.qh - ../warpzonelib/mathlib.qh - ../warpzonelib/common.qh - ../warpzonelib/util_server.qh - ../warpzonelib/server.qh - - ../common/constants.qh - ../common/teams.qh - ../common/util.qh - ../common/test.qh - ../common/counting.qh - ../common/items.qh - ../common/explosion_equation.qh - ../common/urllib.qh - ../common/command/markup.qh - ../common/command/rpn.qh - ../common/command/generic.qh - ../common/command/shared_defs.qh - ../common/net_notice.qh - ../common/animdecide.qh - - autocvars.qh - constants.qh - defs.qh // Should rename this, it has fields and globals - - ../common/notifications.qh // must be after autocvars - ../common/deathtypes.qh // must be after notifications - - mutators/base.qh - mutators/mutators.qh - mutators/gamemode_assault.qh - mutators/gamemode_arena.qh - mutators/gamemode_ca.qh - mutators/gamemode_ctf.qh - mutators/gamemode_domination.qh - mutators/gamemode_keyhunt.qh // TODO fix this - mutators/gamemode_keepaway.qh - mutators/gamemode_nexball.qh - mutators/gamemode_lms.qh - mutators/mutator_dodging.qh - mutators/mutator_nades.qh - - //// tZork Turrets //// - tturrets/include/turrets_early.qh - vehicles/vehicles_def.qh - - campaign.qh - ../common/campaign_common.qh - ../common/mapinfo.qh - - command/common.qh - command/banning.qh - command/radarmap.qh - command/vote.qh - command/getreplies.qh - command/cmd.qh - command/sv_cmd.qh - - accuracy.qh - csqcprojectile.qh - ../common/csqcmodel_settings.qh - ../csqcmodellib/common.qh - ../csqcmodellib/sv_model.qh + anticheat.qc + antilag.qc + // assault.qc + campaign.qc + cheats.qc + cl_client.qc + cl_impulse.qc + cl_physics.qc + cl_player.qc csqceffects.qc - - anticheat.qh - cheats.qh - playerstats.qh - - portals.qh - - g_hook.qh - w_electro.qh - w_laser.qh - - scores.qh - - spawnpoints.qh - - ipban.qh - - race.qh - - antilag.qh - - playerdemo.qh - - round_handler.qh - - // singleplayer stuff - item_key.qh - secret.qh - - scores_rules.qc - - miscfunctions.qc - - waypointsprites.qc - - bot/bot.qc - + // ctf.qc + // domination.qc + ent_cs.qc + func_breakable.qc + g_casings.qc + g_damage.qc + g_hook.qc + g_models.qc g_subs.qc - g_tetris.qc - - //runematch.qc - + g_triggers.qc g_violence.qc - g_damage.qc - - teamplay.qc - - cl_physics.qc - - // tZork's libs - movelib.qc - steerlib.qc - pathlib/pathlib.qh - g_world.qc - g_casings.qc - - t_jumppads.qc - t_teleporters.qc - - sv_main.qc - - g_triggers.qc - g_models.qc - - // singleplayer stuff + ipban.qc ++item_ammo.qc item_key.qc + mapvoting.qc + miscfunctions.qc + // mode_onslaught.qc + movelib.qc + // nexball.qc + playerdemo.qc + portals.qc + race.qc + round_handler.qc + // runematch.qc + scores.qc + scores_rules.qc secret.qc - - cl_weaponsystem.qc - w_common.qc - - w_all.qc - + spawnpoints.qc + steerlib.qc + sv_main.qc + target_music.qc + target_spawn.qc + teamplay.qc + t_halflife.qc t_items.qc - item_ammo.qc - cl_weapons.qc - cl_impulse.qc - - ent_cs.qc - - cl_player.qc - cl_client.qc + t_jumppads.qc t_plats.qc - antilag.qc - - //ctf.qc - //domination.qc - //mode_onslaught.qc - //nexball.qc - g_hook.qc - + t_quake3.qc + t_quake.qc t_swamp.qc + t_teleporters.qc + waypointsprites.qc - campaign.qc - ../common/campaign_file.qc - ../common/campaign_setup.qc - ../common/urllib.qc - - ../common/command/markup.qc - ../common/command/rpn.qc - ../common/command/generic.qc - ../common/net_notice.qc + bot/bot.qc - command/common.qc command/banning.qc - command/radarmap.qc - command/vote.qc - command/getreplies.qc command/cmd.qc + command/common.qc + command/getreplies.qc + command/radarmap.qc command/sv_cmd.qc + command/vote.qc - //assault.qc + mutators/mutators_include.qc + mutators/mutators.qc - ipban.qc + weapons/accuracy.qc + weapons/common.qc + weapons/csqcprojectile.qc // TODO + weapons/hitplot.qc + weapons/selection.qc + weapons/spawning.qc + weapons/throwing.qc + weapons/tracing.qc + weapons/weaponstats.qc + weapons/weaponsystem.qc + ../common/animdecide.qc + ../common/buffs.qc + ../common/campaign_file.qc + ../common/campaign_setup.qc + ../common/command/generic.qc + ../common/command/markup.qc + ../common/command/rpn.qc ../common/mapinfo.qc + ../common/monsters/monsters.qc + ../common/monsters/spawn.qc + ../common/monsters/sv_monsters.qc + ../common/nades.qc + ../common/net_notice.qc + ../common/notifications.qc + ../common/playerstats.qc + ../common/test.qc + ../common/urllib.qc + ../common/util.qc + ../common/weapons/config.qc + ../common/weapons/weapons.qc // TODO - t_quake3.qc - t_halflife.qc - t_quake.qc - - race.qc - - - //// tZork Turrets //// - tturrets/include/turrets.qh - vehicles/vehicles.qh - - scores.qc - - spawnpoints.qc - - portals.qc - - target_spawn.qc - func_breakable.qc - target_music.qc - - ../common/items.qc - - - accuracy.qc ../csqcmodellib/sv_model.qc - csqcprojectile.qc - - playerdemo.qc - - anticheat.qc - cheats.qc - playerstats.qc - - round_handler.qc - - ../common/explosion_equation.qc - - mutators/base.qc - mutators/gamemode_assault.qc - mutators/gamemode_arena.qc - mutators/gamemode_ca.qc - mutators/gamemode_ctf.qc - mutators/gamemode_domination.qc - mutators/gamemode_freezetag.qc - mutators/gamemode_keyhunt.qc - mutators/gamemode_keepaway.qc - mutators/gamemode_nexball.qc - mutators/gamemode_onslaught.qc - mutators/gamemode_lms.qc - mutators/mutator_invincibleproj.qc - mutators/mutator_new_toys.qc - mutators/mutator_nix.qc - mutators/mutator_dodging.qc - mutators/mutator_rocketflying.qc - mutators/mutator_vampire.qc - mutators/mutator_spawn_near_teammate.qc - mutators/mutator_physical_items.qc - mutators/sandbox.qc - mutators/mutator_superspec.qc - mutators/mutator_minstagib.qc - mutators/mutator_touchexplode.qc - mutators/mutator_pinata.qc - mutators/mutator_midair.qc - mutators/mutator_bloodloss.qc - mutators/mutator_random_gravity.qc - mutators/mutator_multijump.qc - mutators/mutator_melee_only.qc - mutators/mutator_nades.qc - mutators/mutator_campcheck.qc ../warpzonelib/anglestransform.qc - ../warpzonelib/mathlib.qc ../warpzonelib/common.qc - ../warpzonelib/util_server.qc + ../warpzonelib/mathlib.qc ../warpzonelib/server.qc - - ../common/animdecide.qc - ../common/test.qc - ../common/util.qc - ../common/notifications.qc - - ../common/if-this-file-errors-scroll-up-and-fix-the-warnings.fteqccfail + ../warpzonelib/util_server.qc diff --cc qcsrc/server/sv_main.qc index 4a61b09b0,c2d3dc7dd..59918226b --- a/qcsrc/server/sv_main.qc +++ b/qcsrc/server/sv_main.qc @@@ -245,28 -272,11 +272,28 @@@ void StartFrame (void .string gametypefilter; .string cvarfilter; float DoesQ3ARemoveThisEntity(); +.string save_classname; void SV_OnEntityPreSpawnFunction() { + self.save_classname = self.classname; + + if (autocvar_g_balance_ammodistribution_force) + { + if (self.classname == "item_shells") + self.classname = "item_ammo"; + if (self.classname == "item_bullets") + self.classname = "item_ammo"; + if (self.classname == "item_cells") + self.classname = "item_ammo"; + if (self.classname == "item_rockets") + self.classname = "item_ammo"; + if (self.classname == "item_fuel") + self.classname = "item_ammo"; + } + if (self) if (self.gametypefilter != "") - if not(isGametypeInFilter(MapInfo_LoadedGametype, teamplay, have_team_spawns, self.gametypefilter)) + if (!isGametypeInFilter(MapInfo_LoadedGametype, teamplay, have_team_spawns, self.gametypefilter)) { remove(self); return; diff --cc qcsrc/server/t_quake3.qc index 3880f2064,35b81c699..0a833de82 --- a/qcsrc/server/t_quake3.qc +++ b/qcsrc/server/t_quake3.qc @@@ -5,26 -7,25 +7,25 @@@ // NOTE: for best experience, you need to swap MGs with SGs in the map or it won't have a MG // SG -> SG -void spawnfunc_ammo_shells() { spawnfunc_item_shells(); } +void spawnfunc_ammo_shells() { spawnfunc_item_ammo(); } // MG -> MG - void spawnfunc_weapon_machinegun() { spawnfunc_weapon_uzi(); } -void spawnfunc_ammo_bullets() { spawnfunc_item_bullets(); } +void spawnfunc_ammo_bullets() { spawnfunc_item_ammo(); } // GL -> Mortar -void spawnfunc_ammo_grenades() { spawnfunc_item_rockets(); } +void spawnfunc_ammo_grenades() { spawnfunc_item_ammo(); } - // LG -> Electro + // LG -> Lightning void spawnfunc_weapon_lightning() { spawnfunc_weapon_electro(); } -void spawnfunc_ammo_lightning() { spawnfunc_item_cells(); } +void spawnfunc_ammo_lightning() { spawnfunc_item_ammo(); } // Plasma -> Hagar void spawnfunc_weapon_plasmagun() { spawnfunc_weapon_hagar(); } -void spawnfunc_ammo_cells() { spawnfunc_item_rockets(); } +void spawnfunc_ammo_cells() { spawnfunc_item_ammo(); } - // Rail -> Nex - void spawnfunc_weapon_railgun() { spawnfunc_weapon_nex(); } + // Rail -> Vortex -void spawnfunc_weapon_railgun() { spawnfunc_weapon_vortex(); } -void spawnfunc_ammo_slugs() { spawnfunc_item_plasma(); } ++void spawnfunc_weapon_railgun() { spawnfunc_weapon_vortex(); } +void spawnfunc_ammo_slugs() { spawnfunc_item_ammo(); } // BFG -> Crylink void spawnfunc_weapon_bfg() { spawnfunc_weapon_crylink(); }