]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/sv_main.qc
Switch my physics to be default for testing purposes
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / sv_main.qc
index 424b124f561fd9433b82c66ac9b5ade70696d52d..a9b2443b73f1715fdf1678a7a8b781517a32f624 100644 (file)
@@ -106,6 +106,34 @@ void CreatureFrame (void)
 
                        if(autocvar_g_maxspeed > 0 && velocity_len > autocvar_g_maxspeed)
                                Damage (self, world, world, 100000, DEATH_SHOOTING_STAR, self.origin, '0 0 0');
+                       // play stupid sounds
+                       if (g_footsteps)
+                       if (!gameover)
+                       if (self.flags & FL_ONGROUND)
+                       if (velocity_len > autocvar_sv_maxspeed * 0.6)
+                       if (!self.deadflag)
+                       if (time < self.lastground + 0.2)
+                       {
+                               if((time > self.nextstep) || (time < (self.nextstep - 10.0)))
+                               {
+                                       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(trace_fraction == 1)
+                                               dprint("nohit\n");
+                                       else
+                                               dprint(ftos(trace_dphitq3surfaceflags), "\n");
+                                       */
+                                       if not(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOSTEPS)
+                                       {
+                                               if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_METALSTEPS)
+                                                       GlobalSound(globalsound_metalstep, CH_PLAYER, VOICETYPE_PLAYERSOUND);
+                                               else
+                                                       GlobalSound(globalsound_step, CH_PLAYER, VOICETYPE_PLAYERSOUND);
+                                       }
+                               }
+                       }
                }
                
         self.oldvelocity = self.velocity;