- 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 '^:'
#include "sv_assault.qh"
#include <common/mapobjects/func/breakable.qh>
+#include <server/g_damage.qh>
#include <server/spawnpoints.qh>
.entity sprite;
#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>
#include "sv_cts.qh"
#include <server/race.qh>
+#include <server/g_world.qh>
#include <server/gamelog.qh>
#include <server/items/spawning.qh>
#include "sv_controlpoint.qh"
#include "sv_generator.qh"
+#include <server/g_damage.qh>
#include <common/mapobjects/defs.qh>
bool g_onslaught;
#include "sv_race.qh"
+#include <server/g_world.qh>
#include <server/gamelog.qh>
#include <server/race.qh>
#elif defined(SVQC)
#include <common/util.qh>
#include <server/defs.qh>
+ #include <server/g_world.qh>
#endif
#ifdef SVQC
#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>
#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
// 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)
{
#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>
#include <common/mapobjects/target/music.qh>
#include <common/gamemodes/_mod.qh>
+#include <server/sv_main.qh>
void buffs_DelayedInit(entity this);
#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)
.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)
#include "../server/anticheat.qh"
#include "../server/defs.qh"
#include "../server/scores.qh"
+ #include <server/g_world.qh>
#include "../server/weapons/accuracy.qh"
#endif
#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)
{
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;
{
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;
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))
{
#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>
#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
#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>
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;
#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"
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)
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;
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;
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)
{
#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;
.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.
#include "cmd.qh"
-#include <server/defs.qh>
+#include <server/g_world.qh>
#include <server/miscfunctions.qh>
#include <common/command/_mod.qh>
#include "getreplies.qh"
#include <server/defs.qh>
+#include <server/g_world.qh>
#include <server/miscfunctions.qh>
#include <common/command/_mod.qh>
// 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;
.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;
.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;
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;
.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)
.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;
#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"
#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;
float checkrules_firstblood;
+.float damagedbycontents;
+.float damagedbytriggers;
+
float yoda;
float damage_goodhits;
float damage_gooddamage;
.int totalfrags;
+// used for custom deathtype
+string deathmessage;
+
float IsFlying(entity a);
void UpdateFrags(entity player, int f);
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);
// 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
#include <server/bot/api.qh>
+#include <server/g_damage.qh>
+
#include <server/mutators/_mod.qh>
#include <server/teamplay.qh>
.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;
#include "antilag.qh"
#include "command/common.qh"
+#include "client.qh"
#include "constants.qh"
#include "g_hook.qh"
#include "g_world.qh"
#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>
#pragma once
#include <server/defs.qh>
+#include <server/client.qh>
#include <server/g_world.qh>
#include <server/items/items.qh>
#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"
#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"
.float pushltime;
.bool istypefrag;
+.float death_time;
+
.float CopyBody_nextthink;
.void(entity this) CopyBody_think;
void CopyBody_Think(entity this);
#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
#include <server/defs.qh>
#include <server/g_damage.qh>
+#include <server/g_world.qh>
#include <server/miscfunctions.qh>
#include "client.qh"
#include "portals.qh"
#pragma once
+.string stored_netname; // TODO: store this information independently of race-based gamemodes
+
float race_teams;
// scores
#include "round_handler.qh"
-#include <server/defs.qh>
+#include <server/g_world.qh>
#include <server/miscfunctions.qh>
#include "campaign.qh"
#include "command/vote.qh"
USING(spawn_evalfunc_t, vector(entity this, entity player, entity spot, vector current));
.spawn_evalfunc_t spawn_evalfunc;
+
+.int restriction;
float servertime, serverprevtime, serverframetime;
+.vector oldvelocity; // for fall damage
+
+.float watersound_finished;
+
+.bool iscreature;
+
/*
==================
main
#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>
#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>
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);
#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);
// 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);