cl_bob 0.01 // how much view moves up/down when moving (does not move if cl_bobcycle is 0, but still enables cl_bobmodel), default is 0.02
cl_bobmodel 1 // whether to have gun model move around on screen when moving (only works if cl_bob is not 0), default is 1
cl_leanmodel 1 // enables weapon leaning effect when looking around
+cl_leanmodel_side_speed 0.7 "gun leaning sideways speed"
+cl_leanmodel_side_limit 35 "gun leaning sideways limit"
+cl_leanmodel_side_highpass1 30 "gun leaning sideways pre-highpass in 1/s"
+cl_leanmodel_side_highpass 3 "gun leaning sideways highpass in 1/s"
+cl_leanmodel_side_lowpass 20 "gun leaning sideways lowpass in 1/s"
+cl_leanmodel_up_speed 0.65 "gun leaning upward speed"
+cl_leanmodel_up_limit 50 "gun leaning upward limit"
+cl_leanmodel_up_highpass1 5 "gun leaning upward pre-highpass in 1/s"
+cl_leanmodel_up_highpass 15 "gun leaning upward highpass in 1/s"
+cl_leanmodel_up_lowpass 20 "gun leaning upward lowpass in 1/s"
cl_followmodel 1 // enables weapon pushing / pulling effect when walking
+cl_followmodel_side_speed 0.25 "gun following sideways speed"
+cl_followmodel_side_limit 6 "gun following sideways limit"
+cl_followmodel_side_highpass1 30 "gun following sideways pre-highpass in 1/s"
+cl_followmodel_side_highpass 5 "gun following sideways highpass in 1/s"
+cl_followmodel_side_lowpass 10 "gun following sideways lowpass in 1/s"
+cl_followmodel_up_speed 0.5 "gun following upward speed"
+cl_followmodel_up_limit 5 "gun following upward limit"
+cl_followmodel_up_highpass1 60 "gun following upward pre-highpass in 1/s"
+cl_followmodel_up_highpass 2 "gun following upward highpass in 1/s"
+cl_followmodel_up_lowpass 10 "gun following upward lowpass in 1/s"
+
cl_rollangle 0 // amount of view tilt when strafing, default is 2.0
v_kicktime 0 // how long damage kicks of the view last, default is 0 seconds
gl_polyblend 0.5 // whether to use screen tints, default is 1
set sv_pogostick 1 "don't require releasing the space bar for jumping again"
set sv_doublejump 0 "allow Quake 2-style double jumps"
-set sv_jumpspeedcap_min "" "wont perform a doublejump if z-axis speed is higher than sv_jumpvelocity * this"
-set sv_jumpspeedcap_max "" "wont perform a doublejump if z-axis speed is higher than sv_jumpvelocity * this"
-set sv_jumpspeedcap_max_disable_on_ramps 0 "disable max jumpspeedcap on ramps to preserve the old rampjump style"
+set sv_jumpspeedcap_min "" "lower bound on the baseline velocity of a jump; final velocity will be >= (jumpheight * min + jumpheight)"
+set sv_jumpspeedcap_max "" "upper bound on the baseline velocity of a jump; final velocity will be <= (jumpheight * max + jumpheight)"
+set sv_jumpspeedcap_max_disable_on_ramps 0 "disable upper baseline velocity bound on ramps to preserve the old rampjump style"
seta sv_precacheplayermodels 1
seta sv_precacheweapons 0
--- /dev/null
+0 36 15.000000 0 // dieone
+36 20 15.000000 0 // dietwo
+56 15 15.000000 1 // draw
+71 20 15.000000 1 // duck
+91 21 30.000000 1 // duckwalk
+112 16 15.000000 0 // duckjump
+128 15 5.000000 1 // duckidle
+143 41 5.000000 1 // idle
+184 21 25.000000 0 // jump
+205 15 15.000000 0 // painone
+220 17 15.000000 0 // paintwo
+237 3 15.000000 1 // shoot
+240 21 15.000000 1 // taunt
+261 21 35.000000 1 // run
+282 21 35.000000 1 // runbackwards
+303 21 35.000000 1 // strafeleft
+324 21 35.000000 1 // straferight
+345 2 15.000000 0 // deadone
+347 2 15.000000 0 // deadtwo
+349 21 35.000000 1 // forwardright
+370 21 35.000000 1 // forwardleft
+391 21 35.000000 1 // backright
+412 21 30.000000 1 // backleft
--- /dev/null
+name Gak
+species alien
+sex Male
+weight 85
+age 16
+
+Lightweight Xonotic Solider
--- /dev/null
+0 36 15.000000 0 // dieone
+36 20 15.000000 0 // dietwo
+56 15 15.000000 1 // draw
+71 20 15.000000 1 // duck
+91 21 30.000000 1 // duckwalk
+112 16 15.000000 0 // duckjump
+128 15 5.000000 1 // duckidle
+143 41 5.000000 1 // idle
+184 21 25.000000 0 // jump
+205 15 15.000000 0 // painone
+220 17 15.000000 0 // paintwo
+237 3 15.000000 1 // shoot
+240 21 15.000000 1 // taunt
+261 21 35.000000 1 // run
+282 21 35.000000 1 // runbackwards
+303 21 35.000000 1 // strafeleft
+324 21 35.000000 1 // straferight
+345 2 15.000000 0 // deadone
+347 2 15.000000 0 // deadtwo
+349 21 35.000000 1 // forwardright
+370 21 35.000000 1 // forwardleft
+391 21 35.000000 1 // backright
+412 21 30.000000 1 // backleft
--- /dev/null
+name Gak Armored
+species alien
+sex Male
+weight 90
+age 20
+
+Heavyweight Xonotic Solider
--- /dev/null
+0 36 15.000000 0 // dieone
+36 20 15.000000 0 // dietwo
+56 15 15.000000 1 // draw
+71 20 15.000000 1 // duck
+91 21 30.000000 1 // duckwalk
+112 16 15.000000 0 // duckjump
+128 15 5.000000 1 // duckidle
+143 41 5.000000 1 // idle
+184 21 25.000000 0 // jump
+205 15 15.000000 0 // painone
+220 17 15.000000 0 // paintwo
+237 3 15.000000 1 // shoot
+240 21 15.000000 1 // taunt
+261 21 35.000000 1 // run
+282 21 35.000000 1 // runbackwards
+303 21 35.000000 1 // strafeleft
+324 21 35.000000 1 // straferight
+345 2 15.000000 0 // deadone
+347 2 15.000000 0 // deadtwo
+349 21 35.000000 1 // forwardright
+370 21 35.000000 1 // forwardleft
+391 21 35.000000 1 // backright
+412 21 30.000000 1 // backleft
--- /dev/null
+name Gak Masked
+species alien
+sex Male
+weight 87
+age 18
+
+Mediumweight Xonotic Solider
sv_airaccel_sideways_friction -0.2
sv_airaccel_qw -0.9475
sv_airstopaccelerate 2.5
-sv_airstrafeaccelerate 21
-sv_maxairstrafespeed 200
-sv_airstrafeaccel_qw -0.99
+sv_airstrafeaccelerate 24
+sv_maxairstrafespeed 100
+sv_airstrafeaccel_qw -0.9825
sv_aircontrol 125
sv_aircontrol_power 2.5
sv_warsowbunny_turnaccel 0
void PlayerJump (void)
{
float mjumpheight;
+ float doublejump;
+
+ doublejump = FALSE;
+ if (sv_doublejump)
+ {
+ tracebox(self.origin + '0 0 0.01', self.mins, self.maxs, self.origin - '0 0 0.01', MOVE_NORMAL, self);
+ if (trace_fraction < 1 && trace_plane_normal_z > 0.7)
+ doublejump = TRUE;
+ }
mjumpheight = cvar("sv_jumpvelocity");
if (self.waterlevel >= WATERLEVEL_SWIMMING)
return;
}
+ if (!doublejump)
if (!(self.flags & FL_ONGROUND))
return;
mjumpheight = mjumpheight * cvar("g_minstagib_speed_jumpheight");
}
+ // sv_jumpspeedcap_min/sv_jumpspeedcap_max act as baseline
+ // velocity bounds. Final velocity is bound between (jumpheight *
+ // min + jumpheight) and (jumpheight * max + jumpheight);
+
if(cvar_string("sv_jumpspeedcap_min") != "")
- self.velocity_z = max(cvar("sv_jumpvelocity") * cvar("sv_jumpspeedcap_min"), self.velocity_z);
- if(cvar_string("sv_jumpspeedcap_max") != "") {
- if(trace_fraction < 1 && trace_plane_normal_z < 0.98 && cvar("sv_jumpspeedcap_max_disable_on_ramps")) {
- // don't do jump speedcaps on ramps to preserve old xonotic ramjump style
- //print("Trace plane normal z: ", ftos(trace_plane_normal_z), ", disabling speed cap!\n");
+ {
+ float minjumpspeed;
+
+ minjumpspeed = mjumpheight * cvar("sv_jumpspeedcap_min");
+
+ if (self.velocity_z < minjumpspeed)
+ mjumpheight += minjumpspeed - self.velocity_z;
+ }
+
+ if(cvar_string("sv_jumpspeedcap_max") != "")
+ {
+ // don't do jump speedcaps on ramps to preserve old xonotic ramjump style
+ tracebox(self.origin + '0 0 0.01', self.mins, self.maxs, self.origin - '0 0 0.01', MOVE_NORMAL, self);
+
+ if(!(trace_fraction < 1 && trace_plane_normal_z < 0.98 && cvar("sv_jumpspeedcap_max_disable_on_ramps")))
+ {
+ float maxjumpspeed;
+
+ maxjumpspeed = mjumpheight * cvar("sv_jumpspeedcap_max");
+
+ if (self.velocity_z > maxjumpspeed)
+ mjumpheight -= self.velocity_z - maxjumpspeed;
}
- else
- self.velocity_z = min(cvar("sv_jumpvelocity") * cvar("sv_jumpspeedcap_max"), self.velocity_z) + trace_ent.velocity_z;
}
if(!(self.lastflags & FL_ONGROUND))
string GetMapname(void);
float speedaward_lastupdate;
float speedaward_lastsent;
-.float jumppadusetime;
var float autocvar_g_movement_highspeed = 1;
void SV_PlayerPhysics()
{
if(self.classname == "player")
{
- if(sv_doublejump && time - self.jumppadusetime > 2 * sys_frametime)
- {
- tracebox(self.origin + '0 0 0.01', self.mins, self.maxs, self.origin - '0 0 0.01', MOVE_NORMAL, self);
- self.flags &~= FL_ONGROUND;
- if(trace_fraction < 1 && trace_plane_normal_z > 0.7)
- self.flags |= FL_ONGROUND;
- }
-
if (self.BUTTON_JUMP)
PlayerJump ();
else
if(argv(1) == "w")
setmodel(e, (nextent(world)).weaponentity.model);
else
+ {
+ precache_model(argv(1));
setmodel(e, argv(1));
+ }
e.frame = stof(argv(2));
if(substring(argv(3), 0, 1) == "#")
i = stof(substring(argv(3), 1, -1));
sv_maxidle = cvar("sv_maxidle");
sv_maxidle_spectatorsareidle = cvar("sv_maxidle_spectatorsareidle");
sv_pogostick = cvar("sv_pogostick");
- sv_doublejump = cvar("sv_doublejump");
g_ctf_reverse = cvar("g_ctf_reverse");
sv_autotaunt = cvar("sv_autotaunt");
sv_taunt = cvar("sv_taunt");
activator = a;
}
+void adaptor_think2use_hittype_splash() // for timed projectile detonation
+{
+ if not(self.flags & FL_ONGROUND) // if onground, we ARE touching something, but HITTYPE_SPLASH is to be networked if the damage causing projectile is not touching ANYTHING
+ self.projectiledeathtype |= HITTYPE_SPLASH;
+ adaptor_think2use();
+}
+
// deferred dropping
void DropToFloor_Handler()
{
sv_speedlimit = cvar("sv_speedlimit");
teamplay = cvar ("teamplay");
sys_frametime = cvar("sys_ticrate") * cvar("slowmo");
+ sv_doublejump = cvar("sv_doublejump");
if (timeoutStatus == 1) // just before the timeout (when timeoutStatus will be 2)
orig_slowmo = cvar("slowmo"); // slowmo will be restored after the timeout
other.flags &~= FL_ONGROUND;
other.velocity = self.movedir;
- other.jumppadusetime = time;
if (other.classname == "player")
{
+
void W_GiveWeapon (entity e, float wep, string name)
{
entity oldself;
void W_Plasma_Explode_Combo (void)
{
-
W_Plasma_TriggerCombo(self.origin, cvar("g_balance_electro_combo_comboradius"), self.owner);
self.event_damage = SUB_Null;
else
{
self.use = W_Plasma_Explode;
- self.think = adaptor_think2use;
+ self.think = adaptor_think2use; // not _hittype_splash, as this runs "immediately"
}
}
}
proj.bot_dodge = TRUE;
proj.bot_dodgerating = cvar("g_balance_electro_primary_damage");
proj.use = W_Plasma_Explode;
- proj.think = adaptor_think2use;
+ proj.think = adaptor_think2use_hittype_splash;
proj.nextthink = time + cvar("g_balance_electro_primary_lifetime");
PROJECTILE_MAKETRIGGER(proj);
proj.projectiledeathtype = WEP_ELECTRO;
proj.classname = "plasma";
proj.owner = self;
proj.use = W_Plasma_Explode;
- proj.think = adaptor_think2use;
+ proj.think = adaptor_think2use_hittype_splash;
proj.bot_dodge = TRUE;
proj.bot_dodgerating = cvar("g_balance_electro_secondary_damage");
proj.nextthink = time + cvar("g_balance_electro_secondary_lifetime");
if(time > self.pushltime)
{
self.cnt = 1;
+ self.projectiledeathtype |= HITTYPE_SPLASH;
W_Fireball_Explode();
return;
}
setsize(gren, '0 0 -3', '0 0 -3');
gren.nextthink = time + cvar("g_balance_grenadelauncher_primary_lifetime");
- gren.think = adaptor_think2use;
+ gren.think = adaptor_think2use_hittype_splash;
gren.use = W_Grenade_Explode;
gren.touch = W_Grenade_Touch1;
W_SETUPPROJECTILEVELOCITY_UP(gren, g_balance_grenadelauncher_primary);
setorigin(gren, w_shotorg);
gren.nextthink = time + cvar("g_balance_grenadelauncher_secondary_lifetime");
- gren.think = adaptor_think2use;
+ gren.think = adaptor_think2use_hittype_splash;
gren.use = W_Grenade_Explode2;
gren.touch = W_Grenade_Touch2;
gren.takedamage = DAMAGE_YES;
missile.bot_dodgerating = cvar("g_balance_hagar_primary_damage");
missile.touch = W_Hagar_Touch;
missile.use = W_Hagar_Explode;
- missile.think = adaptor_think2use;
+ missile.think = adaptor_think2use_hittype_splash;
missile.nextthink = time + cvar("g_balance_hagar_primary_lifetime");
PROJECTILE_MAKETRIGGER(missile);
missile.projectiledeathtype = WEP_HAGAR;
missile.touch = W_Hagar_Touch2;
missile.cnt = 0;
missile.use = W_Hagar_Explode2;
- missile.think = adaptor_think2use;
+ missile.think = adaptor_think2use_hittype_splash;
missile.nextthink = time + cvar("g_balance_hagar_secondary_lifetime_min") + random() * cvar("g_balance_hagar_secondary_lifetime_rand");
PROJECTILE_MAKETRIGGER(missile);
missile.projectiledeathtype = WEP_HAGAR | HITTYPE_SECONDARY;
setsize(gren, '0 0 0', '0 0 0');
gren.nextthink = time + cvar("g_balance_hook_secondary_lifetime");
- gren.think = adaptor_think2use;
+ gren.think = adaptor_think2use_hittype_splash;
gren.use = W_Hook_Explode2;
gren.touch = W_Hook_Touch2;
float dist;
if (time > self.cnt)
+ {
+ self.projectiledeathtype |= HITTYPE_SPLASH;
Seeker_Missile_Explode();
+ }
if (!self.switchweapon)
self.switchweapon = cvar("g_balance_seeker_missile_speed");
missile.bot_dodgerating = cvar("g_balance_seeker_flac_damage");
missile.touch = Seeker_Flac_Explode;
missile.use = Seeker_Flac_Explode;
- missile.think = Seeker_Flac_Explode;
+ missile.think = adaptor_think2use_hittype_splash;
missile.nextthink = time + cvar("g_balance_seeker_flac_lifetime") + cvar("g_balance_seeker_flac_lifetime_rand");
missile.solid = SOLID_BBOX;
missile.scale = 0.4; // BUG: the model is too big