+#include "_all.qh"
+#include "bot/bot.qh"
+#include "g_damage.qh"
+
#if defined(CSQC)
#elif defined(MENUQC)
#elif defined(SVQC)
#include "../common/util.qh"
#include "../common/animdecide.qh"
#include "../common/monsters/sv_monsters.qh"
- #include "../common/weapons/weapons.qh"
+ #include "../common/weapons/all.qh"
#include "t_items.qh"
#include "autocvars.qh"
#include "defs.qh"
// client side physics
float Physics_Valid(string thecvar)
{
- if(!autocvar_g_physics_clientselect) { return FALSE; }
+ if(!autocvar_g_physics_clientselect) { return false; }
string l = strcat(" ", autocvar_g_physics_clientselect_options, " ");
if(strstrofs(l, strcat(" ", thecvar, " "), 0) >= 0)
- return TRUE;
+ return true;
- return FALSE;
+ return false;
}
float Physics_ClientOption(entity pl, string option)
{
- if (Physics_Valid(pl.cvar_cl_physics))
+ if(Physics_Valid(pl.cvar_cl_physics))
{
string var = sprintf("g_physics_%s_%s", pl.cvar_cl_physics, option);
- if (cvar_type(var) & 1)
+ if(cvar_type(var) & 1)
+ return cvar(var);
+ }
+ if(autocvar_g_physics_clientselect && autocvar_g_physics_clientselect_default)
+ {
+ string var = sprintf("g_physics_%s_%s", autocvar_g_physics_clientselect_default, option);
+ if(cvar_type(var) & 1)
return cvar(var);
}
return cvar(strcat("sv_", option));
#endif
}
-float speedaward_speed;
-string speedaward_holder;
-string speedaward_uid;
-void race_send_speedaward(float msg)
-{
- // send the best speed of the round
- WriteByte(msg, SVC_TEMPENTITY);
- WriteByte(msg, TE_CSQC_RACE);
- WriteByte(msg, RACE_NET_SPEED_AWARD);
- WriteInt24_t(msg, floor(speedaward_speed+0.5));
- WriteString(msg, speedaward_holder);
-}
-
-float speedaward_alltimebest;
-string speedaward_alltimebest_holder;
-string speedaward_alltimebest_uid;
-void race_send_speedaward_alltimebest(float msg)
-{
- // send the best speed
- WriteByte(msg, SVC_TEMPENTITY);
- WriteByte(msg, TE_CSQC_RACE);
- WriteByte(msg, RACE_NET_SPEED_AWARD_BEST);
- WriteInt24_t(msg, floor(speedaward_alltimebest+0.5));
- WriteString(msg, speedaward_alltimebest_holder);
-}
-
string GetMapname(void);
float speedaward_lastupdate;
float speedaward_lastsent;