PMoveCustom_: Check for MOVETYPE_NONE and disable any further interaction.
This commit is contained in:
parent
ad093548b5
commit
460eec7f76
|
@ -564,6 +564,9 @@ PMoveCustom_Move(void)
|
||||||
void
|
void
|
||||||
PMoveCustom_RunPlayerPhysics(entity target)
|
PMoveCustom_RunPlayerPhysics(entity target)
|
||||||
{
|
{
|
||||||
|
if (target.movetype == MOVETYPE_NONE)
|
||||||
|
return;
|
||||||
|
|
||||||
entity oldself = self;
|
entity oldself = self;
|
||||||
self = target;
|
self = target;
|
||||||
|
|
||||||
|
@ -595,10 +598,13 @@ PMoveCustom_RunPlayerPhysics(entity target)
|
||||||
void
|
void
|
||||||
PMoveCustom_RunCrouchPhysics(entity target)
|
PMoveCustom_RunCrouchPhysics(entity target)
|
||||||
{
|
{
|
||||||
|
if (target.movetype == MOVETYPE_NONE)
|
||||||
|
return;
|
||||||
|
|
||||||
int iFixCrouch = FALSE;
|
int iFixCrouch = FALSE;
|
||||||
if (input_buttons & INPUT_BUTTON8) {
|
if (input_buttons & INPUT_BUTTON8) {
|
||||||
target.flags |= FL_CROUCHING;
|
target.flags |= FL_CROUCHING;
|
||||||
} else {
|
} else {
|
||||||
// If we aren't holding down duck anymore and 'attempt' to stand up, prevent it
|
// If we aren't holding down duck anymore and 'attempt' to stand up, prevent it
|
||||||
if (target.flags & FL_CROUCHING) {
|
if (target.flags & FL_CROUCHING) {
|
||||||
if (PMove_IsStuck(target, [0,0,36], PHY_HULL_MIN, PHY_HULL_MAX) == FALSE) {
|
if (PMove_IsStuck(target, [0,0,36], PHY_HULL_MIN, PHY_HULL_MAX) == FALSE) {
|
||||||
|
|
Loading…
Reference in New Issue