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"
-set sv_player_jumpanim_minfall 48 "minimum distance player has to have below their feet before the jump animation will be activated (only when falling, +jump will play anim instantly)"
seta sv_precacheplayermodels 1
seta sv_precacheweapons 0
float autocvar_cl_precacheplayermodels;
float autocvar_cl_deathglow;
float autocvar_developer_csqcentities;
-float autocvar_sv_player_jumpanim_minfall;
-float autocvar_cl_csad;
CSQCPlayer_ForceModel_Apply(self.entnum == player_localnum + 1);
CSQCPlayer_GlowMod_Apply();
CSQCPlayer_LOD_Apply();
- if(!isplayer || !autocvar_cl_csad)
+ if(!isplayer)
CSQCPlayer_FallbackFrame_Apply();
else
{
{
if(self.pmove_flags & PMF_ONGROUND)
flg |= FL_ONGROUND;
- // FIXME add proper detection whether csqc prediction did a jump, this one is a hack!
- if(self.pmove_flags & PMF_JUMP_HELD)
- if(!(self.anim_prev_pmove_flags & PMF_JUMP_HELD))
- animdecide_setaction(self, ANIMACTION_JUMP, TRUE);
self.anim_prev_pmove_flags = self.pmove_flags;
if(self.pmove_flags & PMF_DUCKED)
animdecide_setstate(self, self.anim_state | ANIMSTATE_DUCK, FALSE);
CSQCModel_Effects_PreUpdate();
if(self.isplayermodel)
{
- if(!isplayer || !autocvar_cl_csad)
+ if(!isplayer)
CSQCPlayer_FallbackFrame_PreUpdate();
CSQCPlayer_ForceModel_PreUpdate();
}
if(self.isplayermodel)
{
CSQCPlayer_ForceModel_PostUpdate();
- if(!isplayer || !autocvar_cl_csad)
+ if(!isplayer)
CSQCPlayer_FallbackFrame_PostUpdate(isnew);
}
CSQCModel_Effects_PostUpdate();
if(time <= t + outframe_y / outframe_z)
{
// animation is running!
- return vec3(outframe_x, e.anim_lower_time, ANIMPRIO_ACTIVE);
+ return vec3(outframe_x, t, ANIMPRIO_ACTIVE);
}
}
// or, decide the anim by state
if(!(flg & FL_ONGROUND))
s |= ANIMIMPLICITSTATE_INAIR;
- // detect some kinds of otherwise misdetected jumps
+ // detect some kinds of otherwise misdetected jumps (ground to air transition)
+ // NOTE: currently, in CSQC this is the only jump detection, as the explicit jump action is never called!
if(!(e.anim_implicit_state & ANIMIMPLICITSTATE_INAIR) && (s & ANIMIMPLICITSTATE_INAIR))
{
- // ground to air transition - do we want to reset jump anim?
-#if 0
- if(e.anim_lower_action != ANIMACTION_JUMP || time > e.anim_lower_time + 0.2)
- if(e.anim_lower_implicit_action != ANIMACTION_JUMP || time > e.anim_lower_implicit_time + 0.2)
- {
- traceline(e.origin + '0 0 1' * e.maxs_z, e.origin + '0 0 1' * (e.mins_z - autocvar_sv_player_jumpanim_minfall), MOVE_NOMONSTERS, e);
- if(!trace_startsolid && trace_fraction == 1)
- {
-#endif
- e.anim_lower_implicit_action = ANIMACTION_JUMP;
- e.anim_lower_implicit_time = time;
-#if 0
- }
- }
-#endif
+ e.anim_lower_implicit_action = ANIMACTION_JUMP;
+ e.anim_lower_implicit_time = time;
}
if(s != e.anim_implicit_state)
float autocvar_sv_maxairstrafespeed;
float autocvar_sv_maxspeed;
string autocvar_sv_motd;
-float autocvar_sv_player_jumpanim_minfall;
float autocvar_sv_precacheplayermodels;
float autocvar_sv_precacheweapons;
float autocvar_sv_q3acompat_machineshotgunswap;
self.effects = oldself.effects;
self.glowmod = oldself.glowmod;
self.event_damage = oldself.event_damage;
- self.animstate_startframe = oldself.animstate_startframe;
- self.animstate_numframes = oldself.animstate_numframes;
- self.animstate_framerate = oldself.animstate_framerate;
- self.animstate_starttime = oldself.animstate_starttime;
- self.animstate_endtime = oldself.animstate_endtime;
- self.animstate_override = oldself.animstate_override;
- self.animstate_looping = oldself.animstate_looping;
+ self.anim_state = oldself.anim_state;
+ self.anim_time = oldself.anim_time;
+ self.anim_lower_action = oldself.anim_lower_action;
+ self.anim_lower_time = oldself.anim_lower_time;
+ self.anim_upper_action = oldself.anim_upper_action;
+ self.anim_upper_time = oldself.anim_upper_time;
self.dphitcontentsmask = oldself.dphitcontentsmask;
self.death_time = oldself.death_time;
- self.frame = oldself.frame;
self.pain_finished = oldself.pain_finished;
self.health = oldself.health;
self.armorvalue = oldself.armorvalue;
self.CopyBody_think = oldself.think;
self.nextthink = time;
self.think = CopyBody_Think;
+ // "bake" the current animation frame for clones (they don't get clientside animation)
+ animdecide_setframes(self, self.flags, FALSE, frame, frame1time, frame2, frame2time);
self = oldself;
}
animbits |= ANIMSTATE_DUCK;
animdecide_setstate(self, animbits, FALSE);
- animdecide_setframes(self, self.flags, FALSE, frame, frame1time, frame2, frame2time);
-
if (self.weaponentity)
{
updateanim(self.weaponentity);