From: Mario Date: Sun, 2 Aug 2020 06:08:35 +0000 (+1000) Subject: Some more defs.qh cleanup, update gameplay hash X-Git-Tag: xonotic-v0.8.5~803 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ad48f34a4a109c864ffe01a14f2290821c03dc9d;p=xonotic%2Fxonotic-data.pk3dir.git Some more defs.qh cleanup, update gameplay hash --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2f2fd4f2f..cbd7e78f5 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=040aeef53953a85c5891c0c39cf9860f + - EXPECT=339f4bfdb1d6e302024e1a260336557a - 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 8c175554b..89dfa6f1e 100644 --- a/qcsrc/common/gamemodes/gamemode/assault/sv_assault.qc +++ b/qcsrc/common/gamemodes/gamemode/assault/sv_assault.qc @@ -1,6 +1,7 @@ #include "sv_assault.qh" #include +#include #include .entity sprite; diff --git a/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc b/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc index bf0db40cd..16f9299f1 100644 --- a/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc +++ b/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc @@ -1,9 +1,12 @@ #include "sv_ctf.qh" #include +#include #include #include #include +#include +#include #include #include diff --git a/qcsrc/common/gamemodes/gamemode/cts/sv_cts.qc b/qcsrc/common/gamemodes/gamemode/cts/sv_cts.qc index 3f787fa3c..991423a49 100644 --- a/qcsrc/common/gamemodes/gamemode/cts/sv_cts.qc +++ b/qcsrc/common/gamemodes/gamemode/cts/sv_cts.qc @@ -1,6 +1,7 @@ #include "sv_cts.qh" #include +#include #include #include diff --git a/qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc b/qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc index 2a69b37c1..1c051855e 100644 --- a/qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc +++ b/qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc @@ -2,6 +2,7 @@ #include "sv_controlpoint.qh" #include "sv_generator.qh" +#include #include bool g_onslaught; diff --git a/qcsrc/common/gamemodes/gamemode/race/sv_race.qc b/qcsrc/common/gamemodes/gamemode/race/sv_race.qc index 35a7d950a..de3967c8a 100644 --- a/qcsrc/common/gamemodes/gamemode/race/sv_race.qc +++ b/qcsrc/common/gamemodes/gamemode/race/sv_race.qc @@ -1,5 +1,6 @@ #include "sv_race.qh" +#include #include #include diff --git a/qcsrc/common/mapobjects/target/spawn.qc b/qcsrc/common/mapobjects/target/spawn.qc index 9c999ed4d..8eaab68ba 100644 --- a/qcsrc/common/mapobjects/target/spawn.qc +++ b/qcsrc/common/mapobjects/target/spawn.qc @@ -4,6 +4,7 @@ #elif defined(SVQC) #include #include + #include #endif #ifdef SVQC diff --git a/qcsrc/common/mapobjects/teleporters.qc b/qcsrc/common/mapobjects/teleporters.qc index ab9c8dca5..11cdf3bdd 100644 --- a/qcsrc/common/mapobjects/teleporters.qc +++ b/qcsrc/common/mapobjects/teleporters.qc @@ -14,6 +14,7 @@ #include #include #include "../deathtypes/all.qh" + #include #include "../turrets/sv_turrets.qh" #include "../vehicles/all.qh" #include diff --git a/qcsrc/common/mapobjects/teleporters.qh b/qcsrc/common/mapobjects/teleporters.qh index f72f943d3..10c4fdfaf 100644 --- a/qcsrc/common/mapobjects/teleporters.qh +++ b/qcsrc/common/mapobjects/teleporters.qh @@ -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 diff --git a/qcsrc/common/mapobjects/trigger/jumppads.qc b/qcsrc/common/mapobjects/trigger/jumppads.qc index b016dde9a..66a9499d4 100644 --- a/qcsrc/common/mapobjects/trigger/jumppads.qc +++ b/qcsrc/common/mapobjects/trigger/jumppads.qc @@ -2,6 +2,7 @@ // TODO: split target_push and put it in the target folder #ifdef SVQC #include +#include void trigger_push_use(entity this, entity actor, entity trigger) { diff --git a/qcsrc/common/monsters/sv_monsters.qc b/qcsrc/common/monsters/sv_monsters.qc index 611321c45..1bc1b8d98 100644 --- a/qcsrc/common/monsters/sv_monsters.qc +++ b/qcsrc/common/monsters/sv_monsters.qc @@ -14,11 +14,13 @@ #include #include #include +#include #include "../turrets/sv_turrets.qh" #include "../turrets/util.qh" #include "../vehicles/all.qh" #include #include +#include #include "../mapobjects/triggers.qh" #include #include diff --git a/qcsrc/common/mutators/mutator/buffs/sv_buffs.qc b/qcsrc/common/mutators/mutator/buffs/sv_buffs.qc index fcbb399cb..0eda60661 100644 --- a/qcsrc/common/mutators/mutator/buffs/sv_buffs.qc +++ b/qcsrc/common/mutators/mutator/buffs/sv_buffs.qc @@ -2,6 +2,7 @@ #include #include +#include void buffs_DelayedInit(entity this); diff --git a/qcsrc/common/physics/player.qc b/qcsrc/common/physics/player.qc index 76bfb0334..f1b155029 100644 --- a/qcsrc/common/physics/player.qc +++ b/qcsrc/common/physics/player.qc @@ -7,6 +7,7 @@ #include #include #include "../mapobjects/trigger/viewloc.qh" +#include // client side physics bool Physics_Valid(string thecvar) diff --git a/qcsrc/common/physics/player.qh b/qcsrc/common/physics/player.qh index 4efb16f9d..cea9a4b91 100644 --- a/qcsrc/common/physics/player.qh +++ b/qcsrc/common/physics/player.qh @@ -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) diff --git a/qcsrc/common/playerstats.qc b/qcsrc/common/playerstats.qc index 511ac46e6..08ee5524e 100644 --- a/qcsrc/common/playerstats.qc +++ b/qcsrc/common/playerstats.qc @@ -8,6 +8,7 @@ #include "../server/anticheat.qh" #include "../server/defs.qh" #include "../server/scores.qh" + #include #include "../server/weapons/accuracy.qh" #endif diff --git a/qcsrc/common/vehicles/sv_vehicles.qc b/qcsrc/common/vehicles/sv_vehicles.qc index 066066f0b..5c3e913c6 100644 --- a/qcsrc/common/vehicles/sv_vehicles.qc +++ b/qcsrc/common/vehicles/sv_vehicles.qc @@ -2,6 +2,9 @@ #include #include +#include +#include +#include bool SendAuxiliaryXhair(entity this, entity to, int sf) { diff --git a/qcsrc/common/vehicles/vehicle/racer.qc b/qcsrc/common/vehicles/vehicle/racer.qc index 784b3355e..423eefd19 100644 --- a/qcsrc/common/vehicles/vehicle/racer.qc +++ b/qcsrc/common/vehicles/vehicle/racer.qc @@ -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)) { diff --git a/qcsrc/lib/warpzone/server.qc b/qcsrc/lib/warpzone/server.qc index 66ee6b133..0487c6176 100644 --- a/qcsrc/lib/warpzone/server.qc +++ b/qcsrc/lib/warpzone/server.qc @@ -7,6 +7,7 @@ #include #include #include + #include #include #include #include diff --git a/qcsrc/server/bot/api.qh b/qcsrc/server/bot/api.qh index 6c3d3141b..873c2ac62 100644 --- a/qcsrc/server/bot/api.qh +++ b/qcsrc/server/bot/api.qh @@ -4,6 +4,8 @@ #include #include +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 diff --git a/qcsrc/server/bot/default/bot.qc b/qcsrc/server/bot/default/bot.qc index 90ef1e2c9..9462339a2 100644 --- a/qcsrc/server/bot/default/bot.qc +++ b/qcsrc/server/bot/default/bot.qc @@ -18,6 +18,7 @@ #include "../../client.qh" #include "../../constants.qh" #include "../../defs.qh" +#include #include #include "../../race.qh" #include diff --git a/qcsrc/server/cheats.qh b/qcsrc/server/cheats.qh index 962e017a1..3ff0f6a77 100644 --- a/qcsrc/server/cheats.qh +++ b/qcsrc/server/cheats.qh @@ -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; diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 0458b07af..245ada1e1 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -22,6 +22,7 @@ #include "g_world.qh" #include #include "race.qh" +#include #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) { diff --git a/qcsrc/server/client.qh b/qcsrc/server/client.qh index 2ad2d8f8d..83de3f024 100644 --- a/qcsrc/server/client.qh +++ b/qcsrc/server/client.qh @@ -3,6 +3,46 @@ #include "utils.qh" #include +// 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__str: // If 0, default is used. // If <0, 0 is used. diff --git a/qcsrc/server/command/cmd.qc b/qcsrc/server/command/cmd.qc index 925a16012..815c5e23f 100644 --- a/qcsrc/server/command/cmd.qc +++ b/qcsrc/server/command/cmd.qc @@ -1,6 +1,6 @@ #include "cmd.qh" -#include +#include #include #include diff --git a/qcsrc/server/command/getreplies.qc b/qcsrc/server/command/getreplies.qc index 3e75b5b6f..215920f24 100644 --- a/qcsrc/server/command/getreplies.qc +++ b/qcsrc/server/command/getreplies.qc @@ -1,6 +1,7 @@ #include "getreplies.qh" #include +#include #include #include diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh index 7b8e06371..fbab31248 100644 --- a/qcsrc/server/defs.qh +++ b/qcsrc/server/defs.qh @@ -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; diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index b71355f68..a7ebbcb77 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -6,6 +6,7 @@ #include #include #include +#include #include "teamplay.qh" #include "scores.qh" #include "spawnpoints.qh" diff --git a/qcsrc/server/g_damage.qh b/qcsrc/server/g_damage.qh index 771bf216e..2209bada1 100644 --- a/qcsrc/server/g_damage.qh +++ b/qcsrc/server/g_damage.qh @@ -29,6 +29,10 @@ #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); diff --git a/qcsrc/server/g_world.qh b/qcsrc/server/g_world.qh index 6b9a9f8ec..3d6276384 100644 --- a/qcsrc/server/g_world.qh +++ b/qcsrc/server/g_world.qh @@ -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 diff --git a/qcsrc/server/items/items.qc b/qcsrc/server/items/items.qc index ef72b964f..ffd7c1320 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 406f424fa..96d61b0c2 100644 --- a/qcsrc/server/items/items.qh +++ b/qcsrc/server/items/items.qh @@ -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; diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index 84901fa32..95ef08482 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -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 #include +#include #include "mapvoting.qh" #include "resources.qh" #include diff --git a/qcsrc/server/miscfunctions.qh b/qcsrc/server/miscfunctions.qh index 7b440bb0d..c73a107b5 100644 --- a/qcsrc/server/miscfunctions.qh +++ b/qcsrc/server/miscfunctions.qh @@ -1,6 +1,7 @@ #pragma once #include +#include #include #include diff --git a/qcsrc/server/player.qc b/qcsrc/server/player.qc index 4af7b4f8a..3138ffd43 100644 --- a/qcsrc/server/player.qc +++ b/qcsrc/server/player.qc @@ -10,6 +10,7 @@ #include "miscfunctions.qh" #include "portals.qh" #include "teamplay.qh" +#include #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 #include "../common/playerstats.qh" #include "../lib/csqcmodel/sv_model.qh" diff --git a/qcsrc/server/player.qh b/qcsrc/server/player.qh index 0232c302e..aa1f6dcf2 100644 --- a/qcsrc/server/player.qh +++ b/qcsrc/server/player.qh @@ -4,6 +4,8 @@ .float pushltime; .bool istypefrag; +.float death_time; + .float CopyBody_nextthink; .void(entity this) CopyBody_think; void CopyBody_Think(entity this); diff --git a/qcsrc/server/portals.qc b/qcsrc/server/portals.qc index 8ba789e7b..83a0d3425 100644 --- a/qcsrc/server/portals.qc +++ b/qcsrc/server/portals.qc @@ -18,6 +18,7 @@ #include "../common/vehicles/sv_vehicles.qh" #include #include +#include #define PORTALS_ARE_NOT_SOLID diff --git a/qcsrc/server/race.qc b/qcsrc/server/race.qc index 22cd21f2d..eb4b8742e 100644 --- a/qcsrc/server/race.qc +++ b/qcsrc/server/race.qc @@ -2,6 +2,7 @@ #include #include +#include #include #include "client.qh" #include "portals.qh" diff --git a/qcsrc/server/race.qh b/qcsrc/server/race.qh index 4dafbcf63..129e99da1 100644 --- a/qcsrc/server/race.qh +++ b/qcsrc/server/race.qh @@ -1,5 +1,7 @@ #pragma once +.string stored_netname; // TODO: store this information independently of race-based gamemodes + float race_teams; // scores diff --git a/qcsrc/server/round_handler.qc b/qcsrc/server/round_handler.qc index d347fcbaf..e5a8b3007 100644 --- a/qcsrc/server/round_handler.qc +++ b/qcsrc/server/round_handler.qc @@ -1,6 +1,6 @@ #include "round_handler.qh" -#include +#include #include #include "campaign.qh" #include "command/vote.qh" diff --git a/qcsrc/server/spawnpoints.qh b/qcsrc/server/spawnpoints.qh index 1609201c2..b9e20ec0f 100644 --- a/qcsrc/server/spawnpoints.qh +++ b/qcsrc/server/spawnpoints.qh @@ -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; diff --git a/qcsrc/server/sv_main.qh b/qcsrc/server/sv_main.qh index a70228667..04630374b 100644 --- a/qcsrc/server/sv_main.qh +++ b/qcsrc/server/sv_main.qh @@ -9,6 +9,12 @@ float client_cefc_accumulatortime; float servertime, serverprevtime, serverframetime; +.vector oldvelocity; // for fall damage + +.float watersound_finished; + +.bool iscreature; + /* ================== main diff --git a/qcsrc/server/weapons/accuracy.qc b/qcsrc/server/weapons/accuracy.qc index 0dc71ddcc..a53adb624 100644 --- a/qcsrc/server/weapons/accuracy.qc +++ b/qcsrc/server/weapons/accuracy.qc @@ -1,8 +1,10 @@ #include "accuracy.qh" #include +#include #include #include +#include #include #include #include diff --git a/qcsrc/server/weapons/common.qc b/qcsrc/server/weapons/common.qc index c910983b9..465900e0b 100644 --- a/qcsrc/server/weapons/common.qc +++ b/qcsrc/server/weapons/common.qc @@ -1,6 +1,7 @@ #include "common.qh" #include +#include #include #include #include diff --git a/qcsrc/server/weapons/common.qh b/qcsrc/server/weapons/common.qh index 5839a425d..093e38076 100644 --- a/qcsrc/server/weapons/common.qh +++ b/qcsrc/server/weapons/common.qh @@ -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); diff --git a/qcsrc/server/weapons/selection.qh b/qcsrc/server/weapons/selection.qh index 2fff84e4f..4fdb9af90 100644 --- a/qcsrc/server/weapons/selection.qh +++ b/qcsrc/server/weapons/selection.qh @@ -3,6 +3,8 @@ #include #include +.int selectweapon; // last selected weapon of the player + // 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 e2f43fb7c..b8575ecae 100644 --- a/qcsrc/server/weapons/tracing.qh +++ b/qcsrc/server/weapons/tracing.qh @@ -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);