]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Some more defs.qh cleanup, update gameplay hash
authorMario <mario.mario@y7mail.com>
Sun, 2 Aug 2020 06:08:35 +0000 (16:08 +1000)
committerMario <mario.mario@y7mail.com>
Sun, 2 Aug 2020 06:08:35 +0000 (16:08 +1000)
46 files changed:
.gitlab-ci.yml
qcsrc/common/gamemodes/gamemode/assault/sv_assault.qc
qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc
qcsrc/common/gamemodes/gamemode/cts/sv_cts.qc
qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc
qcsrc/common/gamemodes/gamemode/race/sv_race.qc
qcsrc/common/mapobjects/target/spawn.qc
qcsrc/common/mapobjects/teleporters.qc
qcsrc/common/mapobjects/teleporters.qh
qcsrc/common/mapobjects/trigger/jumppads.qc
qcsrc/common/monsters/sv_monsters.qc
qcsrc/common/mutators/mutator/buffs/sv_buffs.qc
qcsrc/common/physics/player.qc
qcsrc/common/physics/player.qh
qcsrc/common/playerstats.qc
qcsrc/common/vehicles/sv_vehicles.qc
qcsrc/common/vehicles/vehicle/racer.qc
qcsrc/lib/warpzone/server.qc
qcsrc/server/bot/api.qh
qcsrc/server/bot/default/bot.qc
qcsrc/server/cheats.qh
qcsrc/server/client.qc
qcsrc/server/client.qh
qcsrc/server/command/cmd.qc
qcsrc/server/command/getreplies.qc
qcsrc/server/defs.qh
qcsrc/server/g_damage.qc
qcsrc/server/g_damage.qh
qcsrc/server/g_world.qh
qcsrc/server/items/items.qc
qcsrc/server/items/items.qh
qcsrc/server/miscfunctions.qc
qcsrc/server/miscfunctions.qh
qcsrc/server/player.qc
qcsrc/server/player.qh
qcsrc/server/portals.qc
qcsrc/server/race.qc
qcsrc/server/race.qh
qcsrc/server/round_handler.qc
qcsrc/server/spawnpoints.qh
qcsrc/server/sv_main.qh
qcsrc/server/weapons/accuracy.qc
qcsrc/server/weapons/common.qc
qcsrc/server/weapons/common.qh
qcsrc/server/weapons/selection.qh
qcsrc/server/weapons/tracing.qh

