registercvar("cl_jumpspeedcap_min", "");
registercvar("cl_jumpspeedcap_max", "");
+ registercvar("cl_shootfromfixedorigin", "");
+
registercvar("cl_multijump", "1");
registercvar("cl_spawn_near_teammate", "1");
float warmup_limit;
#endif
+#ifdef SVQC
+bool autocvar_g_shootfromcenter;
+bool autocvar_g_shootfromeye;
+#endif
+REGISTER_STAT(SHOOTFROMEYE, bool, autocvar_g_shootfromeye)
+REGISTER_STAT(SHOOTFROMCENTER, bool, autocvar_g_shootfromcenter)
+
REGISTER_STAT(MOVEVARS_AIRACCEL_QW_STRETCHFACTOR, float)
REGISTER_STAT(MOVEVARS_AIRCONTROL_PENALTY, float)
REGISTER_STAT(MOVEVARS_AIRSPEEDLIMIT_NONQW, float)
vector shotorg_adjust_values(vector vecs, bool y_is_right, bool visual, int algn)
{
-#ifdef SVQC
string s;
-#endif
if (visual)
{
vecs = shotorg_adjustfromclient(vecs, y_is_right, algn);
}
-#ifdef SVQC
- else if (autocvar_g_shootfromeye)
+ else if (STAT(SHOOTFROMEYE))
{
vecs.y = vecs.z = 0;
}
- else if (autocvar_g_shootfromcenter)
+ else if (STAT(SHOOTFROMCENTER))
{
vecs.y = 0;
vecs.z -= 2;
}
- else if ((s = autocvar_g_shootfromfixedorigin) != "")
+ else if ((s = G_SHOOTFROMFIXEDORIGIN) != "")
{
vector v = stov(s);
if (y_is_right) v.y = -v.y;
vecs.y = v.y;
vecs.z = v.z;
}
-#endif
else // just do the same as top
{
vecs = shotorg_adjustfromclient(vecs, y_is_right, algn);
.WFRAME wframe;
+#ifdef SVQC
+ #define G_SHOOTFROMFIXEDORIGIN autocvar_g_shootfromfixedorigin
+#elif defined(CSQC)
+ string autocvar_cl_shootfromfixedorigin;
+ #define G_SHOOTFROMFIXEDORIGIN autocvar_cl_shootfromfixedorigin
+#endif
+
vector shotorg_adjust_values(vector vecs, bool y_is_right, bool visual, int algn);
void CL_WeaponEntity_SetModel(entity this, string name, bool _anim);
#endif
float autocvar_g_respawn_ghosts_maxtime;
float autocvar_g_respawn_ghosts_speed;
int autocvar_g_respawn_waves;
-bool autocvar_g_shootfromcenter;
-bool autocvar_g_shootfromeye;
string autocvar_g_shootfromfixedorigin;
int autocvar_g_showweaponspawns;
bool autocvar_g_spawn_alloweffects;
stuffcmd(e, sprintf("\ncl_jumpspeedcap_min \"%s\"\n", autocvar_sv_jumpspeedcap_min));
stuffcmd(e, sprintf("\ncl_jumpspeedcap_max \"%s\"\n", autocvar_sv_jumpspeedcap_max));
+ stuffcmd(e, sprintf("\ncl_shootfromfixedorigin \"%s\"\n", autocvar_g_shootfromfixedorigin));
+
MUTATOR_CALLHOOK(FixClientCvars, e);
}
}
.int items_added;
+.string shootfromfixedorigin;
bool PlayerThink(entity this)
{
if (game_stopped || intermission_running) {
FixPlayermodel(this);
+ if (this.shootfromfixedorigin != autocvar_g_shootfromfixedorigin) {
+ this.shootfromfixedorigin = autocvar_g_shootfromfixedorigin;
+ stuffcmd(this, sprintf("\ncl_shootfromfixedorigin \"%s\"\n", autocvar_g_shootfromfixedorigin));
+ }
+
// LordHavoc: allow firing on move frames (sub-ticrate), this gives better timing on slow servers
//if(frametime)
{