X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fcl_physics.qc;h=b65e62a85ca7915bd52e2e70625d2673e7c8df25;hb=8c8a22011714768f8c5b3ac887d0fd099fc08d8b;hp=f8012814b25f78644fa29150b2bc4985815c0917;hpb=97b8edd1e04d23094bc3735865d6caeae2d56738;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/cl_physics.qc b/qcsrc/server/cl_physics.qc index f8012814b..b65e62a85 100644 --- a/qcsrc/server/cl_physics.qc +++ b/qcsrc/server/cl_physics.qc @@ -48,13 +48,7 @@ void PlayerJump (void) mjumpheight = autocvar_sv_jumpvelocity; if (self.waterlevel >= WATERLEVEL_SWIMMING) { - if (self.watertype == CONTENT_WATER) - self.velocity_z = 200; - else if (self.watertype == CONTENT_SLIME) - self.velocity_z = 80; - else - self.velocity_z = 50; - + self.velocity_z = self.stat_sv_maxspeed * 0.7; return; } @@ -358,7 +352,7 @@ void RaceCarPhysics() rigvel_z -= frametime * autocvar_sv_gravity; // 4x gravity plays better rigvel_xy = vec2(rigvel); - if(g_bugrigs_planar_movement_car_jumping && !g_touchexplode) // touchexplode is a better way to handle collisions + if(g_bugrigs_planar_movement_car_jumping) mt = MOVE_NORMAL; else mt = MOVE_NOMONSTERS; @@ -810,7 +804,7 @@ void SV_PlayerPhysics() self.punchvector = '0 0 0'; } - if (clienttype(self) == CLIENTTYPE_BOT) + if (IS_BOT_CLIENT(self)) { if(playerdemo_read()) return; @@ -819,7 +813,7 @@ void SV_PlayerPhysics() self.items &~= IT_USING_JETPACK; - if(self.classname == "player") + if(IS_PLAYER(self)) { if(self.race_penalty) if(time > self.race_penalty) @@ -873,7 +867,7 @@ void SV_PlayerPhysics() if(self.conveyor.state) self.velocity -= self.conveyor.movedir; - if(self.classname != "player") + if not(IS_PLAYER(self)) { maxspd_mod = autocvar_sv_spectator_speed_multiplier; if(!self.spectatorspeed) @@ -922,7 +916,7 @@ void SV_PlayerPhysics() } if(self.flags & FL_ONGROUND) - if(self.classname == "player") // no fall sounds for observers thank you very much + if(IS_PLAYER(self)) // no fall sounds for observers thank you very much if(self.wasFlying) { self.wasFlying = 0; @@ -947,7 +941,7 @@ void SV_PlayerPhysics() if(IsFlying(self)) self.wasFlying = 1; - if(self.classname == "player") + if(IS_PLAYER(self)) CheckPlayerJump(); if (self.flags & FL_WATERJUMP ) @@ -960,7 +954,7 @@ void SV_PlayerPhysics() self.teleport_time = 0; } } - else if (g_bugrigs && self.classname == "player") + else if (g_bugrigs && IS_PLAYER(self)) { RaceCarPhysics(); } @@ -1312,7 +1306,7 @@ void SV_PlayerPhysics() } } - if((g_cts || g_race) && self.classname != "observer") { + if((g_cts || g_race) && !IS_OBSERVER(self)) { if(vlen(self.velocity - self.velocity_z * '0 0 1') > speedaward_speed) { speedaward_speed = vlen(self.velocity - self.velocity_z * '0 0 1'); speedaward_holder = self.netname;