X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=data%2Fqcsrc%2Fserver%2Fcl_physics.qc;h=e595c69abec6f924c39d6dedb37d66256c342f0a;hb=49197f85393c0060e68dbffaedce9e8036990ff0;hp=9c2a82d6e3414b5cb89604368dd08c38c3655a86;hpb=19b2166e669ed5315d9ff526c091c552bb741a37;p=voretournament%2Fvoretournament.git diff --git a/data/qcsrc/server/cl_physics.qc b/data/qcsrc/server/cl_physics.qc index 9c2a82d6..e595c69a 100644 --- a/data/qcsrc/server/cl_physics.qc +++ b/data/qcsrc/server/cl_physics.qc @@ -55,8 +55,13 @@ void PlayerJump (void) } mjumpheight = cvar("sv_jumpvelocity"); - if(self.scale) // we are smaller or larger, so we jump lower or higher - mjumpheight *= (1 - cvar("g_healthsize_movementfactor")) + cvar("g_healthsize_movementfactor") * self.scale; + if(cvar("g_healthsize")) // if we are smaller or larger, we jump lower or higher + mjumpheight *= (1 - cvar("g_healthsize_movementfactor")) + cvar("g_healthsize_movementfactor") * self.scale; + if(self.swallow_progress_prey) // cut jumping based on swallow progress for prey + mjumpheight *= 1 - (self.swallow_progress_prey * cvar("g_balance_vore_swallow_speed_cutspd_prey")); + if(self.swallow_progress_pred) // cut jumping based on swallow progress for preds + mjumpheight *= 1 - (self.swallow_progress_pred * cvar("g_balance_vore_swallow_speed_cutspd_pred")); + if (self.waterlevel >= WATERLEVEL_SWIMMING) { if (self.watertype == CONTENT_WATER) @@ -502,8 +507,19 @@ void PM_Accelerate(vector wishdir, float wishspeed, float wishspeed0, float acce if(speedclamp) accelqw = -accelqw; - if(self.scale) // we are smaller or larger, so we run slower or faster - wishspeed *= (1 - cvar("g_healthsize_movementfactor")) + cvar("g_healthsize_movementfactor") * self.scale; + if(self.classname == "player") + { + if(cvar("g_balance_vore_load_pred_weight") > 0) // apply stomach weight + wishspeed /= 1 + (self.stomach_load / self.stomach_maxload) * cvar("g_balance_vore_load_pred_speed"); + if(cvar("g_healthsize")) // if we are smaller or larger, we run slower or faster + wishspeed *= (1 - cvar("g_healthsize_movementfactor")) + cvar("g_healthsize_movementfactor") * self.scale; + if(self.swallow_progress_prey) // cut speed based on swallow progress for prey + wishspeed *= 1 - (self.swallow_progress_prey * cvar("g_balance_vore_swallow_speed_cutspd_prey")); + if(self.swallow_progress_pred) // cut speed based on swallow progress for preds + wishspeed *= 1 - (self.swallow_progress_pred * cvar("g_balance_vore_swallow_speed_cutspd_pred")); + if(self.grabber_stunned > time && random() <= cvar("g_balance_grabber_secondary_stun_rate")) // randomly cut speed while the player is stunned + return; + } if(cvar("sv_gameplayfix_q2airaccelerate")) wishspeed0 = wishspeed; @@ -774,7 +790,7 @@ void SV_PlayerPhysics() } } - if(self.predator.classname == "player" || self.fakepredator.classname == "player") + if(self.stat_eaten) return; if (self.movetype == MOVETYPE_NONE) @@ -822,8 +838,6 @@ void SV_PlayerPhysics() } maxspd_mod *= swampspd_mod; // only one common speed modder please! - if(cvar("g_balance_vore_weight_gravity") > 0) - maxspd_mod *= 1 - bound(0, self.stomach_load * cvar("g_balance_vore_weight_speed"), 1); // apply stomach weight swampspd_mod = 1; // if dead, behave differently @@ -842,6 +856,7 @@ void SV_PlayerPhysics() { self.wasFlying = 0; + if(self.classname == "player") if(self.waterlevel < WATERLEVEL_SWIMMING) if(time >= self.ladder_time) if not(self.grabber) @@ -852,9 +867,15 @@ void SV_PlayerPhysics() if not(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOSTEPS) { if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_METALSTEPS) + { GlobalSound(globalsound_metalfall, CHAN_PLAYER, VOICETYPE_PLAYERSOUND); + pointparticles(particleeffectnum("ground_metal"), self.origin, '0 0 0', 1); + } else + { GlobalSound(globalsound_fall, CHAN_PLAYER, VOICETYPE_PLAYERSOUND); + pointparticles(particleeffectnum("ground_dirt"), self.origin, '0 0 0', 1); + } } } } @@ -896,7 +917,7 @@ void SV_PlayerPhysics() { RaceCarPhysics(); } - else if (self.movetype == MOVETYPE_NOCLIP || self.movetype == MOVETYPE_FLY) + else if (self.movetype == MOVETYPE_NOCLIP || self.movetype == MOVETYPE_FLY || self.movetype == MOVETYPE_FLY_WORLDONLY) { // noclipping or flying self.flags &~= FL_ONGROUND; @@ -980,7 +1001,7 @@ void SV_PlayerPhysics() PM_Accelerate(wishdir, wishspeed, wishspeed, sv_accelerate*maxspd_mod, 1, 0); } } - else if ((self.items & IT_JETPACK) && self.BUTTON_JETPACK && (!cvar("g_jetpack_fuel") || self.ammo_fuel >= 0.01 || self.items & IT_UNLIMITED_WEAPON_AMMO) && self.predator.classname != "player") + else if ((self.items & IT_JETPACK) && self.BUTTON_JETPACK && (!cvar("g_jetpack_fuel") || self.ammo_fuel >= 0.01 || self.items & IT_UNLIMITED_WEAPON_AMMO) && !self.stat_eaten) { //makevectors(self.v_angle_y * '0 1 0'); makevectors(self.v_angle); @@ -1082,7 +1103,7 @@ void SV_PlayerPhysics() else if (self.flags & FL_ONGROUND) { // we get here if we ran out of ammo - if((self.items & IT_JETPACK) && self.BUTTON_JETPACK && !(buttons_prev & 32) && self.predator.classname != "player") + if((self.items & IT_JETPACK) && self.BUTTON_JETPACK && !(buttons_prev & 32) && !self.stat_eaten) sprint(self, "You don't have any fuel for the ^2Jetpack\n"); // walking @@ -1135,7 +1156,7 @@ void SV_PlayerPhysics() if (wishspeed > sv_maxspeed*maxspd_mod) wishspeed = sv_maxspeed*maxspd_mod; if (self.crouch) - wishspeed = wishspeed * 0.5; + wishspeed = wishspeed * cvar("sv_crouchvelocity"); if (time >= self.teleport_time) PM_Accelerate(wishdir, wishspeed, wishspeed, sv_accelerate*maxspd_mod, 1, 0); } @@ -1143,7 +1164,7 @@ void SV_PlayerPhysics() { float wishspeed0; // we get here if we ran out of ammo - if((self.items & IT_JETPACK) && self.BUTTON_JETPACK && !(buttons_prev & 32) && self.predator.classname != "player") + if((self.items & IT_JETPACK) && self.BUTTON_JETPACK && !(buttons_prev & 32) && !self.stat_eaten) sprint(self, "You don't have any fuel for the ^2Jetpack\n"); if(maxspd_mod < 1) @@ -1167,7 +1188,7 @@ void SV_PlayerPhysics() if (wishspeed > maxairspd) wishspeed = maxairspd; if (self.crouch) - wishspeed = wishspeed * 0.5; + wishspeed = wishspeed * cvar("sv_crouchvelocity"); if (time >= self.teleport_time) { float accelerating;