#pragma once
#include <common/mutators/base.qh>
+#include <server/elimination.qh>
#include <server/round_handler.qh>
#include <server/miscfunctions.qh>
#include <server/command/sv_cmd.qh>
#include "sv_freezetag.qh"
+#include <server/elimination.qh>
#include <server/resources.qh>
float autocvar_g_freezetag_frozen_maxtime;
#include "triggers.qh"
+bool isPushable(entity e)
+{
+ if(e.pushable)
+ return true;
+#ifdef SVQC
+ if(IS_VEHICLE(e))
+ return false;
+ if(e.iscreature)
+ return true;
+ if (Item_IsLoot(e))
+ {
+ return true;
+ }
+ switch(e.classname)
+ {
+ case "body":
+ return true;
+ case "bullet": // antilagged bullets can't hit this either
+ return false;
+ }
+ if (e.projectiledeathtype)
+ return true;
+#endif
+#ifdef CSQC
+ if(e.flags & FL_PROJECTILE)
+ return true;
+ if(e.isplayermodel)
+ return true;
+#endif
+ return false;
+}
+
void SUB_DontUseTargets(entity this, entity actor, entity trigger) { }
void SUB_UseTargets(entity this, entity actor, entity trigger);
#define IS_CLIENT(s) (((s).isplayermodel & ISPLAYER_CLIENT) || (s) == csqcplayer)
#define IS_PLAYER(s) ((s).isplayermodel & ISPLAYER_PLAYER)
#define IS_NOT_A_CLIENT(s) (!(s).isplayermodel && (s) != csqcplayer)
- #define isPushable(s) ((s).isplayermodel || (s).pushable || ((s).flags & FL_PROJECTILE))
//float player_multijump;
//float player_jumpheight;
#include <server/client.qc>
#include <server/clientkill.qc>
#include <server/damage.qc>
+#include <server/elimination.qc>
#include <server/gamelog.qc>
#include <server/handicap.qc>
#include <server/hook.qc>
#include <server/client.qh>
#include <server/clientkill.qh>
#include <server/damage.qh>
+#include <server/elimination.qh>
#include <server/gamelog.qh>
#include <server/handicap.qh>
#include <server/hook.qh>
--- /dev/null
+#include "elimination.qh"
+
+#include <common/net_linked.qh>
+#include <server/utils.qh>
+
+.float(entity) isEliminated;
+bool EliminatedPlayers_SendEntity(entity this, entity to, float sendflags)
+{
+ Stream out = MSG_ENTITY;
+ WriteHeader(out, ENT_CLIENT_ELIMINATEDPLAYERS);
+ serialize(byte, out, sendflags);
+ if (sendflags & 1) {
+ for (int i = 1; i <= maxclients; i += 8) {
+ int f = 0;
+ entity e = edict_num(i);
+ for (int b = 0; b < 8; ++b, e = nextent(e)) {
+ if (eliminatedPlayers.isEliminated(e)) {
+ f |= BIT(b);
+ }
+ }
+ serialize(byte, out, f);
+ }
+ }
+ return true;
+}
+
+void EliminatedPlayers_Init(float(entity) isEliminated_func)
+{
+ if(eliminatedPlayers)
+ {
+ backtrace("Can't spawn eliminatedPlayers again!");
+ return;
+ }
+ Net_LinkEntity(eliminatedPlayers = spawn(), false, 0, EliminatedPlayers_SendEntity);
+ eliminatedPlayers.isEliminated = isEliminated_func;
+}
--- /dev/null
+#pragma once
+
+entity eliminatedPlayers;
+void EliminatedPlayers_Init(float(entity) isEliminated_func);
#include "gamelog.qh"
#include <server/autocvars.qh>
-#include <server/miscfunctions.qh>
+#include <server/main.qh>
string GameLog_ProcessIP(string s)
{
if (!server_is_dedicated) Pause_TryPause(false);
}
+void dedicated_print(string input)
+{
+ if (server_is_dedicated) print(input);
+}
+
/*
=============
StartFrame
#pragma once
+/** print(), but only print if the server is not local */
+void dedicated_print(string input);
+
bool expr_evaluate(string s);
#ifdef PROFILING
WarpZone_traceline_antilag(pl, CS(pl).cursor_trace_start, CS(pl).cursor_trace_start + normalize(CS(pl).cursor_trace_endpos - CS(pl).cursor_trace_start) * max_shot_distance, MOVE_NORMAL, pl, ANTILAG_LATENCY(pl));
}
-void dedicated_print(string input)
-{
- if (server_is_dedicated) print(input);
-}
-
entity findnearest(vector point, bool checkitems, vector axismod)
{
vector dist;
delete_fn = remove_unsafely;
}
-.float(entity) isEliminated;
-bool EliminatedPlayers_SendEntity(entity this, entity to, float sendflags)
-{
- Stream out = MSG_ENTITY;
- WriteHeader(out, ENT_CLIENT_ELIMINATEDPLAYERS);
- serialize(byte, out, sendflags);
- if (sendflags & 1) {
- for (int i = 1; i <= maxclients; i += 8) {
- int f = 0;
- entity e = edict_num(i);
- for (int b = 0; b < 8; ++b, e = nextent(e)) {
- if (eliminatedPlayers.isEliminated(e)) {
- f |= BIT(b);
- }
- }
- serialize(byte, out, f);
- }
- }
- return true;
-}
-
-void EliminatedPlayers_Init(float(entity) isEliminated_func)
-{
- if(eliminatedPlayers)
- {
- backtrace("Can't spawn eliminatedPlayers again!");
- return;
- }
- Net_LinkEntity(eliminatedPlayers = spawn(), false, 0, EliminatedPlayers_SendEntity);
- eliminatedPlayers.isEliminated = isEliminated_func;
-}
-
-
-
-
void adaptor_think2use_hittype_splash(entity this) // for timed projectile detonation
{
if(!(IS_ONGROUND(this))) // if onground, we ARE touching something, but HITTYPE_SPLASH is to be networked if the damage causing projectile is not touching ANYTHING
}
return 0;
}
-
-.bool pushable;
-bool isPushable(entity e)
-{
- if(e.pushable)
- return true;
- if(IS_VEHICLE(e))
- return false;
- if(e.iscreature)
- return true;
- if (Item_IsLoot(e))
- {
- return true;
- }
- switch(e.classname)
- {
- case "body":
- return true;
- case "bullet": // antilagged bullets can't hit this either
- return false;
- }
- if (e.projectiledeathtype)
- return true;
- return false;
-}
.vector dropped_origin;
-entity eliminatedPlayers;
-void EliminatedPlayers_Init(float(entity) isEliminated_func);
-
void write_recordmarker(entity pl, float tstart, float dt);
void play2all(string samp);
string formatmessage(entity this, string msg);
-/** print(), but only print if the server is not local */
-void dedicated_print(string input);
-
void GetCvars(entity this, entity store, int f);
string GetMapname();
-float isPushable(entity e);
-
float LostMovetypeFollow(entity ent);
string uid2name(string myuid);