]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cl_physics.qc
Merge remote-tracking branch 'origin/terencehill/menu_focus_bugfix'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cl_physics.qc
index 3dd91dfb4b4e9239942e718213e4b1de4125e9be..a7051ff14c4b18da5e95a228fae1ccd4c64c44ff 100644 (file)
@@ -110,6 +110,9 @@ void PlayerJump (void)
        self.flags &~= FL_JUMPRELEASED;
 
        animdecide_setaction(self, ANIMACTION_JUMP, TRUE);
+       
+       if(autocvar_g_jump_grunt)
+               PlayerSound(playersound_jump, CH_PLAYER, VOICETYPE_PLAYERSOUND);
 
        self.restart_jump = -1; // restart jump anim next time
        // value -1 is used to not use the teleport bit (workaround for tiny hitch when re-jumping)
@@ -849,6 +852,29 @@ void SV_PlayerPhysics()
                self.angles_z = 0;
        }
 
+       if(self.flags & FL_ONGROUND)
+       if(IS_PLAYER(self)) // no fall sounds for observers thank you very much
+       if(self.wasFlying)
+       {
+               self.wasFlying = 0;
+
+               if(self.waterlevel < WATERLEVEL_SWIMMING)
+               if(time >= self.ladder_time)
+               if not(self.hook)
+               {
+                       self.nextstep = time + 0.3 + random() * 0.1;
+                       trace_dphitq3surfaceflags = 0;
+                       tracebox(self.origin, self.mins, self.maxs, self.origin - '0 0 1', MOVE_NOMONSTERS, self);
+                       if not(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOSTEPS)
+                       {
+                               if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_METALSTEPS)
+                                       GlobalSound(globalsound_metalfall, CH_PLAYER, VOICETYPE_PLAYERSOUND);
+                               else
+                                       GlobalSound(globalsound_fall, CH_PLAYER, VOICETYPE_PLAYERSOUND);
+                       }
+               }
+       }
+
        if(IsFlying(self))
                self.wasFlying = 1;