.float multijump_count;\r
.float multijump_ready;\r
.float prevjumpbutton;\r
+.float prevlastteleporttime;\r
\r
/*\r
=============\r
}\r
\r
mjumpheight = cvar("sv_jumpvelocity");\r
+ if(cvar("g_healthsize")) // if we are smaller or larger, we jump lower or higher\r
+ mjumpheight *= (1 - cvar("g_healthsize_movementfactor")) + cvar("g_healthsize_movementfactor") * self.scale;\r
+ if(self.swallow_progress_prey) // cut jumping based on swallow progress for prey\r
+ mjumpheight *= 1 - (self.swallow_progress_prey * cvar("g_balance_vore_swallow_speed_cutspd_prey"));\r
+ if(self.swallow_progress_pred) // cut jumping based on swallow progress for preds\r
+ mjumpheight *= 1 - (self.swallow_progress_pred * cvar("g_balance_vore_swallow_speed_cutspd_pred"));\r
+\r
if (self.waterlevel >= WATERLEVEL_SWIMMING)\r
{\r
if (self.watertype == CONTENT_WATER)\r
\r
if (cvar("g_multijump"))\r
{\r
- if (self.prevjumpbutton == FALSE && !(self.flags & FL_ONGROUND)) // jump button pressed this frame and we are in midair\r
+ if(self.prevlastteleporttime != self.lastteleporttime)\r
+ {\r
+ // if we teleported above the ground, require touching the ground again to multi-jump\r
+ self.multijump_ready = FALSE;\r
+ if(self.flags & FL_ONGROUND)\r
+ self.prevlastteleporttime = self.lastteleporttime;\r
+ }\r
+ else if (self.prevjumpbutton == FALSE && !(self.flags & FL_ONGROUND)) // jump button pressed this frame and we are in midair\r
self.multijump_ready = TRUE; // this is necessary to check that we released the jump button and pressed it again\r
else\r
self.multijump_ready = FALSE;\r
if(!doublejump && self.multijump_ready && self.multijump_count < cvar("g_multijump") && self.velocity_z > cvar("g_multijump_speed"))\r
{\r
// doublejump = FALSE; // checked above in the if\r
- if (cvar("g_multijump") > 0)\r
+ if (cvar("g_multijump"))\r
{\r
if (cvar("g_multijump_add") == 0) // in this case we make the z velocity == jumpvelocity\r
{\r
self.velocity_y = wishdir_y * curspeed;\r
// keep velocity_z unchanged!\r
}\r
- self.multijump_count += 1;\r
+ if (cvar("g_multijump") > 0)\r
+ self.multijump_count += 1;\r
}\r
}\r
self.multijump_ready = FALSE; // require releasing and pressing the jump button again for the next jump\r
if(speedclamp)\r
accelqw = -accelqw;\r
\r
+ if(self.classname == "player")\r
+ {\r
+ if(cvar("g_balance_vore_load_pred_weight") > 0) // apply stomach weight\r
+ wishspeed /= 1 + (self.stomach_load / self.stomach_maxload) * cvar("g_balance_vore_load_pred_speed");\r
+ if(cvar("g_healthsize")) // if we are smaller or larger, we run slower or faster\r
+ wishspeed *= (1 - cvar("g_healthsize_movementfactor")) + cvar("g_healthsize_movementfactor") * self.scale; \r
+ if(self.swallow_progress_prey) // cut speed based on swallow progress for prey\r
+ wishspeed *= 1 - (self.swallow_progress_prey * cvar("g_balance_vore_swallow_speed_cutspd_prey"));\r
+ if(self.swallow_progress_pred) // cut speed based on swallow progress for preds\r
+ wishspeed *= 1 - (self.swallow_progress_pred * cvar("g_balance_vore_swallow_speed_cutspd_pred"));\r
+ if(self.grabber_stunned > time && random() <= cvar("g_balance_grabber_secondary_stun_rate")) // randomly cut speed while the player is stunned\r
+ return;\r
+ }\r
+\r
if(cvar("sv_gameplayfix_q2airaccelerate"))\r
wishspeed0 = wishspeed;\r
\r
\r
if (self.punchangle != '0 0 0')\r
{\r
- f = vlen(self.punchangle) - 15 * frametime;\r
+ f = vlen(self.punchangle) - cvar("sv_punchangle_speed") * frametime;\r
if (f > 0)\r
self.punchangle = normalize(self.punchangle) * f;\r
else\r
\r
if (self.punchvector != '0 0 0')\r
{\r
- f = vlen(self.punchvector) - 30 * frametime;\r
+ f = vlen(self.punchvector) - cvar("sv_punchvector_speed") * frametime;\r
if (f > 0)\r
self.punchvector = normalize(self.punchvector) * f;\r
else\r
}\r
}\r
\r
- if(self.predator.classname == "player" || self.fakepredator.classname == "player")\r
+ if(self.stat_eaten)\r
return;\r
\r
if (self.movetype == MOVETYPE_NONE)\r
}\r
\r
maxspd_mod *= swampspd_mod; // only one common speed modder please!\r
- if(cvar("g_balance_vore_weight_gravity") > 0)\r
- maxspd_mod *= 1 - bound(0, self.stomach_load * cvar("g_balance_vore_weight_speed"), 1); // apply stomach weight\r
swampspd_mod = 1;\r
\r
// if dead, behave differently\r
{\r
self.wasFlying = 0;\r
\r
+ if(self.classname == "player")\r
if(self.waterlevel < WATERLEVEL_SWIMMING)\r
if(time >= self.ladder_time)\r
if not(self.grabber)\r
tracebox(self.origin, self.mins, self.maxs, self.origin - '0 0 1', MOVE_NOMONSTERS, self);\r
if not(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOSTEPS)\r
{\r
- if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_METALSTEPS)\r
- GlobalSound(globalsound_metalfall, CHAN_PLAYER, VOICETYPE_PLAYERSOUND);\r
+ if(cvar("g_healthsize"))\r
+ {\r
+ if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_METALSTEPS)\r
+ {\r
+ GlobalSound(globalsound_metalfall, CHAN_PLAYER, VOICETYPE_PLAYERSOUND, bound(0, VOL_BASE * (1 - playersize_micro(self)), 1));\r
+ pointparticles(particleeffectnum("ground_metal"), self.origin, '0 0 0', floor(self.scale * PARTICLE_MULTIPLIER));\r
+ }\r
+ else\r
+ {\r
+ GlobalSound(globalsound_fall, CHAN_PLAYER, VOICETYPE_PLAYERSOUND, bound(0, VOL_BASE * (1 - playersize_micro(self)), 1));\r
+ pointparticles(particleeffectnum("ground_dirt"), self.origin, '0 0 0', floor(self.scale * PARTICLE_MULTIPLIER));\r
+ }\r
+ sound(self, CHAN_AUTO, "misc/macro_hitground.wav", bound(0, VOL_BASE * playersize_macro(self), 1), ATTN_NORM);\r
+\r
+ // earthquake effect for nearby players when a macro falls\r
+ if(cvar("g_healthsize_quake_fall"))\r
+ {\r
+ entity head;\r
+ for(head = findradius(self.origin, cvar("g_healthsize_quake_fall_radius")); head; head = head.chain)\r
+ {\r
+ if not(head.classname == "player" || head.classname == "spectator")\r
+ continue;\r
+ if(head == self || head.spectatee_status == num_for_edict(self))\r
+ continue; // not for self\r
+ if not(head.flags & FL_ONGROUND)\r
+ continue; // we only feel the ground shaking if we are sitting on it\r
+ if(head.stat_eaten)\r
+ continue; // not for prey\r
+\r
+ float shake;\r
+ shake = vlen(head.origin - self.origin);\r
+ if(shake)\r
+ shake = 1 - bound(0, shake / cvar("g_healthsize_quake_fall_radius"), 1);\r
+ shake *= playersize_macro(self) * cvar("g_healthsize_quake_fall");\r
+\r
+ head.punchvector_x += crandom() * shake;\r
+ head.punchvector_y += crandom() * shake;\r
+ head.punchvector_z += crandom() * shake;\r
+ }\r
+ }\r
+ }\r
else\r
- GlobalSound(globalsound_fall, CHAN_PLAYER, VOICETYPE_PLAYERSOUND);\r
+ {\r
+ if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_METALSTEPS)\r
+ {\r
+ GlobalSound(globalsound_metalfall, CHAN_PLAYER, VOICETYPE_PLAYERSOUND, VOL_BASE);\r
+ pointparticles(particleeffectnum("ground_metal"), self.origin, '0 0 0', 1);\r
+ }\r
+ else\r
+ {\r
+ GlobalSound(globalsound_fall, CHAN_PLAYER, VOICETYPE_PLAYERSOUND, VOL_BASE);\r
+ pointparticles(particleeffectnum("ground_dirt"), self.origin, '0 0 0', 1);\r
+ }\r
+ }\r
}\r
}\r
}\r
{\r
RaceCarPhysics();\r
}\r
- else if (self.movetype == MOVETYPE_NOCLIP || self.movetype == MOVETYPE_FLY)\r
+ else if (self.movetype == MOVETYPE_NOCLIP || self.movetype == MOVETYPE_FLY || self.movetype == MOVETYPE_FLY_WORLDONLY)\r
{\r
// noclipping or flying\r
self.flags &~= FL_ONGROUND;\r
PM_Accelerate(wishdir, wishspeed, wishspeed, sv_accelerate*maxspd_mod, 1, 0);\r
}\r
}\r
- 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")\r
+ 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)\r
{\r
//makevectors(self.v_angle_y * '0 1 0');\r
makevectors(self.v_angle);\r
else if (self.flags & FL_ONGROUND)\r
{\r
// we get here if we ran out of ammo\r
- if((self.items & IT_JETPACK) && self.BUTTON_JETPACK && !(buttons_prev & 32) && self.predator.classname != "player")\r
+ if((self.items & IT_JETPACK) && self.BUTTON_JETPACK && !(buttons_prev & 32) && !self.stat_eaten)\r
sprint(self, "You don't have any fuel for the ^2Jetpack\n");\r
\r
// walking\r
if (wishspeed > sv_maxspeed*maxspd_mod)\r
wishspeed = sv_maxspeed*maxspd_mod;\r
if (self.crouch)\r
- wishspeed = wishspeed * 0.5;\r
+ wishspeed = wishspeed * cvar("sv_crouchvelocity");\r
if (time >= self.teleport_time)\r
PM_Accelerate(wishdir, wishspeed, wishspeed, sv_accelerate*maxspd_mod, 1, 0);\r
}\r
{\r
float wishspeed0;\r
// we get here if we ran out of ammo\r
- if((self.items & IT_JETPACK) && self.BUTTON_JETPACK && !(buttons_prev & 32) && self.predator.classname != "player")\r
+ if((self.items & IT_JETPACK) && self.BUTTON_JETPACK && !(buttons_prev & 32) && !self.stat_eaten)\r
sprint(self, "You don't have any fuel for the ^2Jetpack\n");\r
\r
if(maxspd_mod < 1)\r
if (wishspeed > maxairspd)\r
wishspeed = maxairspd;\r
if (self.crouch)\r
- wishspeed = wishspeed * 0.5;\r
+ wishspeed = wishspeed * cvar("sv_crouchvelocity");\r
if (time >= self.teleport_time)\r
{\r
float accelerating;\r