- if (self.movetype != MOVETYPE_FLY)
- {
- // return if gibbed by a trigger
- if (self.movetype != MOVETYPE_WALK)
- return;
-
- // return if attempting to jump while airborn (unless sv_jumpstep)
-// if (!autocvar_sv_jumpstep)
-// if (!oldonground && PRVM_serveredictfloat(self, waterlevel) == 0)
-// return;
- }
-
- // try moving up and forward to go up a step
- // back to start pos
- self.origin = start_origin;
- self.velocity = start_velocity;
-
- // move up
- vector upmove = '0 0 0';
- upmove_z = autocvar_sv_stepheight;
-// if(!SV_PushEntity(&trace, self, upmove, true))
-// {
-// // we got teleported when upstepping... must abort the move
-// return;
-// }
-
- // move forward
- self.velocity_z = 0;
-// clip = SV_FlyMove (self, PHYS_INPUT_TIMELENGTH, applygravity, stepnormal, hitsupercontentsmask, 0);
- self.velocity_z += start_velocity_z;
-// if(clip & 8)
-// {
-// // we got teleported when upstepping... must abort the move
-// // note that z velocity handling may not be what QC expects here, but we cannot help it
-// return;
-// }
-
-// SV_CheckVelocity(self);
-// SV_LinkEdict(self);
-// SV_LinkEdict_TouchAreaGrid(self);
-
- // check for stuckness, possibly due to the limited precision of floats
- // in the clipping hulls
- if (clip
- && fabs(originalmove_origin_y - self.origin_y < 0.03125)
- && fabs(originalmove_origin_x - self.origin_x < 0.03125))
- {
- //Con_Printf("wall\n");
- // stepping up didn't make any progress, revert to original move
- self.origin = originalmove_origin;
- self.velocity = originalmove_velocity;
- self.flags = originalmove_flags;
- self.groundentity = originalmove_groundentity;
- return;
- }
-
- //Con_Printf("step - ");
-
- // extra friction based on view angle
-// if (clip & 2 && sv_wallfriction.integer)
-// SV_WallFriction (self, stepnormal);
- }
- // don't do the down move if stepdown is disabled, moving upward, not in water, or the move started offground or ended onground
-// else if (!autocvar_sv_gameplayfix_stepdown || self.waterlevel >= 3 || start_velocity_z >= (1.0 / 32.0) || !oldonground || (self.flags & FL_ONGROUND))
-// return;
-
- // move down
- vector downmove = '0 0 0';
- downmove_z = -autocvar_sv_stepheight + start_velocity_z*PHYS_INPUT_TIMELENGTH;
-// if(!SV_PushEntity (&downtrace, self, downmove, true))
-// {
-// // we got teleported when downstepping... must abort the move
-// return;
-// }
-
- if (trace_fraction < 1 && trace_plane_normal_z > 0.7)
- {
- // this has been disabled so that you can't jump when you are stepping
- // up while already jumping (also known as the Quake2 double jump bug)
- }
- else
- {
- //Con_Printf("slope\n");
- // if the push down didn't end up on good ground, use the move without
- // the step up. This happens near wall / slope combinations, and can
- // cause the player to hop up higher on a slope too steep to climb
- self.origin = originalmove_origin;
- self.velocity = originalmove_velocity;
- self.flags = originalmove_flags;
- self.groundentity = originalmove_groundentity;
- }
-
-// SV_CheckVelocity(self);
-// SV_LinkEdict(self);
-// SV_LinkEdict_TouchAreaGrid(self);
-}
-#endif