-float autocvar_net_connecttimeout = 30;
+noref float autocvar_net_connecttimeout = 30;
#ifdef GAMEQC
#include "anim.qc"
const int SERVERFLAG_TEAMPLAY = 2;
const int SERVERFLAG_PLAYERSTATS = 4;
+#ifdef SVQC
// FIXME/EXPLAINME: why? Mario: because
vector autocvar_sv_player_maxs = '16 16 45';
vector autocvar_sv_player_mins = '-16 -16 -24';
vector autocvar_sv_player_crouch_mins = '-16 -16 -24';
vector autocvar_sv_player_crouch_viewoffset = '0 0 20';
vector autocvar_sv_player_headsize = '24 24 12';
+#endif
// a bit more constant
REGISTER_MUTATOR(damagetext, true);
-#if defined(CSQC) || defined(MENUQC)
+// || defined(MENUQC)
+#if defined(CSQC)
// no translatable cvar description please
AUTOCVAR_SAVE(cl_damagetext, bool, true, "Draw damage dealt where you hit the enemy");
AUTOCVAR_SAVE(cl_damagetext_format, string, "-{total}", "How to format the damage text. {health}, {armor}, {total}, {potential}: full damage not capped to target's health, {potential_health}: health damage not capped to target's health");
#include <common/weapons/_all.qh>
+#ifdef SVQC
float autocvar_g_vehicle_bumblebee_cannon_cost = 2;
float autocvar_g_vehicle_bumblebee_cannon_damage = 60;
float autocvar_g_vehicle_bumblebee_cannon_radius = 225;
float autocvar_g_vehicle_bumblebee_cannon_speed = 20000;
float autocvar_g_vehicle_bumblebee_cannon_spread = 0.02;
float autocvar_g_vehicle_bumblebee_cannon_force = -35;
+#endif
#ifdef SVQC
void bumblebee_fire_cannon(entity this, entity _gun, string _tagname, entity _owner);
void racer_fire_rocket(entity player, vector org, vector dir, entity trg);
#endif
+#ifdef SVQC
float autocvar_g_vehicle_racer_cannon_cost = 2;
float autocvar_g_vehicle_racer_cannon_damage = 15;
float autocvar_g_vehicle_racer_cannon_radius = 100;
float autocvar_g_vehicle_racer_rocket_climbspeed = 1600;
float autocvar_g_vehicle_racer_rocket_locked_maxangle = 1.8;
+#endif
ENDCLASS(RaptorFlare)
REGISTER_WEAPON(RAPTOR_FLARE, NEW(RaptorFlare));
-
+#ifdef SVQC
float autocvar_g_vehicle_raptor_cannon_cost = 1;
float autocvar_g_vehicle_raptor_cannon_damage = 10;
float autocvar_g_vehicle_raptor_cannon_radius = 60;
float autocvar_g_vehicle_raptor_flare_lifetime = 10;
float autocvar_g_vehicle_raptor_flare_chase = 0.9;
float autocvar_g_vehicle_raptor_flare_range = 2000;
+#endif
void spiderbot_rocket_do(entity this);
#endif
+#ifdef SVQC
// 400 (x2) DPS
float autocvar_g_vehicle_spiderbot_minigun_damage = 24;
float autocvar_g_vehicle_spiderbot_minigun_refire = 0.06;
float autocvar_g_vehicle_spiderbot_rocket_noise = 0.2;
float autocvar_g_vehicle_spiderbot_rocket_turnrate = 0.25;
float autocvar_g_vehicle_spiderbot_rocket_lifetime = 20;
+#endif
X(weaponstartoverride, float)
X(weaponstart, float)
X(weaponthrowable, float)
+#ifdef SVQC
X(reload_ammo, float)
.float reloading_ammo = reload_ammo;
X(reload_time, float)
.float reloading_time = reload_time;
+#endif
#undef X
/** for players */
void sys_phys_simulate(entity this, float dt)
{
- const vector g = -this.com_phys_gravity;
- const bool jump = this.com_in_jump;
-
if (!this.com_phys_ground && !this.com_phys_air) {
// noclipping
// flying
UNSET_ONGROUND(this);
if (this.com_phys_friction_air) {
+ const vector g = -this.com_phys_gravity;
this.velocity_z += g.z / 2;
this.velocity = this.velocity * (1 - dt * this.com_phys_friction);
this.velocity_z += g.z / 2;
if (this.com_phys_water) {
// water jump only in certain situations
// this mimics quakeworld code
- if (jump && this.waterlevel == WATERLEVEL_SWIMMING && this.velocity_z >= -180 && !this.viewloc) {
+ if (this.com_in_jump && this.waterlevel == WATERLEVEL_SWIMMING && this.velocity_z >= -180 && !this.viewloc) {
vector yawangles = '0 1 0' * this.v_angle.y;
makevectors(yawangles);
vector forward = v_forward;
}
// holding jump button swims upward slowly
- if (jump && !this.viewloc) {
+ if (this.com_in_jump && !this.viewloc) {
// was:
// lava: 50
// slime: 80
#define SELFWRAP(T, R, oldargs, args, forward) \
.R oldargs T; \
- .R oldargs __##T = T; \
+ noref .R oldargs __##T = T; \
.R args self##T; \
R T##_self oldargs { ENGINE_EVENT(); return this.self##T forward; }
noref bool __spawnfunc_expecting;
noref entity __spawnfunc_expect;
- bool __spawnfunc_unreachable_workaround = true;
+ noref bool __spawnfunc_unreachable_workaround = true;
#define spawnfunc_1(id) spawnfunc_2(id, FIELDS_UNION)
#define spawnfunc_2(id, whitelist) \
}
float tgamma(float e)
{
- vector v;
- v = lgamma(e);
+ vector v = lgamma(e);
return exp(v.x) * v.y;
}