X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=sv_phys.c;h=fcb8587ef751c52a85820a4b32e32d179b86e2cc;hb=2c2ad190786472746d7ef3b07fa276e8c732bdc6;hp=7d647953f0f391a36bf90b84014eb680c46270be;hpb=d7035ef4229a2462ad59a67160494593fbd8f2e0;p=xonotic%2Fdarkplaces.git diff --git a/sv_phys.c b/sv_phys.c index 7d647953..fcb8587e 100644 --- a/sv_phys.c +++ b/sv_phys.c @@ -8,7 +8,7 @@ of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. pushmove objects do not obey gravity, and do not interact with each other or trigger fields, but block normal movement and push normal objects when they move. -onground is set for toss objects when they come to a complete rest. it is set for steping or walking objects +onground is set for toss objects when they come to a complete rest. it is set for steping or walking objects doors, plats, etc are SOLID_BSP, and MOVETYPE_PUSH bonus items are SOLID_TRIGGER touch, and MOVETYPE_TOSS @@ -39,11 +39,11 @@ solid_edge items only clip against bsp models. */ -cvar_t sv_friction = {"sv_friction","4",false,true}; -cvar_t sv_stopspeed = {"sv_stopspeed","100"}; -cvar_t sv_gravity = {"sv_gravity","800",false,true}; -cvar_t sv_maxvelocity = {"sv_maxvelocity","2000"}; -cvar_t sv_nostep = {"sv_nostep","0"}; +cvar_t sv_friction = {CVAR_NOTIFY, "sv_friction","4"}; +cvar_t sv_stopspeed = {0, "sv_stopspeed","100"}; +cvar_t sv_gravity = {CVAR_NOTIFY, "sv_gravity","800"}; +cvar_t sv_maxvelocity = {0, "sv_maxvelocity","2000"}; +cvar_t sv_nostep = {0, "sv_nostep","0"}; #define MOVE_EPSILON 0.01 @@ -270,7 +270,7 @@ int SV_FlyMove (edict_t *ent, float time, trace_t *steptrace) for (i=0 ; i<3 ; i++) end[i] = ent->v.origin[i] + time_left * ent->v.velocity[i]; - trace = SV_Move (ent->v.origin, ent->v.mins, ent->v.maxs, end, false, ent); + trace = SV_Move (ent->v.origin, ent->v.mins, ent->v.maxs, end, MOVE_NORMAL, ent); if (trace.allsolid) { // entity is trapped in another solid @@ -948,8 +948,8 @@ int SV_TryUnstick (edict_t *ent, vec3_t oldvel) // retry the original move ent->v.velocity[0] = oldvel[0]; - ent->v. velocity[1] = oldvel[1]; - ent->v. velocity[2] = 0; + ent->v.velocity[1] = oldvel[1]; + ent->v.velocity[2] = 0; clip = SV_FlyMove (ent, 0.1, &steptrace); if ( fabs(oldorg[1] - ent->v.origin[1]) > 4 @@ -1396,7 +1396,6 @@ SV_Physics ================ */ -extern dfunction_t *EndFrameQC; void SV_Physics (void) { int i;