Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/game/server/triggers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2844,6 +2844,7 @@ void CAI_ChangeHintGroup::InputActivate( inputdata_t &inputdata )
#define SF_CAMERA_PLAYER_SNAP_TO 16
#define SF_CAMERA_PLAYER_NOT_SOLID 32
#define SF_CAMERA_PLAYER_INTERRUPT 64
#define SF_CAMERA_PLAYER_INVULN 128


//-----------------------------------------------------------------------------
Expand Down Expand Up @@ -3095,10 +3096,12 @@ void CTriggerCamera::Enable( void )

m_nPlayerButtons = pPlayer->m_nButtons;


// Make the player invulnerable while under control of the camera. This will prevent situations where the player dies while under camera control but cannot restart their game due to disabled player inputs.
m_nOldTakeDamage = m_hPlayer->m_takedamage;
m_hPlayer->m_takedamage = DAMAGE_NO;
if ( HasSpawnFlags( SF_CAMERA_PLAYER_INVULN ) )
Copy link
Contributor

@ficool2 ficool2 Nov 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This condition needs to be inverted for backwards compatibility (and rename the flag accodingly). The previous behavior should exist for old maps.
It also shouldn't revert the m_takeDamage when Disabling in this case

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made the changes

{
// Make the player invulnerable while under control of the camera. This will prevent situations where the player dies while under camera control but cannot restart their game due to disabled player inputs.
m_hPlayer->m_takedamage = DAMAGE_NO;
}

if ( HasSpawnFlags( SF_CAMERA_PLAYER_NOT_SOLID ) )
{
Expand Down