X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fcl_physics.qc;h=5ce7b7d475f4d6848442b8fa9761106e5927ed2c;hb=55c5e5f476604b1e99df20f8974d561f99d0f405;hp=6ddf7b69ed806e75bf81c1cea5de0307176a03b6;hpb=ad444437c8652444006ef4e5261c26984050dbc3;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/cl_physics.qc b/qcsrc/server/cl_physics.qc index 6ddf7b69e..5ce7b7d47 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; @@ -768,7 +760,7 @@ void SV_PlayerPhysics() else if(self.specialcommand_pos && (c != substring(specialcommand, self.specialcommand_pos - 1, 1))) self.specialcommand_pos = 0; - if(!sv_maxidle_spectatorsareidle || self.movetype == MOVETYPE_WALK) + if(sv_maxidle > 0) { if(buttons != self.buttons_old || self.movement != self.movement_old || self.v_angle != self.v_angle_old) self.parm_idlesince = time; @@ -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;