PMove: crouching will no longer affect your movement underwater. noclip and crouching will no longer adjust the camera view and player bbox.
This commit is contained in:
parent
2f8b36c499
commit
b06544aacc
2 changed files with 15 additions and 8 deletions
|
@ -101,8 +101,8 @@ NSClientPlayer:NSClientSpectator
|
|||
int step;
|
||||
float step_time;
|
||||
|
||||
int m_iUnderwaterDamage;
|
||||
float m_flUnderwaterTime;
|
||||
//float underwater_dmg;
|
||||
float m_flPainTime;
|
||||
|
||||
entity last_used;
|
||||
|
|
|
@ -93,6 +93,9 @@ NSClientPlayer::Physics_Crouch(void)
|
|||
{
|
||||
bool crouchfix = false;
|
||||
|
||||
if (GetMovetype() != MOVETYPE_WALK)
|
||||
return;
|
||||
|
||||
if (input_buttons & INPUT_BUTTON8) {
|
||||
AddFlags(FL_CROUCHING);
|
||||
} else {
|
||||
|
@ -309,13 +312,17 @@ NSClientPlayer::Physics_InputPreMove(void)
|
|||
input_movevalues *= 0.25;
|
||||
}
|
||||
|
||||
/* move camera up (noclip, fly) when holding jump */
|
||||
if (input_buttons & INPUT_BUTTON2) {
|
||||
input_movevalues[2] = 240;
|
||||
}
|
||||
/* move camera down (noclip, fly) when holding crouching */
|
||||
if (input_buttons & INPUT_BUTTON8) {
|
||||
input_movevalues[2] = -240;
|
||||
bool flying = ((GetMovetype() == MOVETYPE_NOCLIP) || (GetMovetype() == MOVETYPE_FLY));
|
||||
|
||||
if (flying == true) {
|
||||
/* move camera up (noclip, fly) when holding jump */
|
||||
if (input_buttons & INPUT_BUTTON2) {
|
||||
input_movevalues[2] = 240;
|
||||
}
|
||||
/* move camera down (noclip, fly) when holding crouching */
|
||||
if (input_buttons & INPUT_BUTTON8) {
|
||||
input_movevalues[2] = -240;
|
||||
}
|
||||
}
|
||||
|
||||
if (flags & FL_FROZEN || movetype == MOVETYPE_NONE) {
|
||||
|
|
Loading…
Reference in a new issue