]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/defs.qh
Merge branch 'master' into Lyberta/WaypointIcons
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / defs.qh
diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh
deleted file mode 100644 (file)
index 3aed06e..0000000
+++ /dev/null
@@ -1,444 +0,0 @@
-#pragma once
-
-#include <common/weapons/_all.qh>
-#include <common/stats.qh>
-
-#define INDEPENDENT_ATTACK_FINISHED 1
-
-// 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;
-
-float player_count;
-float currentbots;
-float bots_would_leave;
-
-void UpdateFrags(entity player, int f);
-.int totalfrags;
-
-// flag set on worldspawn so that the code knows if it is dedicated or not
-float server_is_dedicated;
-
-// 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       worldtype;
-// Needed for dynamic clientwalls
-.bool inactive; // Clientwall disappears when inactive
-.float alpha_max, alpha_min;
-.float fade_start, fade_end, fade_vertical_offset;
-.float default_solid; // Variable to store default .solid for clientwalls
-
-.float pain_finished;                  //Added by Supajoe
-.float pain_frame;                     //"
-.float  crouch;        // Crouching or not?
-
-.float superweapons_finished = _STAT(SUPERWEAPONS_FINISHED);
-
-.float cnt; // used in too many places
-.float count;
-//.float cnt2;
-
-.int respawn_flags;
-.float respawn_time;
-.float respawn_time_max;
-.float death_time;
-.float fade_time;
-.float fade_rate;
-
-void player_setupanimsformodel(entity this);
-
-.string mdl;
-
-.string playermodel;
-.string playerskin;
-
-.float species;
-
-.float scheduledrespawntime;
-.float respawntime;
-.float respawntimejitter;
-.float respawntimestart;
-//.float       chasecam;
-
-.float damageforcescale;
-const float MIN_DAMAGEEXTRARADIUS = 2;
-const float MAX_DAMAGEEXTRARADIUS = 16;
-.float damageextraradius;
-
-//.float          gravity;
-
-.float         dmg;
-
-// for railgun damage (hitting multiple enemies)
-.bool railgunhit;
-.float railgunhitsolidbackup;
-.vector railgunhitloc;
-
-.float         air_finished;
-.float         dmgtime;
-
-.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;
-bool client_hasweapon(entity this, Weapon wpn, .entity weaponentity, float andammo, bool complain);
-void w_clear(Weapon thiswep, entity actor, .entity weaponentity, int fire);
-void w_ready(Weapon thiswep, entity actor, .entity weaponentity, int fire);
-// VorteX: standalone think for weapons, so normal think on weaponentity can be reserved by weaponflashes (which needs update even player dies)
-.float weapon_nextthink;
-.void(Weapon thiswep, entity actor, .entity weaponentity, int fire) weapon_think;
-
-
-// there is 2 weapon tics that can run in one server frame
-const int W_TICSPERFRAME = 2;
-
-void weapon_defaultspawnfunc(entity this, Weapon e);
-
-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
-void checkSpectatorBlock(entity this);
-
-float game_completion_ratio; // 0 at start, 1 near end
-.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
-
-bool nJoinAllowed(entity this, entity ignore);
-
-.float spawnshieldtime;
-.float item_spawnshieldtime;
-
-.entity flagcarried;
-
-.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;
-
-.float cvar_cl_handicap;
-.float cvar_cl_clippedspectating;
-.float cvar_cl_autoscreenshot;
-.float cvar_cl_jetpack_jump;
-.float cvar_cl_movement_track_canjump;
-.float cvar_cl_newusekeysupported;
-
-.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;
-.string stored_netname;
-
-string gamemode_name;
-
-string W_Apply_Weaponreplace(string in);
-
-void FixIntermissionClient(entity e);
-void FixClientCvars(entity e);
-
-// WEAPONTODO: remove this
-//WepSet weaponsInMap;
-
-.float respawn_countdown; // next number to count
-
-float bot_waypoints_for_items;
-
-.float attack_finished_for[Weapons_MAX * MAX_WEAPONSLOTS];
-.float attack_finished_single[MAX_WEAPONSLOTS];
-#if INDEPENDENT_ATTACK_FINISHED
-#define ATTACK_FINISHED_FOR(ent, w, slot) ((ent).(attack_finished_for[((w) - WEP_FIRST) * MAX_WEAPONSLOTS + (slot)]))
-#else
-#define ATTACK_FINISHED_FOR(ent, w, slot) ((ent).attack_finished_single[slot])
-#endif
-#define ATTACK_FINISHED(ent, slot) ATTACK_FINISHED_FOR(ent, ent.(weaponentity).m_weapon.m_id, slot)
-
-// assault game mode: Which team is attacking in this round?
-float assault_attacker_team;
-
-// 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;
-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"
-
-// set when showing a kill countdown
-.entity killindicator;
-
-.bool canteamdamage;
-
-void Damage (entity targ, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force);
-
-// WEAPONTODO
-#define DMG_NOWEP (weaponentities[0])
-
-float sv_maxidle;
-float sv_maxidle_spectatorsareidle;
-int sv_maxidle_slots;
-bool sv_maxidle_slots_countbots;
-
-float tracebox_hits_trigger_hurt(vector start, vector mi, vector ma, vector end);
-
-float next_pingtime;
-
-// 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)
-#define IS_INDEPENDENT_PLAYER(e) ((e).solid == SOLID_TRIGGER)
-#define MAKE_INDEPENDENT_PLAYER(e) (((e).solid = SOLID_TRIGGER), ((e).frags = FRAGS_PLAYER_NONSOLID))
-
-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
-
-void W_Porto_Remove (entity p);
-
-.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)
-
-void ClientData_Touch(entity e);
-
-//vector debug_shotorg; // if non-zero, overrides the shot origin of all weapons
-
-.bool wasplayer;
-
-float servertime, serverprevtime, serverframetime;
-
-.float ammo_fuel;
-
-//flood fields
-.float nickspamtime; // time of last nick change
-.float nickspamcount;
-.float floodcontrol_chat;
-.float floodcontrol_chatteam;
-.float floodcontrol_chattell;
-.float floodcontrol_voice;
-.float floodcontrol_voiceteam;
-
-string matchid;
-
-bool radar_showennemies;
-
-#ifdef PROFILING
-float client_cefc_accumulator;
-float client_cefc_accumulatortime;
-#endif
-
-.float weapon_load[Weapons_MAX];
-.int ammo_none; // used by the reloading system, must always be 0
-.int clip_load;
-.int old_clip_load;
-.int clip_size;
-
-.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
-
-#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
-
-.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; // wall piercing factor, larger = bullet can pass through more
-
-const int ACTIVE_NOT           = 0;
-const int ACTIVE_ACTIVE        = 1;
-const int ACTIVE_IDLE          = 2;
-const int ACTIVE_BUSY          = 2;
-const int ACTIVE_TOGGLE        = 3;
-.int active;
-.void (entity this, int act_state) setactive;
-.entity realowner;
-
-//float serverflags;
-
-.int team_forced; // can be a team number to force a team, or 0 for default action, or -1 for forced spectator
-
-.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
-
-.entity muzzle_flash;
-.float misc_bulletcounter;     // replaces uzi & hlac bullet counter.
-
-.int killindicator_teamchange;
-
-void PlayerUseKey(entity this);
-
-USING(spawn_evalfunc_t, vector(entity this, entity player, entity spot, vector current));
-.spawn_evalfunc_t spawn_evalfunc;
-
-string modname;
-
-.int missile_flags;
-const int MIF_SPLASH = BIT(1);
-const int MIF_ARC = BIT(2);
-const int MIF_PROXY = BIT(3);
-const int MIF_GUIDED_MANUAL = BIT(4);
-const int MIF_GUIDED_HEAT = BIT(5);
-const int MIF_GUIDED_LASER = BIT(6);
-const int MIF_GUIDED_AI = BIT(7);
-const int MIF_GUIDED_TAG = BIT(7);
-const int MIF_GUIDED_ALL = MIF_GUIDED_MANUAL | MIF_GUIDED_HEAT | MIF_GUIDED_LASER | MIF_GUIDED_AI | MIF_GUIDED_TAG;
-const int MIF_GUIDED_TRACKING = MIF_GUIDED_HEAT | MIF_GUIDED_LASER | MIF_GUIDED_AI | MIF_GUIDED_TAG;
-const int MIF_GUIDED_CONFUSABLE = MIF_GUIDED_HEAT | MIF_GUIDED_AI;
-
-#define MISSILE_IS_CONFUSABLE(m) ((m.missile_flags & MIF_GUIDED_CONFUSABLE) ? true : false)
-#define MISSILE_IS_GUIDED(m) ((m.missile_flags & MIF_GUIDED_ALL) ? true : false)
-#define MISSILE_IS_TRACKING(m) ((m.missile_flags & MIF_GUIDED_TRACKING) ? true : false)
-
-////
-
-.string cvar_cl_physics;
-
-.void(entity this, entity player) init_for_player;
-
-.WepSet dual_weapons;
-
-IntrusiveList g_monsters;
-IntrusiveList g_waypoints;
-IntrusiveList g_vehicles;
-IntrusiveList g_turrets;
-IntrusiveList g_mines;
-IntrusiveList g_projectiles;
-IntrusiveList g_items;
-IntrusiveList g_initforplayer;
-IntrusiveList g_clones;
-IntrusiveList g_spawnpoints;
-IntrusiveList g_bot_targets;
-IntrusiveList g_bot_dodge;
-IntrusiveList g_damagedbycontents;
-IntrusiveList g_railgunhit;
-IntrusiveList g_ladders;
-IntrusiveList g_locations;
-IntrusiveList g_saved_team;
-IntrusiveList g_monster_targets;
-IntrusiveList g_pathlib_nodes;
-STATIC_INIT(defs)
-{
-       g_monsters = IL_NEW();
-       g_waypoints = IL_NEW();
-       g_vehicles = IL_NEW();
-       g_turrets = IL_NEW();
-       g_mines = IL_NEW();
-       g_projectiles = IL_NEW();
-       g_items = IL_NEW();
-       g_initforplayer = IL_NEW();
-       g_clones = IL_NEW();
-       g_spawnpoints = IL_NEW();
-       g_bot_targets = IL_NEW();
-       g_bot_dodge = IL_NEW();
-       g_damagedbycontents = IL_NEW();
-       g_railgunhit = IL_NEW();
-       g_ladders = IL_NEW();
-       g_locations = IL_NEW();
-       g_saved_team = IL_NEW();
-       g_monster_targets = IL_NEW();
-       g_pathlib_nodes = IL_NEW();
-}