index 2f2fd4f2f5d9c43bf212ed09f420eb3178fec310..cbd7e78f567aefca1fd211a6f7659c06e3ecbfd1 100644 (file)
@@ -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=040aeef53953a85c5891c0c39cf9860f
+    - EXPECT=339f4bfdb1d6e302024e1a260336557a
     - HASH=$(${ENGINE} -noconfig -nohome +exec serverbench.cfg
       | tee /dev/stderr
       | grep '^:'
index 8c175554b10d8dc65678c3bf717b5cb81b907592..89dfa6f1e6f0380eed1b250543ba93d95ee30cfe 100644 (file)
@@ -1,6 +1,7 @@
 #include "sv_assault.qh"
 
 #include <common/mapobjects/func/breakable.qh>
+#include <server/g_damage.qh>
 #include <server/spawnpoints.qh>
 
 .entity sprite;
index bf0db40cd2a33b29496e95d092dbc6030e5b942d..16f9299f1540b3022fd79a40963c43c93526fbff 100644 (file)
@@ -1,9 +1,12 @@
 #include "sv_ctf.qh"
 
 #include <common/effects/all.qh>
+#include <common/mapobjects/teleporters.qh>
 #include <common/vehicles/all.qh>
 #include <server/gamelog.qh>
 #include <server/g_damage.qh>
+#include <server/g_world.qh>
+#include <server/race.qh>
 #include <server/teamplay.qh>
 
 #include <lib/warpzone/common.qh>
index 3f787fa3cf558d3b636e17bf3e58eac5e60f2e9b..991423a49685e0f3aa0eb9f368eedfd338d59e3b 100644 (file)
@@ -1,6 +1,7 @@
 #include "sv_cts.qh"
 
 #include <server/race.qh>
+#include <server/g_world.qh>
 #include <server/gamelog.qh>
 #include <server/items/spawning.qh>
 
index 2a69b37c1f0002eddbb613067efc374beda155e6..1c051855ef1ea5c5535faaeea2405b11175d7518 100644 (file)
@@ -2,6 +2,7 @@
 #include "sv_controlpoint.qh"
 #include "sv_generator.qh"
 
+#include <server/g_damage.qh>
 #include <common/mapobjects/defs.qh>
 
 bool g_onslaught;
index 35a7d950a18f86c2aa4b090d52fee65c95b509e0..de3967c8a7731596218afb27b8d600d09fba6b87 100644 (file)
@@ -1,5 +1,6 @@
 #include "sv_race.qh"
 
+#include <server/g_world.qh>
 #include <server/gamelog.qh>
 #include <server/race.qh>
 
index 9c999ed4df4758612b9052a34aeb22101b85b905..8eaab68ba8c3be9ef3a03b12a971482c08fe21d2 100644 (file)
@@ -4,6 +4,7 @@
 #elif defined(SVQC)
     #include <common/util.qh>
     #include <server/defs.qh>
+    #include <server/g_world.qh>
 #endif
 
 #ifdef SVQC
index ab9c8dca570c1a3b196973b85515beb952489545..11cdf3bdd4d87c5b236ad1a03e055f383fab56e1 100644 (file)
@@ -14,6 +14,7 @@
     #include <server/constants.qh>
     #include <server/defs.qh>
     #include "../deathtypes/all.qh"
+    #include <server/sv_main.qh>
     #include "../turrets/sv_turrets.qh"
     #include "../vehicles/all.qh"
     #include <common/gamemodes/_mod.qh>
index f72f943d3612012c9c6bde5c9ecdc1507ee73c48..10c4fdfafc62cf6d5403561e59d6ff44f0d07a2a 100644 (file)
@@ -15,6 +15,7 @@ const int TELEPORT_FLAG_FORCE_TDEATH = BIT(3);
 #define TELEPORT_FLAGS_PORTAL     (TELEPORT_FLAG_SOUND | TELEPORT_FLAG_PARTICLES | TELEPORT_FLAG_TDEATH | TELEPORT_FLAG_FORCE_TDEATH)
 #define TELEPORT_FLAGS_TELEPORTER (TELEPORT_FLAG_SOUND | TELEPORT_FLAG_PARTICLES | TELEPORT_FLAG_TDEATH)
 
+.float teleportable;
 // types for .teleportable entity setting
 const int TELEPORT_NORMAL = 1; // play sounds/effects etc
 const int TELEPORT_SIMPLE = 2; // only do teleport, nothing special
index b016dde9a19287d7e8c9e77ede292ee22c69c6cb..66a9499d4bb13bf4fd392a5c3d1fd219e2f66ba5 100644 (file)
@@ -2,6 +2,7 @@
 // TODO: split target_push and put it in the target folder
 #ifdef SVQC
 #include <common/physics/movetypes/movetypes.qh>
+#include <server/sv_main.qh>
 
 void trigger_push_use(entity this, entity actor, entity trigger)
 {
index 611321c45c05e3d022c52dad089a5eecb3752e17..1bc1b8d9828220054c245bae4075f421f21cd0af 100644 (file)
 #include <server/items/items.qh>
 #include <server/mutators/_mod.qh>
 #include <server/steerlib.qh>
+#include <server/sv_main.qh>
 #include "../turrets/sv_turrets.qh"
 #include "../turrets/util.qh"
 #include "../vehicles/all.qh"
 #include <server/campaign.qh>
 #include <server/command/_mod.qh>
+#include <common/mapobjects/teleporters.qh>
 #include "../mapobjects/triggers.qh"
 #include <lib/csqcmodel/sv_model.qh>
 #include <server/round_handler.qh>
index fcbb399cbedee8e8e91e55a703f40d0ff9a29e1d..0eda6066119b4c7bfd688e13afc53d78406b3810 100644 (file)
@@ -2,6 +2,7 @@
 
 #include <common/mapobjects/target/music.qh>
 #include <common/gamemodes/_mod.qh>
+#include <server/sv_main.qh>
 
 void buffs_DelayedInit(entity this);
 
index 76bfb0334a9df8fe25f79cc7971fe78101cb8fae..f1b15502983566d4c67a8d8e700a99e4c487d654 100644 (file)
@@ -7,6 +7,7 @@
 #include <server/miscfunctions.qh>
 #include <common/mapobjects/defs.qh>
 #include "../mapobjects/trigger/viewloc.qh"
+#include <server/sv_main.qh>
 
 // client side physics
 bool Physics_Valid(string thecvar)
index 4efb16f9d2ca35f53e39bb50c7612c865bf92a15..cea9a4b91d5d2092213ce2684c70a15656ee07c7 100644 (file)
@@ -251,6 +251,9 @@ STATIC_INIT(PHYS_INPUT_BUTTON)
        .string jumpspeedcap_min;
        .string jumpspeedcap_max;
 
+       // footstep interval
+       .float nextstep;
+
        #define PHYS_INPUT_ANGLES(s)                ((s).v_angle)
        #define PHYS_WORLD_ANGLES(s)                ((s).angles)
 
index 511ac46e66eedc7a8b35ce447b328b56f1a89ff7..08ee5524e379afdf25bf845282c34211ad36bcd2 100644 (file)
@@ -8,6 +8,7 @@
     #include "../server/anticheat.qh"
     #include "../server/defs.qh"
     #include "../server/scores.qh"
+       #include <server/g_world.qh>
     #include "../server/weapons/accuracy.qh"
 #endif
 
index 066066f0bd3bab8d84a5076580ce0145346673fd..5c3e913c62e18877b2bcad4e4591bbf5aed2b9a9 100644 (file)
@@ -2,6 +2,9 @@
 
 #include <server/g_damage.qh>
 #include <common/mapobjects/defs.qh>
+#include <common/mapobjects/teleporters.qh>
+#include <server/sv_main.qh>
+#include <server/weapons/common.qh>
 
 bool SendAuxiliaryXhair(entity this, entity to, int sf)
 {
index 784b3355e511f0e2a11aa956c2fb7bc8c882562a..423eefd1945bd78b5e1d0401fd19b698c6e06d70 100644 (file)
@@ -82,6 +82,7 @@ float autocvar_g_vehicle_racer_bouncestop = 0;
 vector autocvar_g_vehicle_racer_bouncepain = '200 0.15 150';
 
 .float racer_watertime;
+.float racer_air_finished; // TODO: use a standard air meter for entities
 
 var .vector(entity this, string tag_name, float spring_length, float max_power) racer_force_from_tag;
 
@@ -115,7 +116,7 @@ void racer_align4point(entity this, entity player, float _delta)
        {
                uforce = autocvar_g_vehicle_racer_water_upforcedamper;
 
-               if(PHYS_INPUT_BUTTON_CROUCH(player) && time < this.air_finished)
+               if(PHYS_INPUT_BUTTON_CROUCH(player) && time < this.racer_air_finished)
                        this.velocity_z += 30;
                else
                        this.velocity_z += 200;
@@ -167,9 +168,9 @@ bool racer_frame(entity this, float dt)
 
        int cont = Mod_Q1BSP_SuperContentsFromNativeContents(pointcontents(vehic.origin));
        if(!(cont & DPCONTENTS_WATER))
-               vehic.air_finished = 0;
-       else if (!vehic.air_finished)
-               vehic.air_finished = time + autocvar_g_vehicle_racer_water_time;
+               vehic.racer_air_finished = 0;
+       else if (!vehic.racer_air_finished)
+               vehic.racer_air_finished = time + autocvar_g_vehicle_racer_water_time;
 
        if(IS_DEAD(vehic))
        {
index 66ee6b133c22b2ef98cc1e1e4aae614ed21ae79d..0487c617617b5368d20d9ea6fec08395d3e52cb5 100644 (file)
@@ -7,6 +7,7 @@
        #include <common/constants.qh>
        #include <common/net_linked.qh>
        #include <common/mapobjects/subs.qh>
+       #include <common/mapobjects/teleporters.qh>
        #include <common/util.qh>
        #include <server/constants.qh>
        #include <server/defs.qh>
index 6c3d3141b2e96c27dbf822c73479af285941b97d..873c2ac62ad4bd179be2afad7526e2e4ea89fbb4 100644 (file)
@@ -4,6 +4,8 @@
 #include <common/weapons/_all.qh>
 #include <common/physics/player.qh>
 
+bool bot_waypoints_for_items;
+
 const int WAYPOINTFLAG_GENERATED = BIT(23);
 const int WAYPOINTFLAG_ITEM = BIT(22);
 const int WAYPOINTFLAG_TELEPORT = BIT(21); // teleports, warpzones and jumppads
index 90ef1e2c9258ddbd195b18f8f2809bdb933801cd..9462339a2b3c92a4d44997f90ca03ec6e99d32b2 100644 (file)
@@ -18,6 +18,7 @@
 #include "../../client.qh"
 #include "../../constants.qh"
 #include "../../defs.qh"
+#include <server/g_world.qh>
 #include <server/g_damage.qh>
 #include "../../race.qh"
 #include <server/items/items.qh>
index 962e017a19d6dad9e4919c86d53b20bb92efb84c..3ff0f6a775f78dc7f52c72f4aa6727dc8a9f96c6 100644 (file)
@@ -14,6 +14,9 @@ float CheatFrame(entity this);
 
 const float CHRAME_DRAG = 8;
 
+// speedrun: when 1, player auto teleports back when capture timeout happens
+.bool speedrunning;
+
 bool drag_undraggable(entity draggee, entity dragger);
 
 .bool(entity this, entity dragger) draggable;
index 0458b07af332d3b9f6b6d2d2c0ffdd3b4741ca7a..245ada1e1a4a521d0b526e95bb1c241197333c35 100644 (file)
@@ -22,6 +22,7 @@
 #include "g_world.qh"
 #include <server/gamelog.qh>
 #include "race.qh"
+#include <server/sv_main.qh>
 #include "antilag.qh"
 #include "campaign.qh"
 #include "command/common.qh"
@@ -339,7 +340,7 @@ void PutObserverInServer(entity this)
        STAT(STRENGTH_FINISHED, this) = 0;
        STAT(INVINCIBLE_FINISHED, this) = 0;
        STAT(SUPERWEAPONS_FINISHED, this) = 0;
-       this.air_finished = 0;
+       STAT(AIR_FINISHED, this) = 0;
        //this.dphitcontentsmask = 0;
        this.dphitcontentsmask = DPCONTENTS_SOLID;
        if (autocvar_g_playerclip_collisions)
@@ -650,7 +651,7 @@ void PutPlayerInServer(entity this)
        STAT(BUFFS, this) = 0;
        STAT(BUFF_TIME, this) = 0;
 
-       this.air_finished = 0;
+       STAT(AIR_FINISHED, this) = 0;
        this.waterlevel = WATERLEVEL_NONE;
        this.watertype = CONTENT_EMPTY;
 
@@ -1808,7 +1809,7 @@ void SpectateCopy(entity this, entity spectatee)
        STAT(STRENGTH_FINISHED, this) = STAT(STRENGTH_FINISHED, spectatee);
        STAT(INVINCIBLE_FINISHED, this) = STAT(INVINCIBLE_FINISHED, spectatee);
        STAT(SUPERWEAPONS_FINISHED, this) = STAT(SUPERWEAPONS_FINISHED, spectatee);
-       this.air_finished = spectatee.air_finished;
+       STAT(AIR_FINISHED, this) = STAT(AIR_FINISHED, spectatee);
        STAT(PRESSED_KEYS, this) = STAT(PRESSED_KEYS, spectatee);
        STAT(WEAPONS, this) = STAT(WEAPONS, spectatee);
        this.punchangle = spectatee.punchangle;
@@ -2696,21 +2697,21 @@ void DrownPlayer(entity this)
        if(IS_DEAD(this) || game_stopped || time < game_starttime || this.vehicle
                || STAT(FROZEN, this) || this.watertype != CONTENT_WATER)
        {
-               this.air_finished = 0;
+               STAT(AIR_FINISHED, this) = 0;
                return;
        }
 
        if (this.waterlevel != WATERLEVEL_SUBMERGED)
        {
-               if(this.air_finished && this.air_finished < time)
+               if(STAT(AIR_FINISHED, this) && STAT(AIR_FINISHED, this) < time)
                        PlayerSound(this, playersound_gasp, CH_PLAYER, VOL_BASE, VOICETYPE_PLAYERSOUND);
-               this.air_finished = 0;
+               STAT(AIR_FINISHED, this) = 0;
        }
        else
        {
-               if (!this.air_finished)
-                       this.air_finished = time + autocvar_g_balance_contents_drowndelay;
-               if (this.air_finished < time)
+               if (!STAT(AIR_FINISHED, this))
+                       STAT(AIR_FINISHED, this) = time + autocvar_g_balance_contents_drowndelay;
+               if (STAT(AIR_FINISHED, this) < time)
                {       // drown!
                        if (this.pain_finished < time)
                        {
index 2ad2d8f8d2c66d3048d1a0d7d2991cb550399fd1..83de3f024d619746f1072302da47beead46a6047 100644 (file)
@@ -3,6 +3,46 @@
 #include "utils.qh"
 #include <common/sounds/all.qh>
 
+// replicated cvars TODO: needs better organisation!
+.float cvar_cl_handicap;
+.int cvar_cl_gunalign;
+.float cvar_cl_clippedspectating;
+.float cvar_cl_autoscreenshot;
+.float cvar_cl_jetpack_jump;
+.float cvar_cl_movement_track_canjump;
+.float cvar_cl_newusekeysupported;
+.float cvar_cl_cts_noautoswitch;
+.bool cvar_cl_weapon_switch_reload;
+.bool cvar_cl_weapon_switch_fallback_to_impulse;
+
+.string cvar_g_xonoticversion;
+.string cvar_cl_weaponpriority;
+.string cvar_cl_weaponpriorities[10];
+.float cvar_cl_noantilag;
+
+// WEAPONTODO
+.float autoswitch;
+.string weaponorder_byimpulse;
+.float cvar_cl_weaponimpulsemode;
+
+.float cvar_cl_allow_uid2name;
+.float cvar_cl_allow_uidtracking;
+.bool cvar_cl_allow_uidranking;
+
+.string cvar_cl_physics;
+
+// autotaunt system
+.float cvar_cl_autotaunt;
+.float cvar_cl_voice_directional;
+.float cvar_cl_voice_directional_taunt_attenuation;
+
+.entity clientdata;
+
+.float jointime; // time of connecting
+.float startplaytime; // time of switching from spectator to player
+.float alivetime; // time of being alive
+.float motd_actived_time; // used for both motd and campaign_message
+
 void ClientState_attach(entity this);
 
 IntrusiveList g_players;
@@ -247,6 +287,21 @@ METHOD(Client, m_unwind, bool(Client this))
 
 .float respawn_countdown; // next number to count
 
+float blockSpectators; // if set, new or existing spectators or observers will be removed unless they become a player within g_maxplayers_spectator_blocktime seconds
+.float spectatortime; // point in time since the client is spectating or observing
+
+// TODO: standardise resource regeneration
+.float pauseregen_finished;
+.float pauserothealth_finished;
+.float pauserotarmor_finished;
+.float pauserotfuel_finished;
+
+// idle kicking
+float sv_maxidle;
+float sv_maxidle_spectatorsareidle;
+int sv_maxidle_slots;
+bool sv_maxidle_slots_countbots;
+
 // g_<gametype>_str:
 // If 0, default is used.
 // If <0, 0 is used.
index 925a16012e735c58d3ae0c71d8ed6c995fa56e26..815c5e23f282b8d203e64fde9649d85199ecca8d 100644 (file)
@@ -1,6 +1,6 @@
 #include "cmd.qh"
 
-#include <server/defs.qh>
+#include <server/g_world.qh>
 #include <server/miscfunctions.qh>
 
 #include <common/command/_mod.qh>
index 3e75b5b6f140f9dc7df7176d959c5ed2b5af952d..215920f24d39169e579b8e8037188b97d811b2ee 100644 (file)
@@ -1,6 +1,7 @@
 #include "getreplies.qh"
 
 #include <server/defs.qh>
+#include <server/g_world.qh>
 #include <server/miscfunctions.qh>
 
 #include <common/command/_mod.qh>
index 7b8e06371bec8533c735cb05e1885d7342916c94..fbab312487358712eca50ae3fd03dbdafa8443d8 100644 (file)
@@ -20,10 +20,6 @@ float sv_foginterval;
 
 // Fields
 
-.void(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force) event_damage;
-
-.bool(entity targ, entity inflictor, float amount, float limit) event_heal;
-
 //.string      wad;
 //.string      map;
 
@@ -32,14 +28,10 @@ float sv_foginterval;
 .float pain_finished;                  //Added by Supajoe
 .float pain_frame;                     //"
 
-.float superweapons_finished; // NOTE: this field is used only by map entities, it does not directly apply the superweapons stat
-const .float air_finished = _STAT(AIR_FINISHED);
-
 .float cnt; // used in too many places
 .float count;
 //.float cnt2;
 
-.float death_time;
 .float fade_time;
 .float fade_rate;
 
@@ -70,40 +62,12 @@ const .float air_finished = _STAT(AIR_FINISHED);
 .float         killcount;
 .float damage_dealt, typehitsound, killsound;
 
-.float watersound_finished;
-.float iscreature;
-.float damagedbycontents;
-.float damagedbytriggers;
-.float teleportable;
-.vector oldvelocity;
-
-.float pauseregen_finished;
-.float pauserothealth_finished;
-.float pauserotarmor_finished;
-.float pauserotfuel_finished;
 // string overrides entity
 .string item_pickupsound;
 .entity item_pickupsound_ent;
 .entity item_model_ent;
 
-// WEAPONTODO
-.float autoswitch;
-
-float intermission_running;
-float intermission_exittime;
-float alreadychangedlevel;
-
-// footstep interval
-.float nextstep;
-
-float blockSpectators; //if set, new or existing spectators or observers will be removed unless they become a player within g_maxplayers_spectator_blocktime seconds
-.float spectatortime; //point in time since the client is spectating or observing
-
 .float winning;
-.float jointime; // time of connecting
-.float startplaytime; // time of switching from spectator to player
-.float alivetime; // time of being alive
-.float motd_actived_time; // used for both motd and campaign_message
 
 .float spawnshieldtime;
 
@@ -115,40 +79,6 @@ float blockSpectators; //if set, new or existing spectators or observers will be
 float default_player_alpha;
 float default_weapon_alpha;
 
-.float cvar_cl_handicap;
-.int cvar_cl_gunalign;
-.float cvar_cl_clippedspectating;
-.float cvar_cl_autoscreenshot;
-.float cvar_cl_jetpack_jump;
-.float cvar_cl_movement_track_canjump;
-.float cvar_cl_newusekeysupported;
-.float cvar_cl_cts_noautoswitch;
-.bool cvar_cl_weapon_switch_reload;
-.bool cvar_cl_weapon_switch_fallback_to_impulse;
-
-.string cvar_g_xonoticversion;
-.string cvar_cl_weaponpriority;
-.string cvar_cl_weaponpriorities[10];
-.float cvar_cl_noantilag;
-
-.string weaponorder_byimpulse;
-
-.float cvar_cl_allow_uid2name;
-.float cvar_cl_allow_uidtracking;
-.bool cvar_cl_allow_uidranking;
-.string stored_netname;
-
-string gamemode_name;
-
-float bot_waypoints_for_items;
-
-// speedrun: when 1, player auto teleports back when capture timeout happens
-.float speedrunning;
-
-// database
-float ServerProgsDB;
-float TemporaryDB;
-
 .int team_saved;
 
 bool some_spawn_has_been_used;
@@ -157,19 +87,6 @@ int have_team_spawns_forteams; // if Xth bit is 1 then team X has spawns else it
 
 .bool canteamdamage;
 
-// WEAPONTODO
-#define DMG_NOWEP (weaponentities[0])
-
-float sv_maxidle;
-float sv_maxidle_spectatorsareidle;
-int sv_maxidle_slots;
-bool sv_maxidle_slots_countbots;
-
-// autotaunt system
-.float cvar_cl_autotaunt;
-.float cvar_cl_voice_directional;
-.float cvar_cl_voice_directional_taunt_attenuation;
-
 int autocvar__independent_players;
 bool independent_players;
 #define INDEPENDENT_PLAYERS (autocvar__independent_players ? (autocvar__independent_players > 0) : independent_players)
@@ -226,45 +143,19 @@ bool radar_showenemies;
 
 .int spectatee_status;
 .bool zoomstate;
-.int restriction;
 
-.entity clientdata;
 .entity personal;
 
-string deathmessage;
-
 .bool just_joined;
 
-.float cvar_cl_weaponimpulsemode;
-.int selectweapon; // last selected weapon of the player
-
-.float ballistics_density;
-
-//const int FROZEN_NOT                         = 0;
-const int FROZEN_NORMAL                                = 1;
-const int FROZEN_TEMP_REVIVING         = 2;
-const int FROZEN_TEMP_DYING                    = 3;
-
 .entity realowner;
 
 //float serverflags;
 
 .bool player_blocked;
 
-.float revival_time; // time at which player was last revived
-.float revive_speed; // NOTE: multiplier (anything above 1 is instaheal)
-.float freeze_time;
-.entity iceblock;
-.entity frozen_by; // for ice fields
-
-.float misc_bulletcounter;     // replaces uzi & hlac bullet counter.
-
-string modname;
-
 ////
 
-.string cvar_cl_physics;
-
 .WepSet dual_weapons;
 
 IntrusiveList g_monsters;
index b71355f687a3a671500d0480071e4cea5ad5acf9..a7ebbcb77a4ea081b0335677055af347e5972075 100644 (file)
@@ -6,6 +6,7 @@
 #include <server/gamelog.qh>
 #include <server/items/items.qh>
 #include <server/mutators/_mod.qh>
+#include <server/sv_main.qh>
 #include "teamplay.qh"
 #include "scores.qh"
 #include "spawnpoints.qh"
index 771bf216eebbc51f3641171af8e01f6b04e87055..2209bada1281feeaa39ba68e4527cc8ee72cceac 100644 (file)
     #include "spawnpoints.qh"
 #endif
 
+.void(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force) event_damage;
+
+.bool(entity targ, entity inflictor, float amount, float limit) event_heal;
+
 .float dmg;
 .float dmg_edge;
 .float dmg_force;
@@ -40,6 +44,9 @@ void Damage_DamageInfo(vector org, float coredamage, float edgedamage, float rad
 
 float checkrules_firstblood;
 
+.float damagedbycontents;
+.float damagedbytriggers;
+
 float yoda;
 float damage_goodhits;
 float damage_gooddamage;
@@ -54,6 +61,9 @@ float damage_gooddamage;
 
 .int totalfrags;
 
+// used for custom deathtype
+string deathmessage;
+
 float IsFlying(entity a);
 
 void UpdateFrags(entity player, int f);
@@ -83,12 +93,27 @@ float Obituary_WeaponDeath(
 
 void Obituary(entity attacker, entity inflictor, entity targ, int deathtype, .entity weaponentity);
 
+// Frozen status effect
+//const int FROZEN_NOT              = 0;
+const int FROZEN_NORMAL             = 1;
+const int FROZEN_TEMP_REVIVING      = 2;
+const int FROZEN_TEMP_DYING         = 3;
+
+.float revival_time; // time at which player was last revived
+.float revive_speed; // NOTE: multiplier (anything above 1 is instaheal)
+.float freeze_time;
+.entity iceblock;
+.entity frozen_by; // for ice fields
+
 void Ice_Think(entity this);
 
-void Freeze(entity targ, float freeze_time, int frozen_type, bool show_waypoint);
+void Freeze(entity targ, float revivespeed, int frozen_type, bool show_waypoint);
 
 void Unfreeze(entity targ, bool reset_health);
 
+// WEAPONTODO
+#define DMG_NOWEP (weaponentities[0])
+
 // NOTE: the .weaponentity parameter can be set to DMG_NOWEP if the attack wasn't caused by a weapon or player
 void Damage (entity targ, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force);
 
index 6b9a9f8eca7b8860ea5458dd9f49468b9d9b1b89..3d6276384e3344c74e65551cf732ba85e1ffdde7 100644 (file)
@@ -8,9 +8,21 @@ 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 modname;
+
+string gamemode_name;
+
+float intermission_running;
+float intermission_exittime;
+float alreadychangedlevel;
+
 string cache_mutatormsg;
 string cache_lastmutatormsg;
 
+// database
+float ServerProgsDB;
+float TemporaryDB;
+
 const int WINNING_NO = 0; // no winner, but time limits may terminate the game
 const int WINNING_YES = 1; // winner found
 const int WINNING_NEVER = 2; // no winner, enter overtime if time limit is reached
index ef72b964fb5cab915702883f6e558fa85c635535..ffd7c132080167d7502b2843dbf9ca546be80c83 100644 (file)
@@ -4,6 +4,8 @@
 
 #include <server/bot/api.qh>
 
+#include <server/g_damage.qh>
+
 #include <server/mutators/_mod.qh>
 
 #include <server/teamplay.qh>
index 406f424fa34e9860e5ab1ce3bbbeb99a02ad8634..96d61b0c29dad51bd93dea4dd5d78080cb2c642f 100644 (file)
@@ -18,6 +18,8 @@ const float ITEM_RESPAWN_TICKS = 10;
 
 .float item_respawncounter;
 
+.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
 .float item_spawnshieldtime;
 
index 84901fa32273fd54b7cf7640225ce2cba2a5b8f5..95ef08482126f9da595e4a5c73a3087802b5f110 100644 (file)
@@ -2,6 +2,7 @@
 
 #include "antilag.qh"
 #include "command/common.qh"
+#include "client.qh"
 #include "constants.qh"
 #include "g_hook.qh"
 #include "g_world.qh"
@@ -9,6 +10,7 @@
 #include "ipban.qh"
 #include <server/items/items.qh>
 #include <server/mutators/_mod.qh>
+#include <server/sv_main.qh>
 #include "mapvoting.qh"
 #include "resources.qh"
 #include <server/items/spawning.qh>
index 7b440bb0da9401e12ebe3f783a91ef91c2647fd2..c73a107b5b9b0c8cd2e3cb9bf67376e574adb39b 100644 (file)
@@ -1,6 +1,7 @@
 #pragma once
 
 #include <server/defs.qh>
+#include <server/client.qh>
 #include <server/g_world.qh>
 
 #include <server/items/items.qh>
index 4af7b4f8aaeb327f38f733796c0a653424a33bb1..3138ffd43e4c6e5ab3fad696f6a4da51da10e1f9 100644 (file)
@@ -10,6 +10,7 @@
 #include "miscfunctions.qh"
 #include "portals.qh"
 #include "teamplay.qh"
+#include <server/sv_main.qh>
 #include "weapons/throwing.qh"
 #include "command/common.qh"
 #include "../common/state.qh"
@@ -19,6 +20,7 @@
 #include "../common/gamemodes/sv_rules.qh"
 #include "../common/deathtypes/all.qh"
 #include "../common/mapobjects/subs.qh"
+#include <common/mapobjects/teleporters.qh>
 #include "../common/playerstats.qh"
 #include "../lib/csqcmodel/sv_model.qh"
 
index 0232c302ef0fb72452275023acd9b344ab730b73..aa1f6dcf2992e2f40f1413ae5c014fddbc32435b 100644 (file)
@@ -4,6 +4,8 @@
 .float pushltime;
 .bool istypefrag;
 
+.float death_time;
+
 .float CopyBody_nextthink;
 .void(entity this) CopyBody_think;
 void CopyBody_Think(entity this);
index 8ba789e7bcdf8d818c5d9bab40f935d4b6dbb8ab..83a0d3425aaafebae984dabbe5ce4c5ae918825b 100644 (file)
@@ -18,6 +18,7 @@
 #include "../common/vehicles/sv_vehicles.qh"
 #include <common/weapons/weapon/porto.qh>
 #include <server/player.qh>
+#include <server/g_damage.qh>
 
 #define PORTALS_ARE_NOT_SOLID
 
index 22cd21f2d520f2f02b6bbb98f174d2b55632a4a7..eb4b8742e91878e3a2b7a7bfa3fad0c69e680b10 100644 (file)
@@ -2,6 +2,7 @@
 
 #include <server/defs.qh>
 #include <server/g_damage.qh>
+#include <server/g_world.qh>
 #include <server/miscfunctions.qh>
 #include "client.qh"
 #include "portals.qh"
index 4dafbcf63710615df0b75b9ee07df04f4e9718d6..129e99da1b7b6e0c7eff802568c3771afc39802a 100644 (file)
@@ -1,5 +1,7 @@
 #pragma once
 
+.string stored_netname; // TODO: store this information independently of race-based gamemodes
+
 float race_teams;
 
 // scores
index d347fcbaf9be95d010a8af0378795ffe3c9fe315..e5a8b3007a2ab4aea8d1244eb79b6c40d38a98d7 100644 (file)
@@ -1,6 +1,6 @@
 #include "round_handler.qh"
 
-#include <server/defs.qh>
+#include <server/g_world.qh>
 #include <server/miscfunctions.qh>
 #include "campaign.qh"
 #include "command/vote.qh"
index 1609201c2f1c3d601d361b2c39b451b64bf67e50..b9e20ec0f5a3e7ca4447d478d327e3cd8422819c 100644 (file)
@@ -16,3 +16,5 @@ 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;
+
+.int restriction;
index a70228667587043fcd4ef62aed4afe48d1cd0a64..04630374b3ac18778c1f507e6f987ff06f3c3617 100644 (file)
@@ -9,6 +9,12 @@ float client_cefc_accumulatortime;
 
 float servertime, serverprevtime, serverframetime;
 
+.vector oldvelocity; // for fall damage
+
+.float watersound_finished;
+
+.bool iscreature;
+
 /*
 ==================
 main
index 0dc71ddcc01c1faa40be8307487b75a378d23067..a53adb6246c508875095c8c0d4f29da81825f343 100644 (file)
@@ -1,8 +1,10 @@
 #include "accuracy.qh"
 
 #include <server/mutators/_mod.qh>
+#include <server/g_damage.qh>
 #include <common/constants.qh>
 #include <common/net_linked.qh>
+#include <server/player.qh>
 #include <common/teams.qh>
 #include <common/util.qh>
 #include <common/weapons/_all.qh>
index c910983b94118a0f4af9c5b80c88f743d60b2265..465900e0bd6999e9d692f4645049dea8f5809445 100644 (file)
@@ -1,6 +1,7 @@
 #include "common.qh"
 
 #include <server/defs.qh>
+#include <server/g_damage.qh>
 #include <server/items/items.qh>
 #include <server/miscfunctions.qh>
 #include <common/constants.qh>
index 5839a425d151f00ebf2583ea16798689780a10f9..093e380764793ed423346ace256d5cf085d7a8bf 100644 (file)
@@ -8,6 +8,8 @@ void W_PlayStrengthSound(entity player);
 float W_CheckProjectileDamage(entity inflictor, entity projowner, int deathtype, float exception);
 void W_PrepareExplosionByDamage(entity this, entity attacker, void(entity this) explode);
 
+.float misc_bulletcounter;
+
 .int missile_flags;
 const int MIF_SPLASH = BIT(1);
 const int MIF_ARC = BIT(2);
index 2fff84e4fb5a4980064b91f0f0a120295d492f7a..4fdb9af90afb7c0d1d1e070e9822f9b7b319cbd8 100644 (file)
@@ -3,6 +3,8 @@
 #include <server/defs.qh>
 #include <server/miscfunctions.qh>
 
+.int selectweapon; // last selected weapon of the player
+
 // switch between weapons
 void Send_WeaponComplain(entity e, float wpn, float type);
 
index e2f43fb7c13dfb9c2c521432318fd2a2c6210fc6..b8575ecae5c1598aa5325482e7246e218a4f0882 100644 (file)
@@ -62,6 +62,8 @@ void W_SetupProjVelocity_Explicit(entity proj, vector dir, vector upDir, float p
 //  Ballistics Tracing
 // ====================
 
+.float ballistics_density;
+
 .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);