From: Mario Date: Sun, 2 Aug 2020 07:48:46 +0000 (+1000) Subject: Some more defs.qh cleanup, update gameplay hash (again) X-Git-Tag: xonotic-v0.8.5~801 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0394852103d5d410a54f14daa6fc698d0cdbd74f;p=xonotic%2Fxonotic-data.pk3dir.git Some more defs.qh cleanup, update gameplay hash (again) --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cbd7e78f5..2f2fd4f2f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -29,7 +29,7 @@ test_sv_game: - wget -O data/maps/stormkeep.waypoints https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints - wget -O data/maps/stormkeep.waypoints.cache https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints.cache - make - - EXPECT=339f4bfdb1d6e302024e1a260336557a + - EXPECT=040aeef53953a85c5891c0c39cf9860f - HASH=$(${ENGINE} -noconfig -nohome +exec serverbench.cfg | tee /dev/stderr | grep '^:' diff --git a/qcsrc/common/gamemodes/gamemode/assault/sv_assault.qc b/qcsrc/common/gamemodes/gamemode/assault/sv_assault.qc index 89dfa6f1e..ca92bc622 100644 --- a/qcsrc/common/gamemodes/gamemode/assault/sv_assault.qc +++ b/qcsrc/common/gamemodes/gamemode/assault/sv_assault.qc @@ -1,5 +1,6 @@ #include "sv_assault.qh" +#include #include #include #include diff --git a/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc b/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc index 16f9299f1..e4256c68f 100644 --- a/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc +++ b/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc @@ -3,9 +3,11 @@ #include #include #include +#include #include #include #include +#include #include #include diff --git a/qcsrc/common/gamemodes/gamemode/domination/sv_domination.qc b/qcsrc/common/gamemodes/gamemode/domination/sv_domination.qc index 6e333c17e..88e20af00 100644 --- a/qcsrc/common/gamemodes/gamemode/domination/sv_domination.qc +++ b/qcsrc/common/gamemodes/gamemode/domination/sv_domination.qc @@ -1,7 +1,9 @@ #include "sv_domination.qh" +#include #include #include +#include bool g_domination; diff --git a/qcsrc/common/gamemodes/gamemode/keyhunt/sv_keyhunt.qc b/qcsrc/common/gamemodes/gamemode/keyhunt/sv_keyhunt.qc index d13ec1ac8..df538cbe4 100644 --- a/qcsrc/common/gamemodes/gamemode/keyhunt/sv_keyhunt.qc +++ b/qcsrc/common/gamemodes/gamemode/keyhunt/sv_keyhunt.qc @@ -1,5 +1,6 @@ #include "sv_keyhunt.qh" +#include #include #include diff --git a/qcsrc/common/gamemodes/gamemode/lms/sv_lms.qc b/qcsrc/common/gamemodes/gamemode/lms/sv_lms.qc index 3a7bc1dfe..5af604433 100644 --- a/qcsrc/common/gamemodes/gamemode/lms/sv_lms.qc +++ b/qcsrc/common/gamemodes/gamemode/lms/sv_lms.qc @@ -3,6 +3,7 @@ #include #include #include +#include int autocvar_g_lms_extra_lives; bool autocvar_g_lms_join_anytime; diff --git a/qcsrc/common/gamemodes/gamemode/nexball/sv_nexball.qc b/qcsrc/common/gamemodes/gamemode/nexball/sv_nexball.qc index 6ae5b2763..2144a0008 100644 --- a/qcsrc/common/gamemodes/gamemode/nexball/sv_nexball.qc +++ b/qcsrc/common/gamemodes/gamemode/nexball/sv_nexball.qc @@ -1,5 +1,6 @@ #include "sv_nexball.qh" +#include #include #include diff --git a/qcsrc/common/gamemodes/gamemode/nexball/sv_nexball.qh b/qcsrc/common/gamemodes/gamemode/nexball/sv_nexball.qh index d7cde3a73..864e89138 100644 --- a/qcsrc/common/gamemodes/gamemode/nexball/sv_nexball.qh +++ b/qcsrc/common/gamemodes/gamemode/nexball/sv_nexball.qh @@ -32,3 +32,5 @@ float nb_teams; .float nb_droptime; .float teamtime; + +float g_nexball_meter_period; diff --git a/qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc b/qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc index 1c051855e..975c1192f 100644 --- a/qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc +++ b/qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc @@ -2,7 +2,9 @@ #include "sv_controlpoint.qh" #include "sv_generator.qh" +#include #include +#include #include bool g_onslaught; diff --git a/qcsrc/common/gamemodes/sv_rules.qc b/qcsrc/common/gamemodes/sv_rules.qc index a4a4bcd19..c6048b808 100644 --- a/qcsrc/common/gamemodes/sv_rules.qc +++ b/qcsrc/common/gamemodes/sv_rules.qc @@ -1,5 +1,6 @@ #include "sv_rules.qh" +#include #include void GameRules_teams(bool value) diff --git a/qcsrc/common/mapobjects/func/rotating.qc b/qcsrc/common/mapobjects/func/rotating.qc index 1864b6dfe..cf1710249 100644 --- a/qcsrc/common/mapobjects/func/rotating.qc +++ b/qcsrc/common/mapobjects/func/rotating.qc @@ -55,7 +55,7 @@ void func_rotating_init_for_player(entity this, entity player) Brush model that spins in place on one axis (default Z). speed : speed to rotate (in degrees per second) noise : path/name of looping .wav file to play. -dmg : Do this mutch dmg every .dmgtime intervall when blocked +dmg : Do this much damage every .dmgtime interval when blocked dmgtime : See above. */ diff --git a/qcsrc/common/mapobjects/func/train.qh b/qcsrc/common/mapobjects/func/train.qh index 0b2a099c5..a25c33198 100644 --- a/qcsrc/common/mapobjects/func/train.qh +++ b/qcsrc/common/mapobjects/func/train.qh @@ -4,7 +4,3 @@ const int TRAIN_CURVE = BIT(0); const int TRAIN_TURN = BIT(1); const int TRAIN_NEEDACTIVATION = BIT(2); - -#ifdef CSQC -.float dmgtime; -#endif diff --git a/qcsrc/common/mapobjects/platforms.qh b/qcsrc/common/mapobjects/platforms.qh index 346cebc71..3276cf453 100644 --- a/qcsrc/common/mapobjects/platforms.qh +++ b/qcsrc/common/mapobjects/platforms.qh @@ -3,13 +3,15 @@ const int PLAT_LOW_TRIGGER = BIT(0); +.float dmg; +.float dmgtime; .float dmgtime2; +.float phase; + void plat_center_touch(entity this, entity toucher); void plat_outside_touch(entity this, entity toucher); void plat_trigger_use(entity this, entity actor, entity trigger); void plat_go_up(entity this); void plat_go_down(entity this); void plat_crush(entity this, entity blocker); - -.float dmg; diff --git a/qcsrc/common/mapobjects/triggers.qh b/qcsrc/common/mapobjects/triggers.qh index 513ff127e..2ca91a09b 100644 --- a/qcsrc/common/mapobjects/triggers.qh +++ b/qcsrc/common/mapobjects/triggers.qh @@ -12,6 +12,8 @@ // used elsewhere (will fix) #ifdef SVQC +.string message2; + void trigger_common_write(entity this, bool withtarget); string trigger_magicear_processmessage_forallears(entity source, float teamsay, entity privatesay, string msgin); diff --git a/qcsrc/common/monsters/sv_monsters.qc b/qcsrc/common/monsters/sv_monsters.qc index 1bc1b8d98..974f69e5b 100644 --- a/qcsrc/common/monsters/sv_monsters.qc +++ b/qcsrc/common/monsters/sv_monsters.qc @@ -19,6 +19,7 @@ #include "../turrets/util.qh" #include "../vehicles/all.qh" #include +#include #include #include #include "../mapobjects/triggers.qh" diff --git a/qcsrc/common/stats.qh b/qcsrc/common/stats.qh index 5bbc4dd26..37ef7d13b 100644 --- a/qcsrc/common/stats.qh +++ b/qcsrc/common/stats.qh @@ -64,8 +64,8 @@ REGISTER_STAT(KH_KEYS, int) #ifdef SVQC float W_WeaponRateFactor(entity this); float game_stopped; -float game_starttime; -float round_starttime; +float game_starttime; //point in time when the countdown to game start is over +float round_starttime; //point in time when the countdown to round start is over bool autocvar_g_allow_oldvortexbeam; int autocvar_leadlimit; #endif diff --git a/qcsrc/common/turrets/sv_turrets.qc b/qcsrc/common/turrets/sv_turrets.qc index e72b62559..20af4197c 100644 --- a/qcsrc/common/turrets/sv_turrets.qc +++ b/qcsrc/common/turrets/sv_turrets.qc @@ -2,6 +2,7 @@ #ifdef SVQC #include #include +#include #include #include diff --git a/qcsrc/common/vehicles/sv_vehicles.qc b/qcsrc/common/vehicles/sv_vehicles.qc index 5c3e913c6..46a604ae2 100644 --- a/qcsrc/common/vehicles/sv_vehicles.qc +++ b/qcsrc/common/vehicles/sv_vehicles.qc @@ -1,6 +1,7 @@ #include "sv_vehicles.qh" #include +#include #include #include #include diff --git a/qcsrc/common/vehicles/sv_vehicles.qh b/qcsrc/common/vehicles/sv_vehicles.qh index 0d707b52f..a92da29fb 100644 --- a/qcsrc/common/vehicles/sv_vehicles.qh +++ b/qcsrc/common/vehicles/sv_vehicles.qh @@ -67,6 +67,8 @@ const float VHSF_FACTORY = 2; .float dmg_time; +.float pain_frame; + .float play_time; .int volly_counter; diff --git a/qcsrc/common/weapons/weapon/vortex.qh b/qcsrc/common/weapons/weapon/vortex.qh index a2b0a4b1d..74bf35ce4 100644 --- a/qcsrc/common/weapons/weapon/vortex.qh +++ b/qcsrc/common/weapons/weapon/vortex.qh @@ -68,6 +68,8 @@ SPAWNFUNC_WEAPON(weapon_vortex, WEP_VORTEX) SPAWNFUNC_WEAPON(weapon_nex, WEP_VORTEX) #ifdef SVQC +.float vortex_charge_rottime; + .float vortex_lasthit; void W_Vortex_Charge(entity actor, .entity weaponentity, float dt); diff --git a/qcsrc/server/bot/default/havocbot/havocbot.qc b/qcsrc/server/bot/default/havocbot/havocbot.qc index d388b1505..341ba7ac6 100644 --- a/qcsrc/server/bot/default/havocbot/havocbot.qc +++ b/qcsrc/server/bot/default/havocbot/havocbot.qc @@ -2,7 +2,9 @@ #include "roles.qh" +#include #include +#include #include #include #include diff --git a/qcsrc/server/bot/default/havocbot/roles.qc b/qcsrc/server/bot/default/havocbot/roles.qc index 8081097b4..33d6ec1e7 100644 --- a/qcsrc/server/bot/default/havocbot/roles.qc +++ b/qcsrc/server/bot/default/havocbot/roles.qc @@ -2,6 +2,7 @@ #include #include +#include #include #include #include "havocbot.qh" diff --git a/qcsrc/server/cheats.qh b/qcsrc/server/cheats.qh index 3ff0f6a77..4a730d77f 100644 --- a/qcsrc/server/cheats.qh +++ b/qcsrc/server/cheats.qh @@ -17,6 +17,10 @@ const float CHRAME_DRAG = 8; // speedrun: when 1, player auto teleports back when capture timeout happens .bool speedrunning; +.entity personal; + +.int grab; // 0 = can't grab, 1 = owner can grab, 2 = owner and team mates can grab, 3 = anyone can grab + bool drag_undraggable(entity draggee, entity dragger); .bool(entity this, entity dragger) draggable; diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 245ada1e1..5c8baee6d 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -49,6 +49,7 @@ #include "../common/vehicles/all.qh" #include "weapons/hitplot.qh" +#include "weapons/selection.qh" #include "weapons/weaponsystem.qh" #include "../common/net_notice.qh" @@ -59,6 +60,8 @@ #include "../common/items/_mod.qh" +#include + #include "../common/mutators/mutator/waypoints/all.qh" #include "../common/mutators/mutator/instagib/sv_instagib.qh" #include @@ -77,6 +80,8 @@ #include +#include + STATIC_METHOD(Client, Add, void(Client this, int _team)) { ClientConnect(this); @@ -335,7 +340,6 @@ void PutObserverInServer(entity this) this.alpha = 0; this.scale = 0; this.fade_time = 0; - this.pain_frame = 0; this.pain_finished = 0; STAT(STRENGTH_FINISHED, this) = 0; STAT(INVINCIBLE_FINISHED, this) = 0; @@ -618,7 +622,6 @@ void PutPlayerInServer(entity this) bool q3dfcompat = autocvar_sv_q3defragcompat && autocvar_sv_q3defragcompat_changehitbox; this.scale = ((q3dfcompat) ? 0.9 : autocvar_sv_player_scale); this.fade_time = 0; - this.pain_frame = 0; this.pain_finished = 0; this.pushltime = 0; setthink(this, func_null); // players have no think function diff --git a/qcsrc/server/client.qh b/qcsrc/server/client.qh index 83de3f024..0823e9214 100644 --- a/qcsrc/server/client.qh +++ b/qcsrc/server/client.qh @@ -43,6 +43,15 @@ .float alivetime; // time of being alive .float motd_actived_time; // used for both motd and campaign_message +.bool wasplayer; + +.int spectatee_status; +.bool zoomstate; + +.bool just_joined; + +.int pressedkeys; + void ClientState_attach(entity this); IntrusiveList g_players; @@ -271,6 +280,14 @@ METHOD(Client, m_unwind, bool(Client this)) return false; } +int autocvar__independent_players; +bool independent_players; +#define INDEPENDENT_PLAYERS (autocvar__independent_players ? (autocvar__independent_players > 0) : independent_players) +#define IS_INDEPENDENT_PLAYER(e) ((e).solid == SOLID_TRIGGER) +#define MAKE_INDEPENDENT_PLAYER(e) (((e).solid = SOLID_TRIGGER), ((e).frags = FRAGS_PLAYER_OUT_OF_GAME)) + +.int killcount; + //flood fields .float nickspamtime; // time of last nick change .float nickspamcount; diff --git a/qcsrc/server/command/common.qc b/qcsrc/server/command/common.qc index c9e8b595e..8fd39070f 100644 --- a/qcsrc/server/command/common.qc +++ b/qcsrc/server/command/common.qc @@ -2,6 +2,7 @@ #include #include +#include #include #include diff --git a/qcsrc/server/command/vote.qc b/qcsrc/server/command/vote.qc index f98242ad6..b31b4ed0d 100644 --- a/qcsrc/server/command/vote.qc +++ b/qcsrc/server/command/vote.qc @@ -1,5 +1,6 @@ #include "vote.qh" +#include #include #include #include diff --git a/qcsrc/server/command/vote.qh b/qcsrc/server/command/vote.qh index 988e91bbc..99f0acb3e 100644 --- a/qcsrc/server/command/vote.qh +++ b/qcsrc/server/command/vote.qh @@ -50,6 +50,9 @@ float readycount; // amount of players who are ready float readyrestart_happened; // keeps track of whether a restart has already happened float restart_mapalreadyrestarted; // bool, indicates whether reset_map() was already executed .float ready; // flag for if a player is ready +.int team_saved; // team number to restore upon map reset +.void(entity this) reset; // if set, an entity is reset using this +.void(entity this) reset2; // if set, an entity is reset using this (after calling ALL the reset functions for other entities) void reset_map(float dorespawn); void ReadyCount(); void ReadyRestart_force(); diff --git a/qcsrc/server/compat/quake3.qc b/qcsrc/server/compat/quake3.qc index 4c8073b1a..0433636d6 100644 --- a/qcsrc/server/compat/quake3.qc +++ b/qcsrc/server/compat/quake3.qc @@ -1,5 +1,6 @@ #include "quake3.qh" +#include #include #include #include diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh index 1e91f635d..d65ebf2a5 100644 --- a/qcsrc/server/defs.qh +++ b/qcsrc/server/defs.qh @@ -3,34 +3,12 @@ #include #include -// Globals - -float g_footsteps, g_grappling_hook; -float g_warmup_allguns; -float g_warmup_allow_timeout; -float warmup_stage; -float g_jetpack; - -bool sv_ready_restart; -bool sv_ready_restart_after_countdown; -bool sv_ready_restart_repeatable; - -float sv_clones; -float sv_foginterval; - // Fields -//.string wad; -//.string map; - -//.float worldtype; - .float pain_finished; //Added by Supajoe -.float pain_frame; //" .float cnt; // used in too many places .float count; -//.float cnt2; .float fade_time; .float fade_rate; @@ -42,26 +20,6 @@ float sv_foginterval; .float species; -.float scheduledrespawntime; -.float respawntime; -.float respawntimejitter; -.float respawntimestart; -//.float chasecam; - -//.float gravity; - -.float dmg; - -// for railgun damage (hitting multiple enemies) -.bool railgunhit; -.float railgunhitsolidbackup; -.vector railgunhitloc; - -.float dmgtime; - -.float killcount; -.float damage_dealt, typehitsound, killsound; - // string overrides entity .string item_pickupsound; .entity item_pickupsound_ent; @@ -69,89 +27,17 @@ float sv_foginterval; .float winning; -.float spawnshieldtime; - .int playerid; -.float noalign; // if set to 1, the item or spawnpoint won't be dropped to the floor - -.vector death_origin; float default_player_alpha; float default_weapon_alpha; -.int team_saved; - -bool some_spawn_has_been_used; -int have_team_spawns; // 0 = no team spawns requested, -1 = team spawns requested but none found, 1 = team spawns requested and found -int have_team_spawns_forteams; // if Xth bit is 1 then team X has spawns else it has no spawns; team 0 is the "no-team" - -.bool canteamdamage; - -int autocvar__independent_players; -bool independent_players; -#define INDEPENDENT_PLAYERS (autocvar__independent_players ? (autocvar__independent_players > 0) : independent_players) -#define IS_INDEPENDENT_PLAYER(e) ((e).solid == SOLID_TRIGGER) -#define MAKE_INDEPENDENT_PLAYER(e) (((e).solid = SOLID_TRIGGER), ((e).frags = FRAGS_PLAYER_OUT_OF_GAME)) - -string clientstuff; -.float phase; -.int pressedkeys; - -.string fog; - -string cvar_changes; -string cvar_purechanges; -float cvar_purechanges_count; - -//float game_starttime; //point in time when the countdown to game start is over -//float round_starttime; //point in time when the countdown to round start is over - -.int projectiledeathtype; - -.string message2; - -// reset to 0 on weapon switch -// may be useful to all weapons -.float bulletcounter; - -// Nexball -float g_nexball_meter_period; - -.void(entity this) reset; // if set, an entity is reset using this -.void(entity this) reset2; // if set, an entity is reset using this (after calling ALL the reset functions for other entities) - -.bool wasplayer; - -string matchid; - -.int minelayer_mines; -.float vortex_charge; -.float vortex_charge_rottime; -.float vortex_chargepool_ammo; -.float oknex_charge; -.float oknex_charge_rottime; -.float oknex_chargepool_ammo; -.int hagar_load; - -.int grab; // 0 = can't grab, 1 = owner can grab, 2 = owner and team mates can grab, 3 = anyone can grab - -.int spectatee_status; -.bool zoomstate; - -.entity personal; - -.bool just_joined; - .entity realowner; -//float serverflags; - .bool player_blocked; //// -.WepSet dual_weapons; - IntrusiveList g_monsters; IntrusiveList g_waypoints; IntrusiveList g_vehicles; diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index a7ebbcb77..30e8d51ae 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -3,6 +3,7 @@ #include #include "bot/api.qh" #include "g_hook.qh" +#include #include #include #include diff --git a/qcsrc/server/g_damage.qh b/qcsrc/server/g_damage.qh index 2209bada1..f6ae1d5e0 100644 --- a/qcsrc/server/g_damage.qh +++ b/qcsrc/server/g_damage.qh @@ -59,8 +59,16 @@ float damage_gooddamage; .bool istypefrag; .float taunt_soundtime; +.float spawnshieldtime; + .int totalfrags; +.bool canteamdamage; + +.vector death_origin; + +.float damage_dealt, typehitsound, killsound; + // used for custom deathtype string deathmessage; diff --git a/qcsrc/server/g_hook.qc b/qcsrc/server/g_hook.qc index e1b435207..79572f63b 100644 --- a/qcsrc/server/g_hook.qc +++ b/qcsrc/server/g_hook.qc @@ -11,6 +11,7 @@ #include "weapons/tracing.qh" #include "player.qh" #include "command/common.qh" +#include "command/vote.qh" #include "round_handler.qh" #include "../common/state.qh" #include "../common/physics/player.qh" diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index 5dddc2fb3..00ee7205b 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -12,12 +12,14 @@ #include "command/vote.qh" #include "g_hook.qh" #include +#include #include "ipban.qh" #include "mapvoting.qh" #include #include "race.qh" #include "scores.qh" #include "scores_rules.qh" +#include "spawnpoints.qh" #include "teamplay.qh" #include "weapons/weaponstats.qh" #include "../common/constants.qh" diff --git a/qcsrc/server/g_world.qh b/qcsrc/server/g_world.qh index 3d6276384..ceb7a4a4b 100644 --- a/qcsrc/server/g_world.qh +++ b/qcsrc/server/g_world.qh @@ -8,10 +8,20 @@ float checkrules_overtimesadded; //how many overtimes have been already added // flag set on worldspawn so that the code knows if it is dedicated or not bool server_is_dedicated; +string cvar_changes; +string cvar_purechanges; +float cvar_purechanges_count; + string modname; string gamemode_name; +string clientstuff; + +string matchid; + +.string fog; + float intermission_running; float intermission_exittime; float alreadychangedlevel; diff --git a/qcsrc/server/impulse.qc b/qcsrc/server/impulse.qc index f066615f3..521c2223f 100644 --- a/qcsrc/server/impulse.qc +++ b/qcsrc/server/impulse.qc @@ -6,6 +6,7 @@ #include "cheats.qh" #include "client.qh" #include "clientkill.qh" +#include "g_damage.qh" #include "weapons/selection.qh" #include "weapons/tracing.qh" #include "weapons/weaponsystem.qh" diff --git a/qcsrc/server/items/items.qc b/qcsrc/server/items/items.qc index ffd7c1320..44cd6ba28 100644 --- a/qcsrc/server/items/items.qc +++ b/qcsrc/server/items/items.qc @@ -4,6 +4,8 @@ #include +#include + #include #include diff --git a/qcsrc/server/items/items.qh b/qcsrc/server/items/items.qh index 96d61b0c2..0fbfab3ec 100644 --- a/qcsrc/server/items/items.qh +++ b/qcsrc/server/items/items.qh @@ -16,8 +16,15 @@ const float ITEM_RESPAWN_TICKS = 10; .float max_armorvalue; .float pickup_anyway; +.float scheduledrespawntime; +.float respawntime; +.float respawntimejitter; +.float respawntimestart; + .float item_respawncounter; +.float noalign; // if set to 1, the item or spawnpoint won't be dropped to the floor + .float superweapons_finished; // NOTE: this field is used only by map entities, it does not directly apply the superweapons stat // delay before this item can be picked up diff --git a/qcsrc/server/items/spawning.qc b/qcsrc/server/items/spawning.qc index f1c8796c7..d2f1530c6 100644 --- a/qcsrc/server/items/spawning.qc +++ b/qcsrc/server/items/spawning.qc @@ -5,6 +5,7 @@ /// creation of game items. /// \copyright GNU GPLv2 or any later version. +#include #include #include #include diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index 6983803dc..a2409290f 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -4,6 +4,7 @@ #include "command/common.qh" #include "client.qh" #include "constants.qh" +#include "g_damage.qh" #include "g_hook.qh" #include "g_world.qh" #include diff --git a/qcsrc/server/miscfunctions.qh b/qcsrc/server/miscfunctions.qh index c73a107b5..aab5081d5 100644 --- a/qcsrc/server/miscfunctions.qh +++ b/qcsrc/server/miscfunctions.qh @@ -199,6 +199,19 @@ void readplayerstartcvars(); float sv_autotaunt; float sv_taunt; +float g_footsteps, g_grappling_hook; +float g_warmup_allguns; +float g_warmup_allow_timeout; +float warmup_stage; +float g_jetpack; + +bool sv_ready_restart; +bool sv_ready_restart_after_countdown; +bool sv_ready_restart_repeatable; + +float sv_clones; +float sv_foginterval; + void readlevelcvars() { if(cvar("sv_allow_fullbright")) diff --git a/qcsrc/server/player.qc b/qcsrc/server/player.qc index 3138ffd43..3795066fe 100644 --- a/qcsrc/server/player.qc +++ b/qcsrc/server/player.qc @@ -13,6 +13,7 @@ #include #include "weapons/throwing.qh" #include "command/common.qh" +#include "command/vote.qh" #include "../common/state.qh" #include "../common/anim.qh" #include "../common/animdecide.qh" diff --git a/qcsrc/server/portals.qc b/qcsrc/server/portals.qc index 83a0d3425..6e997d6b3 100644 --- a/qcsrc/server/portals.qc +++ b/qcsrc/server/portals.qc @@ -3,6 +3,7 @@ #include #include "g_hook.qh" #include "mutators/_mod.qh" +#include #include "../common/constants.qh" #include "../common/deathtypes/all.qh" #include "../common/notifications/all.qh" diff --git a/qcsrc/server/race.qc b/qcsrc/server/race.qc index eb4b8742e..d2eeecbb4 100644 --- a/qcsrc/server/race.qc +++ b/qcsrc/server/race.qc @@ -5,6 +5,7 @@ #include #include #include "client.qh" +#include "cheats.qh" #include "portals.qh" #include "scores.qh" #include "spawnpoints.qh" diff --git a/qcsrc/server/spawnpoints.qc b/qcsrc/server/spawnpoints.qc index 3dc76afc0..12c0a6b3c 100644 --- a/qcsrc/server/spawnpoints.qc +++ b/qcsrc/server/spawnpoints.qc @@ -15,6 +15,7 @@ #include "../lib/warpzone/common.qh" #include "../lib/warpzone/util_server.qh" #include +#include bool SpawnPoint_Send(entity this, entity to, int sf) { diff --git a/qcsrc/server/spawnpoints.qh b/qcsrc/server/spawnpoints.qh index b9e20ec0f..1221db6b2 100644 --- a/qcsrc/server/spawnpoints.qh +++ b/qcsrc/server/spawnpoints.qh @@ -6,6 +6,10 @@ const int SPAWN_PRIO_NEAR_TEAMMATE_SAMETEAM = 100; const int SPAWN_PRIO_RACE_PREVIOUS_SPAWN = 50; const int SPAWN_PRIO_GOOD_DISTANCE = 10; +bool some_spawn_has_been_used; +int have_team_spawns; // 0 = no team spawns requested, -1 = team spawns requested but none found, 1 = team spawns requested and found +int have_team_spawns_forteams; // if Xth bit is 1 then team X has spawns else it has no spawns; team 0 is the "no-team" + .vector spawnpoint_score; float spawnpoint_nag; bool SpawnEvent_Send(entity this, entity to, int sf); diff --git a/qcsrc/server/sv_main.qc b/qcsrc/server/sv_main.qc index 09446203d..e43eb5320 100644 --- a/qcsrc/server/sv_main.qc +++ b/qcsrc/server/sv_main.qc @@ -4,6 +4,7 @@ #include "g_hook.qh" #include "g_damage.qh" #include "g_world.qh" +#include "spawnpoints.qh" #include #include "bot/api.qh" @@ -31,12 +32,12 @@ void CreatureFrame_hotliquids(entity this) { - if (this.dmgtime >= time) + if (this.contents_damagetime >= time) { return; } - this.dmgtime = time + autocvar_g_balance_contents_damagerate; + this.contents_damagetime = time + autocvar_g_balance_contents_damagerate; if (this.flags & FL_PROJECTILE) { @@ -84,7 +85,7 @@ void CreatureFrame_Liquids(entity this) if (!(this.flags & FL_INWATER)) { this.flags |= FL_INWATER; - this.dmgtime = 0; + this.contents_damagetime = 0; } CreatureFrame_hotliquids(this); @@ -95,7 +96,7 @@ void CreatureFrame_Liquids(entity this) { // play leave water sound this.flags &= ~FL_INWATER; - this.dmgtime = 0; + this.contents_damagetime = 0; } } } diff --git a/qcsrc/server/sv_main.qh b/qcsrc/server/sv_main.qh index 04630374b..628684585 100644 --- a/qcsrc/server/sv_main.qh +++ b/qcsrc/server/sv_main.qh @@ -15,6 +15,8 @@ float servertime, serverprevtime, serverframetime; .bool iscreature; +.float contents_damagetime; + /* ================== main diff --git a/qcsrc/server/weapons/accuracy.qc b/qcsrc/server/weapons/accuracy.qc index a53adb624..0b895ea37 100644 --- a/qcsrc/server/weapons/accuracy.qc +++ b/qcsrc/server/weapons/accuracy.qc @@ -1,5 +1,6 @@ #include "accuracy.qh" +#include #include #include #include diff --git a/qcsrc/server/weapons/common.qh b/qcsrc/server/weapons/common.qh index d9b3b0cd4..d26eb5cb8 100644 --- a/qcsrc/server/weapons/common.qh +++ b/qcsrc/server/weapons/common.qh @@ -10,6 +10,8 @@ void W_PrepareExplosionByDamage(entity this, entity attacker, void(entity this) .float misc_bulletcounter; +.int projectiledeathtype; + #define PROJECTILE_MAKETRIGGER(e) (e).solid = SOLID_CORPSE; (e).dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_CORPSE // when doing this, hagar can go through clones // #define PROJECTILE_MAKETRIGGER(e) (e).solid = SOLID_BBOX diff --git a/qcsrc/server/weapons/hitplot.qc b/qcsrc/server/weapons/hitplot.qc index e79e9ddb6..b90a855e1 100644 --- a/qcsrc/server/weapons/hitplot.qc +++ b/qcsrc/server/weapons/hitplot.qc @@ -1,6 +1,7 @@ #include "hitplot.qh" #include +#include #include #include "../antilag.qh" #include diff --git a/qcsrc/server/weapons/selection.qh b/qcsrc/server/weapons/selection.qh index 4fdb9af90..94987d20a 100644 --- a/qcsrc/server/weapons/selection.qh +++ b/qcsrc/server/weapons/selection.qh @@ -5,6 +5,8 @@ .int selectweapon; // last selected weapon of the player +.WepSet dual_weapons; + // switch between weapons void Send_WeaponComplain(entity e, float wpn, float type); diff --git a/qcsrc/server/weapons/tracing.qh b/qcsrc/server/weapons/tracing.qh index b8575ecae..c786798ac 100644 --- a/qcsrc/server/weapons/tracing.qh +++ b/qcsrc/server/weapons/tracing.qh @@ -64,6 +64,11 @@ void W_SetupProjVelocity_Explicit(entity proj, vector dir, vector upDir, float p .float ballistics_density; +// for railgun damage (hitting multiple enemies) +.bool railgunhit; +.float railgunhitsolidbackup; +.vector railgunhitloc; + .float railgundistance; .vector railgunforce; void FireRailgunBullet (entity this, .entity weaponentity, vector start, vector end, float bdamage, bool headshot_notify, float bforce, float mindist, float maxdist, float halflifedist, float forcehalflifedist, int deathtype); diff --git a/qcsrc/server/weapons/weaponsystem.qc b/qcsrc/server/weapons/weaponsystem.qc index 73727759b..cbfba4c9f 100644 --- a/qcsrc/server/weapons/weaponsystem.qc +++ b/qcsrc/server/weapons/weaponsystem.qc @@ -3,6 +3,7 @@ #include "selection.qh" #include "../command/common.qh" +#include #include #include #include "../round_handler.qh" @@ -11,6 +12,7 @@ #include #include #include +#include #include #include #include diff --git a/qcsrc/server/weapons/weaponsystem.qh b/qcsrc/server/weapons/weaponsystem.qh index 23d1e5972..d1223c6d5 100644 --- a/qcsrc/server/weapons/weaponsystem.qh +++ b/qcsrc/server/weapons/weaponsystem.qh @@ -14,6 +14,10 @@ const int W_TICSPERFRAME = 2; float internalteam; entity weapon_dropevent_item; +// reset to 0 on weapon switch +// may be useful to all weapons +.float bulletcounter; + ..entity weaponentity_fld; .float weapon_load[REGISTRY_MAX(Weapons)];