mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-01-27 22:27:57 +03:00
Fixed trigger_fall not doing anything when landing in water
This commit is contained in:
parent
7702ce96d4
commit
495d534307
@ -281,6 +281,7 @@ END_RECV_TABLE()
|
|||||||
RecvPropInt ( RECVINFO( m_spawnflags ), 0, RecvProxy_ShiftPlayerSpawnflags ),
|
RecvPropInt ( RECVINFO( m_spawnflags ), 0, RecvProxy_ShiftPlayerSpawnflags ),
|
||||||
|
|
||||||
RecvPropBool ( RECVINFO( m_bDrawPlayerModelExternally ) ),
|
RecvPropBool ( RECVINFO( m_bDrawPlayerModelExternally ) ),
|
||||||
|
RecvPropBool ( RECVINFO( m_bInTriggerFall ) ),
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
END_RECV_TABLE()
|
END_RECV_TABLE()
|
||||||
|
@ -458,6 +458,8 @@ public:
|
|||||||
|
|
||||||
// Allows the player's model to draw on non-main views, like monitors or mirrors.
|
// Allows the player's model to draw on non-main views, like monitors or mirrors.
|
||||||
bool m_bDrawPlayerModelExternally;
|
bool m_bDrawPlayerModelExternally;
|
||||||
|
|
||||||
|
bool m_bInTriggerFall;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -8676,6 +8676,7 @@ void SendProxy_ShiftPlayerSpawnflags( const SendProp *pProp, const void *pStruct
|
|||||||
SendPropInt ( SENDINFO( m_spawnflags ), 3, SPROP_UNSIGNED, SendProxy_ShiftPlayerSpawnflags ),
|
SendPropInt ( SENDINFO( m_spawnflags ), 3, SPROP_UNSIGNED, SendProxy_ShiftPlayerSpawnflags ),
|
||||||
|
|
||||||
SendPropBool ( SENDINFO( m_bDrawPlayerModelExternally ) ),
|
SendPropBool ( SENDINFO( m_bDrawPlayerModelExternally ) ),
|
||||||
|
SendPropBool ( SENDINFO( m_bInTriggerFall ) ),
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
END_SEND_TABLE()
|
END_SEND_TABLE()
|
||||||
|
@ -943,7 +943,7 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MAPBASE
|
#ifdef MAPBASE
|
||||||
bool m_bInTriggerFall;
|
CNetworkVar( bool, m_bInTriggerFall );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -3907,13 +3907,11 @@ void CGameMovement::CheckFalling( void )
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
#ifdef MAPBASE
|
#ifdef MAPBASE
|
||||||
#ifdef GAME_DLL // Let's hope we could work without transmitting to the client...
|
|
||||||
if ( player->m_bInTriggerFall )
|
if ( player->m_bInTriggerFall )
|
||||||
{
|
{
|
||||||
// This lets the fall damage functions do their magic without having to change them.
|
// This value lets the existing fall damage functions ensure a fatal fall.
|
||||||
player->m_Local.m_flFallVelocity += (PLAYER_FATAL_FALL_SPEED + PLAYER_LAND_ON_FLOATING_OBJECT);
|
player->m_Local.m_flFallVelocity += (PLAYER_FATAL_FALL_SPEED + PLAYER_LAND_ON_FLOATING_OBJECT);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ( !IsDead() && player->m_Local.m_flFallVelocity >= PLAYER_FALL_PUNCH_THRESHOLD )
|
if ( !IsDead() && player->m_Local.m_flFallVelocity >= PLAYER_FALL_PUNCH_THRESHOLD )
|
||||||
@ -3921,7 +3919,11 @@ void CGameMovement::CheckFalling( void )
|
|||||||
bool bAlive = true;
|
bool bAlive = true;
|
||||||
float fvol = 0.5;
|
float fvol = 0.5;
|
||||||
|
|
||||||
|
#ifdef MAPBASE
|
||||||
|
if ( player->GetWaterLevel() > 0 && !player->m_bInTriggerFall )
|
||||||
|
#else
|
||||||
if ( player->GetWaterLevel() > 0 )
|
if ( player->GetWaterLevel() > 0 )
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
// They landed in water.
|
// They landed in water.
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user