seta cl_damagetext_velocity "0 0 20" "Damage text move direction"
seta cl_damagetext_offset "0 -40 0" "Damage text offset"
seta cl_damagetext_accumulate_range "30" "Damage text spawned within this range is accumulated"
+seta cl_damagetext_accumulate_alpha_rel "0.65" "Only update existing damage text when it's above this much percentage (0 to 1) of the starting alpha"
seta cl_damagetext_friendlyfire "1" "Show damage text for friendlyfire too"
seta cl_damagetext_friendlyfire_color "1 0 0" "Damage text color for friendlyfire"
// {{{ Misc
set g_monsters 1
set g_monsters_edit 0
-set g_monsters_think_delay 0.1
+set g_monsters_think_delay 0.03333
set g_monsters_skill 1 "Monster skill (affecting some of their attributes). 1 - easy, 2 - medium, 3 - hard, 4 - insane, 5 - nightmare"
set g_monsters_miniboss_chance 5
set g_monsters_miniboss_healthboost 100
.int team;
.int team_size;
-float vid_conwidth, vid_conheight;
+float vid_conheight;
int binddb;
// QUALIFYING
float blurtest_time0, blurtest_time1, blurtest_radius, blurtest_power;
#endif
-float servertime, serverprevtime, serverdeltatime;
+float serverprevtime, serverdeltatime;
float ticrate;
#include "quickmenu.qh"
#include <common/ent_cs.qh>
#include <common/constants.qh>
+#include <common/net_linked.qh>
#include <common/mapinfo.qh>
#include <common/minigames/cl_minigames.qh>
#include <common/stats.qh>
#include <common/mapinfo.qh>
#include <common/minigames/cl_minigames.qh>
#include <common/minigames/cl_minigames_hud.qh>
+#include <common/net_linked.qh>
#include <common/net_notice.qh>
#include <common/triggers/include.qh>
#include <common/vehicles/all.qh>
#if XONOTIC
#include <client/_all.inc>
-#endif
#include <ecs/_mod.inc>
+#endif
#ifdef BUILD_MOD
#include <mod/client/progs.inc>
#include <common/ent_cs.qh>
#include <common/constants.qh>
+#include <common/net_linked.qh>
#include <common/mapinfo.qh>
#include <common/teams.qh>
#include <common/ent_cs.qh>
#include <common/anim.qh>
#include <common/constants.qh>
+#include <common/net_linked.qh>
#include <common/debug.qh>
#include <common/mapinfo.qh>
#include <common/gamemodes/_mod.qh>
#include <common/triggers/target/music.qh>
#include <common/teams.qh>
+#include <common/weapons/weapon/tuba.qh>
+
#include <common/vehicles/all.qh>
#include <common/weapons/_all.qh>
#include <common/viewloc.qh>
#include "../mutators/events.qh"
#include <common/constants.qh>
+#include <common/net_linked.qh>
#include <common/physics/movetypes/movetypes.qh>
#include <lib/csqcmodel/interpolate.qh>
#pragma once
-REGISTER_NET_TEMP(TE_CSQC_PICTURE)
-REGISTER_NET_TEMP(TE_CSQC_RACE)
-REGISTER_NET_TEMP(TE_CSQC_TEAMNAGGER)
-REGISTER_NET_TEMP(TE_CSQC_PINGPLREPORT)
-REGISTER_NET_TEMP(TE_CSQC_WEAPONCOMPLAIN)
-REGISTER_NET_TEMP(TE_CSQC_VEHICLESETUP)
-
-const int RACE_NET_CHECKPOINT_HIT_QUALIFYING = 0; // byte checkpoint, short time, short recordtime, string recordholder
-const int RACE_NET_CHECKPOINT_CLEAR = 1;
-const int RACE_NET_CHECKPOINT_NEXT_QUALIFYING = 2; // byte nextcheckpoint, short recordtime, string recordholder
-const int RACE_NET_CHECKPOINT_HIT_RACE = 3; // byte checkpoint, short delta, byte lapsdelta, string opponent
-const int RACE_NET_CHECKPOINT_HIT_RACE_BY_OPPONENT = 4; // byte checkpoint, short delta, byte lapsdelta, string opponent
-const int RACE_NET_CHECKPOINT_NEXT_SPEC_QUALIFYING = 5; // byte nextcheckpoint, float laptime, short recordtime, string recordholder
-const int RACE_NET_PENALTY_RACE = 6; // byte penaltytime, string reason
-const int RACE_NET_PENALTY_QUALIFYING = 7; // byte penaltytime, string reason
-const int RACE_NET_SERVER_RECORD = 8; // server record, sent to client
-const int RACE_NET_SPEED_AWARD = 9; // speed award, sent to client
-const int RACE_NET_SPEED_AWARD_BEST = 10; // all time best speed award, sent to client
-const int RACE_NET_SERVER_RANKINGS = 11;
-const int RACE_NET_SERVER_STATUS = 12;
const int RANKINGS_CNT = 15;
-REGISTER_NET_LINKED(_ENT_CLIENT_INIT)
-#ifdef CSQC
-NET_HANDLE(_ENT_CLIENT_INIT, bool isnew) { make_pure(this); return true; }
-#endif
-/** Sent as a temp entity from a persistent linked entity */
-REGISTER_NET_TEMP(ENT_CLIENT_INIT)
-
-REGISTER_NET_LINKED(ENT_CLIENT_SCORES_INFO)
-REGISTER_NET_LINKED(ENT_CLIENT_SCORES)
-REGISTER_NET_LINKED(ENT_CLIENT_TEAMSCORES)
-REGISTER_NET_LINKED(ENT_CLIENT_NAGGER) // flags [votecalledvote]
-REGISTER_NET_LINKED(ENT_CLIENT_RADARLINK) // flags [startorigin] [endorigin] [startcolor+16*endcolor]
-REGISTER_NET_LINKED(ENT_CLIENT_PROJECTILE)
-REGISTER_NET_LINKED(ENT_CLIENT_MAPVOTE)
-REGISTER_NET_LINKED(ENT_CLIENT_CLIENTDATA)
-REGISTER_NET_LINKED(ENT_CLIENT_RANDOMSEED)
-REGISTER_NET_LINKED(ENT_CLIENT_ACCURACY)
-REGISTER_NET_LINKED(ENT_CLIENT_ELIMINATEDPLAYERS)
-
-REGISTER_NET_LINKED(ENT_CLIENT_MODEL)
-
-REGISTER_NET_LINKED(ENT_CLIENT_WARPZONE)
-REGISTER_NET_LINKED(ENT_CLIENT_WARPZONE_CAMERA)
-REGISTER_NET_LINKED(ENT_CLIENT_WARPZONE_TELEPORTED)
-
-REGISTER_NET_LINKED(ENT_CLIENT_ARC_BEAM)
-REGISTER_NET_LINKED(ENT_CLIENT_HOOK)
-REGISTER_NET_LINKED(ENT_CLIENT_TUBANOTE)
-
-REGISTER_NET_LINKED(ENT_CLIENT_SPAWNPOINT)
-REGISTER_NET_LINKED(ENT_CLIENT_SPAWNEVENT)
-REGISTER_NET_LINKED(ENT_CLIENT_WALL)
-
const int SPRITERULE_DEFAULT = 0;
const int SPRITERULE_TEAMPLAY = 1;
const int SPRITERULE_SPECTATOR = 2;
#define X(OFFSET) \
tracebox(this.origin, this.mins, this.maxs, this.origin + OFFSET, true, this); \
- if(trace_fraction < 1 && vdist(this.origin - trace_endpos, <, threshold)) \
+ if(trace_fraction < 1 && !(trace_dphitq3surfaceflags & Q3SURFACEFLAG_SKY) && vdist(this.origin - trace_endpos, <, threshold)) \
return true;
X(1000*v_right);
X(-1000*v_right);
--- /dev/null
+#pragma once
+
+REGISTER_NET_TEMP(TE_CSQC_PICTURE)
+REGISTER_NET_TEMP(TE_CSQC_RACE)
+REGISTER_NET_TEMP(TE_CSQC_TEAMNAGGER)
+REGISTER_NET_TEMP(TE_CSQC_PINGPLREPORT)
+REGISTER_NET_TEMP(TE_CSQC_WEAPONCOMPLAIN)
+REGISTER_NET_TEMP(TE_CSQC_VEHICLESETUP)
+
+const int RACE_NET_CHECKPOINT_HIT_QUALIFYING = 0; // byte checkpoint, short time, short recordtime, string recordholder
+const int RACE_NET_CHECKPOINT_CLEAR = 1;
+const int RACE_NET_CHECKPOINT_NEXT_QUALIFYING = 2; // byte nextcheckpoint, short recordtime, string recordholder
+const int RACE_NET_CHECKPOINT_HIT_RACE = 3; // byte checkpoint, short delta, byte lapsdelta, string opponent
+const int RACE_NET_CHECKPOINT_HIT_RACE_BY_OPPONENT = 4; // byte checkpoint, short delta, byte lapsdelta, string opponent
+const int RACE_NET_CHECKPOINT_NEXT_SPEC_QUALIFYING = 5; // byte nextcheckpoint, float laptime, short recordtime, string recordholder
+const int RACE_NET_PENALTY_RACE = 6; // byte penaltytime, string reason
+const int RACE_NET_PENALTY_QUALIFYING = 7; // byte penaltytime, string reason
+const int RACE_NET_SERVER_RECORD = 8; // server record, sent to client
+const int RACE_NET_SPEED_AWARD = 9; // speed award, sent to client
+const int RACE_NET_SPEED_AWARD_BEST = 10; // all time best speed award, sent to client
+const int RACE_NET_SERVER_RANKINGS = 11;
+const int RACE_NET_SERVER_STATUS = 12;
+
+REGISTER_NET_LINKED(_ENT_CLIENT_INIT)
+#ifdef CSQC
+NET_HANDLE(_ENT_CLIENT_INIT, bool isnew) { make_pure(this); return true; }
+#endif
+/** Sent as a temp entity from a persistent linked entity */
+REGISTER_NET_TEMP(ENT_CLIENT_INIT)
+
+REGISTER_NET_LINKED(ENT_CLIENT_SCORES_INFO)
+REGISTER_NET_LINKED(ENT_CLIENT_SCORES)
+REGISTER_NET_LINKED(ENT_CLIENT_TEAMSCORES)
+REGISTER_NET_LINKED(ENT_CLIENT_NAGGER) // flags [votecalledvote]
+REGISTER_NET_LINKED(ENT_CLIENT_RADARLINK) // flags [startorigin] [endorigin] [startcolor+16*endcolor]
+REGISTER_NET_LINKED(ENT_CLIENT_PROJECTILE)
+REGISTER_NET_LINKED(ENT_CLIENT_MAPVOTE)
+REGISTER_NET_LINKED(ENT_CLIENT_CLIENTDATA)
+REGISTER_NET_LINKED(ENT_CLIENT_RANDOMSEED)
+REGISTER_NET_LINKED(ENT_CLIENT_ACCURACY)
+REGISTER_NET_LINKED(ENT_CLIENT_ELIMINATEDPLAYERS)
+
+REGISTER_NET_LINKED(ENT_CLIENT_MODEL)
+
+REGISTER_NET_LINKED(ENT_CLIENT_WARPZONE)
+REGISTER_NET_LINKED(ENT_CLIENT_WARPZONE_CAMERA)
+REGISTER_NET_LINKED(ENT_CLIENT_WARPZONE_TELEPORTED)
+
+REGISTER_NET_LINKED(ENT_CLIENT_ARC_BEAM)
+REGISTER_NET_LINKED(ENT_CLIENT_HOOK)
+REGISTER_NET_LINKED(ENT_CLIENT_TUBANOTE)
+
+REGISTER_NET_LINKED(ENT_CLIENT_SPAWNPOINT)
+REGISTER_NET_LINKED(ENT_CLIENT_SPAWNEVENT)
+REGISTER_NET_LINKED(ENT_CLIENT_WALL)
#elif defined(MENUQC)
#elif defined(SVQC)
#include <common/constants.qh>
+ #include <common/net_linked.qh>
#include <common/teams.qh>
#include <server/autocvars.qh>
#include <server/constants.qh>
this.colormod = '1 0 0' + '0 1 0' * (2 * h - 0.5);
else
this.colormod = '1 1 1';
-
- CSQCMODEL_AUTOUPDATE(this);
}
void func_breakable_look_destroyed(entity this)
this.effects &= ~EF_NODRAW;
}
- CSQCMODEL_AUTOUPDATE(this);
-
this.solid = SOLID_NOT;
}
if(this.mdl_dead != "") // only do this if we use mdl_dead, to behave better with misc_follow
setorigin(this, this.dropped_origin);
- CSQCMODEL_AUTOUPDATE(this);
-
this.solid = SOLID_BSP;
}
stopsound (this, CH_TRIGGER_SINGLE);
}
+void func_breakable_think(entity this)
+{
+ this.nextthink = time;
+ CSQCMODEL_AUTOUPDATE(this);
+}
+
void func_breakable_destroy(entity this, entity actor, entity trigger);
void func_breakable_behave_restore(entity this)
{
if(this.spawnflags & 4)
this.use = func_breakable_destroy; // don't need to set it usually, as .use isn't reset
this.state = 0;
- this.nextthink = 0; // cancel auto respawn
+ //this.nextthink = 0; // cancel auto respawn
+ setthink(this, func_breakable_think);
+ this.nextthink = time + 0.1;
func_breakable_colormod(this);
if (this.noise1)
_sound (this, CH_TRIGGER_SINGLE, this.noise1, VOL_BASE, ATTEN_NORM);
{
func_breakable_look_destroyed(this);
func_breakable_behave_destroyed(this);
-
- CSQCMODEL_AUTOUPDATE(this);
}
void func_breakable_restore(entity this, entity actor, entity trigger)
{
func_breakable_look_restore(this);
func_breakable_behave_restore(this);
-
- CSQCMODEL_AUTOUPDATE(this);
}
void func_breakable_restore_self(entity this)
if(this.respawntime)
{
+ CSQCMODEL_AUTOUPDATE(this);
setthink(this, func_breakable_restore_self);
this.nextthink = time + this.respawntime + crandom() * this.respawntimejitter;
}
// do not explode NOW but in the NEXT FRAME!
// because recursive calls to RadiusDamage are not allowed
this.nextthink = time;
+ CSQCMODEL_AUTOUPDATE(this);
setthink(this, func_breakable_destroy_self);
}
}
func_breakable_behave_destroyed(this);
else
func_breakable_behave_restore(this);
-
- CSQCMODEL_AUTOUPDATE(this);
}
// destructible walls that can be used to trigger target_objective_decrease
#elif defined(MENUQC)
#elif defined(SVQC)
#include <common/constants.qh>
+ #include <common/net_linked.qh>
#include <server/constants.qh>
#include <server/defs.qh>
#endif
{
// loadable hagar secondary attack, must always run each frame
- if(time < game_starttime || PS(actor).m_switchweapon != WEP_HAGAR)
+ if(time < game_starttime)
return;
bool loaded = actor.(weaponentity).hagar_load >= WEP_CVAR_SEC(hagar, load_max);
const int TUBA_MAX = 27;
const int TUBA_INSTRUMENTS = 3;
-entityclass(Tuba);
-class(Tuba) .int note;
-class(Tuba) .bool tuba_attenuate;
-class(Tuba) .float tuba_volume;
-class(Tuba) .float tuba_volume_initial;
-
int Tuba_PitchStep;
void tubasound(entity e, bool restart)
#pragma once
+
+#ifdef CSQC
+entityclass(Tuba);
+class(Tuba) .int note;
+class(Tuba) .bool tuba_attenuate;
+class(Tuba) .float tuba_volume;
+class(Tuba) .float tuba_volume_initial;
+class(Tuba) .int tuba_instrument;
+#endif
#endif
#undef ENGINE_EVENT
+#if XONOTIC
#ifdef GAMEQC
#include <ecs/_mod.qh>
#endif
+#endif
#include <client/defs.qh>
#include <client/main.qh>
#include <common/constants.qh>
+#include <common/net_linked.qh>
#include <common/physics/player.qh>
#include <common/stats.qh>
#include <common/triggers/trigger/viewloc.qh>
#include "common.qh"
#include <common/animdecide.qh>
#include <common/constants.qh>
+#include <common/net_linked.qh>
#include <common/util.qh>
#include <server/constants.qh>
#include <server/defs.qh>
#include "i18n.qh"
#include "vector.qh"
- #include <client/defs.qh>
+ float vid_conwidth;
void Draw_CylindricLine(vector from, vector to, float thickness, string texture, float aspect, float shift, vector rgb, float theAlpha, float drawflag, vector vieworg)
{
// generated file; do not modify
-#include <lib/matrix/command.qc>
+#if XONOTIC
+ #include <lib/matrix/command.qc>
+#endif
#include <lib/matrix/matrix.qc>
// generated file; do not modify
-#include <lib/matrix/command.qh>
+#if XONOTIC
+ #include <lib/matrix/command.qh>
+#endif
#include <lib/matrix/matrix.qh>
#define APPROXPASTTIME_RANGE (64 * APPROXPASTTIME_ACCURACY_REQUIREMENT)
#ifdef CSQC
+ float servertime;
entity ReadCSQCEntity()
{
int f = ReadShort();
#define ReadInt48_t() vec3(ReadInt24_t(), ReadInt24_t(), 0)
#define ReadInt72_t() vec3(ReadInt24_t(), ReadInt24_t(), ReadInt24_t())
- int _ReadSByte;
+ noref int _ReadSByte;
#define ReadSByte() (_ReadSByte = ReadByte(), (_ReadSByte & BIT(7) ? -128 : 0) + (_ReadSByte & BITS(7)))
#define ReadFloat() ReadCoord()
#define ReadVector() vec3(ReadFloat(), ReadFloat(), ReadFloat())
#elif defined(MENUQC)
#elif defined(SVQC)
#include <common/constants.qh>
+ #include <common/net_linked.qh>
#include <common/triggers/subs.qh>
#include <common/util.qh>
- #include <server/command/_mod.qh>
#include <server/constants.qh>
#include <server/defs.qh>
#endif
#include <common/physics/player.qh>
#include <common/constants.qh>
+#include <common/net_linked.qh>
#include <common/mapinfo.qh>
#include <common/teams.qh>
#include <common/util.qh>
#include "../waypoints.qh"
#include <common/constants.qh>
+#include <common/net_linked.qh>
#include <common/physics/player.qh>
#include <common/state.qh>
#include <common/items/_mod.qh>
#include <common/items/_mod.qh>
#include <common/constants.qh>
+#include <common/net_linked.qh>
#include <common/triggers/trigger/jumppads.qh>
.float speed;
#include "../../antilag.qh"
#include <common/constants.qh>
+#include <common/net_linked.qh>
#include <lib/warpzone/common.qh>
#include <lib/warpzone/util_server.qh>
#include "weapons/weaponsystem.qh"
#include "../common/net_notice.qh"
+#include "../common/net_linked.qh"
#include "../common/physics/player.qh"
#include "../common/items/_mod.qh"
this.playerid = 0;
ReadyCount();
if (vote_called && IS_REAL_CLIENT(this)) VoteCount(false);
+
+ ONREMOVE(this);
}
void ChatBubbleThink(entity this)
#include "../race.qh"
#include <common/constants.qh>
+#include <common/net_linked.qh>
#include <common/mapinfo.qh>
#include <common/util.qh>
#include "../mutators/_mod.qh"
#include <common/constants.qh>
+#include <common/net_linked.qh>
#include <common/mapinfo.qh>
#include <common/notifications/all.qh>
#include <common/teams.qh>
#include "../mutators/_mod.qh"
#include <common/constants.qh>
+#include <common/net_linked.qh>
#include <common/mapinfo.qh>
#include <common/notifications/all.qh>
#include <common/playerstats.qh>
#include "../common/vehicles/all.qh"
#include "../common/constants.qh"
#include "../common/util.qh"
+#include <common/net_linked.qh>
#include <common/weapons/_all.qh>
#include "../lib/warpzone/common.qh"
#include "../lib/warpzone/server.qh"
#include "g_models.qh"
#include "g_subs.qh"
+#include <common/net_linked.qh>
#include "../common/triggers/subs.qh"
#include "../common/triggers/triggers.qh"
#include "teamplay.qh"
#include "weapons/weaponstats.qh"
#include "../common/constants.qh"
+#include <common/net_linked.qh>
#include "../common/deathtypes/all.qh"
#include "../common/mapinfo.qh"
#include "../common/monsters/_mod.qh"
#include "command/cmd.qh"
#include "command/getreplies.qh"
#include "../common/constants.qh"
+#include <common/net_linked.qh>
#include "../common/mapinfo.qh"
#include "../common/playerstats.qh"
#include "../common/util.qh"
#include "weapons/selection.qh"
#include "../common/command/_mod.qh"
#include "../common/constants.qh"
+#include <common/net_linked.qh>
#include "../common/deathtypes/all.qh"
#include "../common/mapinfo.qh"
#include "../common/notifications/all.qh"
#if XONOTIC
#include <server/_all.inc>
-#endif
#include <ecs/_mod.inc>
+#endif
#ifdef BUILD_MOD
#include <mod/server/progs.inc>
#include "../common/deathtypes/all.qh"
#include "../common/notifications/all.qh"
#include "../common/mapinfo.qh"
+#include <common/net_linked.qh>
#include "../common/triggers/subs.qh"
#include "../lib/warpzone/util_server.qh"
#include "../lib/warpzone/common.qh"
#include "command/common.qh"
#include "mutators/_mod.qh"
+#include <common/net_linked.qh>
#include "../common/playerstats.qh"
#include "../common/teams.qh"
#include "g_world.qh"
#include "race.qh"
#include "../common/constants.qh"
+#include <common/net_linked.qh>
#include "../common/teams.qh"
#include "../common/triggers/subs.qh"
#include "../common/util.qh"
#include "../mutators/_mod.qh"
#include <common/constants.qh>
+#include <common/net_linked.qh>
#include <common/teams.qh>
#include <common/util.qh>
#include <common/weapons/_all.qh>
#include <common/t_items.qh>
#include <common/constants.qh>
+#include <common/net_linked.qh>
#include <common/deathtypes/all.qh>
#include <common/notifications/all.qh>
#include <common/util.qh>
#include "../command/common.qh"
#include <common/constants.qh>
+#include <common/net_linked.qh>
#include <common/weapons/_all.qh>
.float csqcprojectile_type;
#include "weaponsystem.qh"
#include <common/t_items.qh>
#include <common/constants.qh>
+#include <common/net_linked.qh>
#include <common/util.qh>
#include <common/items/item.qh>
#include <common/weapons/_all.qh>
#include "../antilag.qh"
#include <common/constants.qh>
+#include <common/net_linked.qh>
#include <common/util.qh>
#include <common/weapons/_all.qh>
#include <common/t_items.qh>
#include <common/animdecide.qh>
#include <common/constants.qh>
+#include <common/net_linked.qh>
#include <common/monsters/_mod.qh>
#include <common/notifications/all.qh>
#include <common/util.qh>