]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/sv_main.qc
some fixes to what can be pushed, teleported, trigger_impulsed
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / sv_main.qc
index 0a2c04f93bb48e0fec3e73ded78970a6e6644eaa..fad33a8a103923d3a0a4dd32c748a498be5855d6 100644 (file)
@@ -84,40 +84,39 @@ void CreatureFrame (void)
                                if (dm > 0)
                                        Damage (self, world, world, dm, DEATH_FALL, self.origin, '0 0 0');
                        }
-               }
 
-               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 (!vehic) // vehicles don't get footsteps
-               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)))
+                       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)
                        {
-                               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((time > self.nextstep) || (time < (self.nextstep - 10.0)))
                                {
-                                       if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_METALSTEPS)
-                                               GlobalSound(globalsound_metalstep, CHAN_PLAYER, VOICETYPE_PLAYERSOUND);
+                                       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
-                                               GlobalSound(globalsound_step, CHAN_PLAYER, VOICETYPE_PLAYERSOUND);
+                                               dprint(ftos(trace_dphitq3surfaceflags), "\n");
+                                       */
+                                       if not(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOSTEPS)
+                                       {
+                                               if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_METALSTEPS)
+                                                       GlobalSound(globalsound_metalstep, CHAN_PLAYER, VOICETYPE_PLAYERSOUND);
+                                               else
+                                                       GlobalSound(globalsound_step, CHAN_PLAYER, VOICETYPE_PLAYERSOUND);
+                                       }
                                }
                        }
                }
+
                self.oldvelocity = self.velocity;
        }
        self = oldself;