#elif defined(SVQC)
void target_music_kill();
+
+void TargetMusic_RestoreGame();
#endif
#endif
string Buff_UndeprecateName(string buffname);
+entity buff_FirstFromFlags(int _buffs);
REGISTER_BUFF(Null);
BUFF_SPAWNFUNCS(random, BUFF_Null)
void GiveRot(entity e, float v0, float v1, .float rotfield, float rottime, .float regenfield, float regentime);
+spawnfunc(target_items);
+
#define PREGIVE_WEAPONS(e) WepSet save_weapons; save_weapons = STAT(WEAPONS, e)
#define PREGIVE(e,f) float save_##f; save_##f = (e).f
#define POSTGIVE_WEAPON(e,b,snd_incr,snd_decr) GiveSound((e), !!(save_weapons & WepSet_FromWeapon(b)), !!(STAT(WEAPONS, e) & WepSet_FromWeapon(b)), 0, snd_incr, snd_decr)
float turret_tag_fire_update(entity this);
void FireImoBeam(entity this, vector start, vector end, vector smin, vector smax, float bforce, float f_dmg, float f_velfactor, float deathtype);
+#ifdef TURRET_DEBUG
+void mark_error(vector where,float lifetime);
+void mark_info(vector where,float lifetime);
+entity mark_misc(vector where,float lifetime);
+#endif
+
#endif
bool vehicle_impulse(entity this, int imp);
bool vehicles_crushable(entity e);
float vehicle_altitude(entity this, float amax);
+void vehicles_enter(entity pl, entity veh);
IntrusiveList g_vehicle_returners;
STATIC_INIT(g_vehicle_returners) { g_vehicle_returners = IL_NEW(); }
vector shotorg_adjust_values(vector vecs, bool y_is_right, bool visual, int algn);
void CL_WeaponEntity_SetModel(entity this, string name, bool _anim);
+
+#ifdef SVQC
+void wframe_send(entity actor, entity weaponentity, vector a, bool restartanim);
+#endif
#endif
.entity queuenext;
.entity queueprev;
+
+void W_Crylink_Dequeue(entity e);
#endif
#ifdef SVQC
#include <common/mapobjects/trigger/jumppads.qh>
+#include <server/weapons/throwing.qh>
REGISTER_MUTATOR(porto_ticker, true);
MUTATOR_HOOKFUNCTION(porto_ticker, SV_StartFrame) {
delete(this);
}
-string W_ThrowNewWeapon(entity own, float wpn, float doreduce, vector org, vector velo, .entity weaponentity);
void W_Porto_Fail(entity this, float failhard)
{
if(this.realowner == NULL)
.float porto_v_angle_held;
.vector right_vector;
.float porto_forbidden;
+
+void W_Porto_Fail(entity this, float failhard);
#endif
#include <server/resources.qh>
#include "g_damage.qh"
+#include "player.qh"
#include "race.qh"
#include "../common/mapobjects/teleporters.qh"
#include "../lib/warpzone/anglestransform.qh"
#include "../lib/warpzone/util_server.qh"
-void CopyBody(entity this, float keepvelocity);
-
#ifdef NOCHEATS
float CheatImpulse(entity this, int imp) { return 0; }
END_CHEAT_FUNCTION();
}
-void DragBox_Think(entity this);
float drag_lastcnt;
float CheatCommand(entity this, int argc)
{
END_CHEAT_FUNCTION();
}
-float Drag(entity this, float force_allow_pick, float ischeat);
-void Drag_Begin(entity dragger, entity draggee, vector touchpoint);
-void Drag_Finish(entity dragger);
-float Drag_IsDraggable(entity draggee);
-float Drag_MayChangeAngles(entity draggee);
-void Drag_MoveForward(entity dragger);
-void Drag_SetSpeed(entity dragger, float s);
-void Drag_MoveBackward(entity dragger);
-void Drag_Update(entity dragger);
-float Drag_CanDrag(entity dragger);
-float Drag_IsDragging(entity dragger);
-void Drag_MoveDrag(entity from, entity to);
.entity dragentity;
float CheatFrame(entity this)
const float CHRAME_DRAG = 8;
void Drag_MoveDrag(entity from, entity to); // call this from CopyBody
+void DragBox_Think(entity this);
+float Drag(entity this, float force_allow_pick, float ischeat);
+void Drag_Begin(entity dragger, entity draggee, vector touchpoint);
+void Drag_Finish(entity dragger);
+float Drag_IsDraggable(entity draggee);
+float Drag_MayChangeAngles(entity draggee);
+void Drag_MoveForward(entity dragger);
+void Drag_SetSpeed(entity dragger, float s);
+void Drag_MoveBackward(entity dragger);
+void Drag_Update(entity dragger);
+float Drag_CanDrag(entity dragger);
+float Drag_IsDragging(entity dragger);
+void Drag_MoveDrag(entity from, entity to);
#include "handicap.qh"
#include "g_hook.qh"
#include "command/common.qh"
+#include "command/vote.qh"
#include "cheats.qh"
#include "g_world.qh"
#include "race.qh"
#include "../common/net_linked.qh"
#include "../common/physics/player.qh"
+#include <common/vehicles/sv_vehicles.qh>
+
#include "../common/items/_mod.qh"
#include "../common/mutators/mutator/waypoints/all.qh"
PutClientInServer(this);
}
-void PutObserverInServer(entity this);
-
STATIC_METHOD(Client, Remove, void(Client this))
{
TRANSMUTE(Observer, this);
});
}
-void SetSpectatee(entity this, entity spectatee);
-void SetSpectatee_status(entity this, int spectatee_num);
-
/*
=============
UpdatePlayerSounds(e);
}
-void FixPlayermodel(entity player);
/** putting a client as observer in the server */
void PutObserverInServer(entity this)
{
}
}
-void ClientInit_misc(entity this);
-
// TODO do we need all these fields, or should we stop autodetecting runtime
// changes and just have a console command to update this?
bool ClientInit_SendEntity(entity this, entity to, int sf)
=============
*/
.entity chatbubbleentity;
-void ReadyCount();
void ClientDisconnect(entity this)
{
assert(IS_CLIENT(this), return);
this.flags |= FL_CLIENT | FL_NOTARGET;
}
-void vehicles_enter (entity pl, entity veh);
void PlayerUseKey(entity this)
{
if (!IS_PLAYER(this))
bool Spectate(entity this, entity pl);
+void ClientInit_Spawn();
+
+void PutObserverInServer(entity this);
+
+void SetSpectatee(entity this, entity spectatee);
+void SetSpectatee_status(entity this, int spectatee_num);
+
+void FixPlayermodel(entity player);
+
+void ClientInit_misc(entity this);
+
+void ClientKill_TeamChange(entity this, float targetteam); // 0 = don't change, -1 = auto, -2 = spec
+
+bool joinAllowed(entity this);
+void Join(entity this);
+
#define SPECTATE_COPY() ACCUMULATE void SpectateCopy(entity this, entity spectatee)
#define SPECTATE_COPYFIELD(fld) SPECTATE_COPY() { this.(fld) = spectatee.(fld); }
#define GET_BAN_ARG(v, d) if (argc > reason_arg) { if ((v = stof(argv(reason_arg))) != 0) ++reason_arg; else v = d; } else { v = d; }
#define GET_BAN_REASON(v, d) if (argc > reason_arg) v = substring(command, argv_start_index(reason_arg), strlen(command) - argv_start_index(reason_arg)); else v = d;
-void Ban_KickBanClient(entity client, float bantime, float masksize, string reason);
-void Ban_View();
-float Ban_Insert(string ip, float bantime, string reason, float dosync);
-float Ban_Delete(float i);
-
// used by common/command/generic.qc:GenericCommand_dumpcommands to list all commands into a .txt file
void BanCommand_macro_write_aliases(float fh);
#include "../campaign.qh"
#include "../cheats.qh"
+#include "../client.qh"
#include "../player.qh"
#include "../ipban.qh"
#include "../mapvoting.qh"
#include <lib/warpzone/common.qh>
-void ClientKill_TeamChange(entity this, float targetteam); // 0 = don't change, -1 = auto, -2 = spec
-
// =========================================================
// Server side networked commands code, reworked by Samual
// Last updated: December 28th, 2011
}
}
-bool joinAllowed(entity this);
-void Join(entity this);
void ClientCommand_join(entity caller, float request)
{
switch (request)
#include <common/monsters/sv_monsters.qh>
-
-void PutObserverInServer(entity this);
-
-// =====================================================
-// Server side game commands code, reworked by Samual
-// =====================================================
-
// used by GameCommand_make_mapinfo()
void make_mapinfo_Think(entity this)
{
void ReadyCount();
void ReadyRestart_force();
void VoteCount(float first_count);
+void Nagger_Init();
#include <server/miscfunctions.qh>
#include <server/items.qh>
#include <server/resources.qh>
+#include <common/t_items.qh>
#include <common/mapobjects/triggers.qh>
#include <common/weapons/_all.qh>
-spawnfunc(target_items);
-
//***********************
//QUAKE 3 ENTITIES - So people can play quake3 maps with the xonotic weapons
//***********************
#pragma once
+
+bool DoesQ3ARemoveThisEntity(entity this);
#include "../common/items/_mod.qh"
#include "../common/mutators/mutator/waypoints/waypointsprites.qh"
#include "../common/mutators/mutator/instagib/sv_instagib.qh"
+#include "../common/mutators/mutator/buffs/buffs.qh"
#include "weapons/accuracy.qh"
#include "weapons/csqcprojectile.qh"
#include "weapons/selection.qh"
return MUTATOR_CALLHOOK(FragCenterMessage, attacker, targ, deathtype, kill_count_to_attacker, kill_count_to_target);
}
-entity buff_FirstFromFlags(int _buffs);
void Obituary(entity attacker, entity inflictor, entity targ, int deathtype, .entity weaponentity)
{
// Sanity check
RemoveHook(this);
}
-void GrapplingHookThink(entity this);
void GrapplingHook_Stop(entity this)
{
Send_Effect(EFFECT_HOOK_IMPACT, this.origin, '0 0 0', 1);
// Wazat's grappling hook
.entity hook;
+void GrapplingHookThink(entity this);
void RemoveGrapplingHooks(entity pl);
void RemoveHook(entity this);
// (note: you can change the hook impulse #'s to whatever you please)
string redirection_target;
float world_initialized;
-void ShuffleMaplist();
-
void SetDefaultAlpha()
{
if (!MUTATOR_CALLHOOK(SetDefaultAlpha))
}
}
-void Map_MarkAsRecent(string m);
float world_already_spawned;
-void Nagger_Init();
-void ClientInit_Spawn();
-void WeaponStats_Init();
-void WeaponStats_Shutdown();
spawnfunc(worldspawn)
{
server_is_dedicated = boolean(stof(cvar_defstring("is_dedicated")));
// return codes of map selectors:
// -1 = temporary failure (that is, try some method that is guaranteed to succeed)
// -2 = permanent failure
-float() MaplistMethod_Iterate = // usual method
+float MaplistMethod_Iterate() // usual method
{
float pass, i;
return -1;
}
-float() MaplistMethod_Repeat = // fallback method
+float MaplistMethod_Repeat() // fallback method
{
LOG_TRACE("Trying MaplistMethod_Repeat");
return -2;
}
-float() MaplistMethod_Random = // random map selection
+float MaplistMethod_Random() // random map selection
{
float i, imax;
return -1;
}
-float(float exponent) MaplistMethod_Shuffle = // more clever shuffling
+float MaplistMethod_Shuffle(float exponent) // more clever shuffling
// the exponent sets a bias on the map selection:
// the higher the exponent, the less likely "shortly repeated" same maps are
{
return true;
}
-void TargetMusic_RestoreGame();
void RestoreGame()
{
// Loaded from a save game
void ShuffleMaplist();
void Map_Goto_SetStr(string nextmapname);
void Map_Goto(float reinit);
+void Map_MarkAsRecent(string m);
float DoNextMapOverride(float reinit);
void CheckRules_World();
+float RedirectionThink();
#define MAX_IPBAN_URIS (URI_GET_IPBAN_END - URI_GET_IPBAN + 1)
-float Ban_Insert(string ip, float bantime, string reason, float dosync);
-
void OnlineBanList_SendBan(string ip, float bantime, string reason)
{
string uri;
float Ban_MaybeEnforceBanOnce(entity client);
float BanCommand(string command);
+float Ban_Insert(string ip, float bantime, string reason, float dosync);
+void Ban_KickBanClient(entity client, float bantime, float masksize, string reason);
+void Ban_View();
+float Ban_Delete(float i);
+
void OnlineBanList_URI_Get_Callback(float id, float status, string data);
this.message = "";
SUB_UseTargets(this, toucher, toucher); // TODO: should we be using toucher for the trigger here?
this.message = oldmsg;
-};
+}
/**
* Spawn a key with given model, key code and color.
}
settouch(this, item_key_touch);
-};
+}
/*QUAKED item_key (0 .5 .8) (-16 -16 -24) (16 16 32) FLOATING
this.classname = "item_key";
this.itemkeys = ITEM_KEY_BIT(1);
spawnfunc_item_key(this);
-};
+}
/*QUAKED item_key2 (0 .5 .8) (-16 -16 -24) (16 16 32) FLOATING
GOLD key.
this.classname = "item_key";
this.itemkeys = ITEM_KEY_BIT(0);
spawnfunc_item_key(this);
-};
+}
#include "../common/command/_mod.qh"
#include "../common/constants.qh"
#include <common/net_linked.qh>
+#include <common/weapons/weapon/crylink.qh>
#include "../common/deathtypes/all.qh"
#include "../common/mapinfo.qh"
#include "../common/notifications/all.qh"
#define SUB_OwnerCheck(ent,oth) ((oth) && ((oth) == (ent).owner))
-void W_Crylink_Dequeue(entity e);
bool WarpZone_Projectile_Touch_ImpactFilter_Callback(entity this, entity toucher)
{
if(SUB_OwnerCheck(this, toucher))
MODEL(EDGE, "models/pathlib/edge.md3");
#ifdef TURRET_DEBUG
-void mark_error(vector where,float lifetime);
-void mark_info(vector where,float lifetime);
-entity mark_misc(vector where,float lifetime);
+#include <common/turrets/util.qh>
#endif
void pathlib_showpath(entity start)
#pragma once
#include "pathlib.qh"
+
+#if DEBUGPATHING
+void pathlib_showpath(entity start);
+void pathlib_showpath2(entity path);
+void pathlib_showsquare(vector where,float goodsquare,float _lifetime);
+#endif
}
#if DEBUGPATHING
-void pathlib_showpath(entity start);
-void pathlib_showpath2(entity path);
-void pathlib_showsquare(vector where,float goodsquare,float _lifetime);
+#include "debug.qh"
#endif
const vector PLIB_RIGHT = '1 0 0';
//#define PLIB_LEFT '-1 0 0'
-#if DEBUGPATHING
-void pathlib_showpath(entity start);
-void pathlib_showpath2(entity path);
-#endif
-
entity openlist;
entity closedlist;
toucher.effects += EF_BLUE - EF_RED;
}
-void Portal_Think(entity this);
void Portal_MakeBrokenPortal(entity portal)
{
portal.skin = 2;
vector Portal_ApplyTransformToPlayerAngle(vector transform, vector vangle);
void Portal_ClearAll_PortalsOnly(entity own);
+
+void Portal_Think(entity this);
#include <common/gamemodes/rules.qh>
#include <common/net_linked.qh>
#include <common/state.qh>
+#include <common/weapons/weapon/porto.qh>
#include "../common/mapobjects/subs.qh"
#include <common/mapobjects/triggers.qh>
#include "../lib/warpzone/util_server.qh"
race_SendNextCheckpoint(msg_entity.enemy, 1);
}
-void W_Porto_Fail(entity this, float failhard);
-
float race_readTime(string map, float pos)
{
string rr = ((g_cts) ? CTS_RECORD : ((g_ctf) ? CTF_RECORD : RACE_RECORD));
const float MAX_CHECKPOINTS = 255;
-spawnfunc(target_checkpoint);
-
.float race_penalty;
.float race_penalty_accumulator;
.string race_penalty_reason;
void race_RetractPlayer(entity this);
void race_InitSpectator();
+
+spawnfunc(target_checkpoint);
int ScoreRules_teams;
-void CheckAllowedTeams (entity for_whom);
-
int NumTeams(int teams)
{
return boolean(teams & BIT(0)) + boolean(teams & BIT(1)) + boolean(teams & BIT(2)) + boolean(teams & BIT(3));
#include <server/mutators/_mod.qh>
#include "weapons/csqcprojectile.qh"
+#include <server/compat/quake3.qh>
#include "../common/constants.qh"
#include "../common/deathtypes/all.qh"
bool game_delay_last;
bool autocvar_sv_autopause = false;
-float RedirectionThink();
void systems_update();
void sys_phys_update(entity this, float dt);
void StartFrame()
.float anglejitter;
.string gametypefilter;
.string cvarfilter;
-bool DoesQ3ARemoveThisEntity(entity this);
/**
* Evaluate an expression of the form: [+ | -]? [var[op]val | [op]var | val | var] ...
return false;
}
-void wframe_send(entity actor, entity weaponentity, vector a, bool restartanim);
-
/**
* @param t defer thinking until time + t
* @param func next think function