Remove fall-damage when landing in water. Happy surfing!

This commit is contained in:
Marco Cawthorne 2019-03-26 15:54:03 +01:00
parent 17bb60c221
commit 6650945c45
7 changed files with 10 additions and 5 deletions

View file

@ -56,7 +56,7 @@ float env_glow::predraw(void)
R_EndPolygon(); R_EndPolygon();
addentity(this); addentity(this);
} }
return PREDRAW_NEXT; return PREDRAW_NEXT;
} }

View file

@ -91,6 +91,11 @@ void QPhysics_Run ( entity eTarget )
PMove_Run(); PMove_Run();
#ifdef SSQC #ifdef SSQC
if (self.waterlevel != 0) {
flFallVel = 0;
}
if ( ( self.flags & FL_ONGROUND ) && self.movetype == MOVETYPE_WALK && ( flFallVel > 580 )) { if ( ( self.flags & FL_ONGROUND ) && self.movetype == MOVETYPE_WALK && ( flFallVel > 580 )) {
float fFallDamage = ( flFallVel - 580 ) * ( 100 / ( 1024 - 580 ) ); float fFallDamage = ( flFallVel - 580 ) * ( 100 / ( 1024 - 580 ) );
Damage_Apply( self, world, fFallDamage, self.origin, FALSE ); Damage_Apply( self, world, fFallDamage, self.origin, FALSE );

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -4,7 +4,7 @@ r_part part_spark
texture ball texture ball
tcoords 1 65 31 95 256 8 32 tcoords 1 65 31 95 256 8 32
scale 1 scale 1
count 4 count 8
scalefactor 1 scalefactor 1
alpha 0.5 alpha 0.5
die 0.8 die 0.8
@ -14,7 +14,7 @@ r_part part_spark
spawnorg 1 spawnorg 1
spawnvel 100 spawnvel 100
veladd 100 veladd 100
friction 0.3 friction 0.5
gravity 800 gravity 800
} }
@ -23,7 +23,7 @@ r_part part_pieces_black
type ball type ball
texture ball texture ball
tcoords 1 65 31 95 256 8 32 tcoords 1 65 31 95 256 8 32
scale 2 scale 4
count 18 count 18
scalefactor 1 scalefactor 1
alpha 1 alpha 1
@ -198,4 +198,4 @@ r_part smokegren
gravity -25 gravity -25
veladd -20 veladd -20
randomvel 64 -64 randomvel 64 -64
} }

Binary file not shown.