X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fcl_physics.qc;h=b65e62a85ca7915bd52e2e70625d2673e7c8df25;hb=8c8a22011714768f8c5b3ac887d0fd099fc08d8b;hp=6ddf7b69ed806e75bf81c1cea5de0307176a03b6;hpb=cb6fe34871089613c9f47e173b38fc679cd8e45b;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/cl_physics.qc b/qcsrc/server/cl_physics.qc index 6ddf7b69e..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; @@ -704,8 +698,6 @@ void SV_PlayerPhysics() WarpZone_PlayerPhysics_FixVAngle(); maxspd_mod = 1; - if(g_minstagib && (self.items & IT_INVINCIBLE)) - maxspd_mod *= autocvar_g_minstagib_speed_highspeed; if(self.ballcarried) if(g_nexball) maxspd_mod *= autocvar_g_nexball_basketball_carrier_highspeed; @@ -812,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; @@ -821,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) @@ -875,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) @@ -924,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; @@ -949,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 ) @@ -962,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(); } @@ -1314,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;