]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
if .gravity field is zero, it means the same as one (see also: SV_AddGravity)
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 11 May 2007 08:20:56 +0000 (08:20 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 11 May 2007 08:20:56 +0000 (08:20 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7266 d7cf8633-e32d-0410-b094-e92efae38249

sv_main.c

index 4c46abae2fd3151343c110d0892c28523e7728d0..20ad4bda71c65b917029e63ab956093afe85bdbd 100644 (file)
--- a/sv_main.c
+++ b/sv_main.c
@@ -1374,7 +1374,7 @@ void SV_WriteClientdataToMessage (client_t *client, prvm_edict_t *ent, sizebuf_t
        statsf[STAT_MOVEVARS_AIRACCELERATE] = sv_airaccelerate.value >= 0 ? sv_airaccelerate.value : sv_accelerate.value;
        statsf[STAT_MOVEVARS_WATERACCELERATE] = sv_wateraccelerate.value >= 0 ? sv_wateraccelerate.value : sv_accelerate.value;
        val = PRVM_EDICTFIELDVALUE(ent, prog->fieldoffsets.gravity);
-       statsf[STAT_MOVEVARS_ENTGRAVITY] = val ? val->_float : 1.0f;
+       statsf[STAT_MOVEVARS_ENTGRAVITY] = (val && val->_float != 0) ? val->_float : 1.0f;
        statsf[STAT_MOVEVARS_JUMPVELOCITY] = sv_jumpvelocity.value;
        statsf[STAT_MOVEVARS_EDGEFRICTION] = sv_edgefriction.value;
        statsf[STAT_MOVEVARS_MAXAIRSPEED] = sv_maxairspeed.value;