Skip to content

Commit

Permalink
trigger_configure_monster can change the blood color
Browse files Browse the repository at this point in the history
  • Loading branch information
FreeSlave committed May 24, 2024
1 parent 35b921c commit 872de64
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
10 changes: 10 additions & 0 deletions dlls/triggers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5547,6 +5547,7 @@ class CTriggerConfigureMonster : public CPointEntity
short m_actOutOfPVS;
int m_iClass;
int m_soundMask;
short m_bloodColor;

short m_prisonerTo;
short m_freeRoam;
Expand Down Expand Up @@ -5580,6 +5581,7 @@ TYPEDESCRIPTION CTriggerConfigureMonster::m_SaveData[] =
DEFINE_FIELD( CTriggerConfigureMonster, m_actOutOfPVS, FIELD_SHORT ),
DEFINE_FIELD( CTriggerConfigureMonster, m_iClass, FIELD_INTEGER ),
DEFINE_FIELD( CTriggerConfigureMonster, m_soundMask, FIELD_INTEGER ),
DEFINE_FIELD( CTriggerConfigureMonster, m_bloodColor, FIELD_SHORT ),
DEFINE_FIELD( CTriggerConfigureMonster, m_prisonerTo, FIELD_SHORT ),
DEFINE_FIELD( CTriggerConfigureMonster, m_freeRoam, FIELD_SHORT ),
DEFINE_FIELD( CTriggerConfigureMonster, m_sizeForGrapple, FIELD_SHORT ),
Expand Down Expand Up @@ -5635,6 +5637,11 @@ void CTriggerConfigureMonster::KeyValue(KeyValueData *pkvd)
m_soundMask = atoi( pkvd->szValue );
pkvd->fHandled = TRUE;
}
else if ( FStrEq( pkvd->szKeyName, "bloodcolor" ) )
{
m_bloodColor = atoi( pkvd->szValue );
pkvd->fHandled = TRUE;
}
else if (FStrEq(pkvd->szKeyName, "classify"))
{
m_iClass = atoi( pkvd->szValue );
Expand Down Expand Up @@ -5776,6 +5783,9 @@ void CTriggerConfigureMonster::Affect(CBaseEntity *pEntity)
MaySetResettableValue2(pMonster->m_iClass, m_iClass);
MaySetResettableValue2(pMonster->m_customSoundMask, m_soundMask);

if (m_bloodColor)
pMonster->m_bloodColor = m_bloodColor;

MaySetResettableValue(pMonster->m_prisonerTo, m_prisonerTo);
MaySetResettableValue(pMonster->m_freeRoam, m_freeRoam);
MaySetResettableValue2(pMonster->m_sizeForGrapple, m_sizeForGrapple);
Expand Down
13 changes: 10 additions & 3 deletions fgd/halflife.fgd
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,12 @@
[
bloodcolor(choices) : "Blood Color" : : "Blood color of monster" =
[
-1 : "Don't bleed"
0 : "Default"
1 : "Human (red)"
2 : "Alien (yellow)"
247 : "Human (red)"
195 : "Alien (yellow)"
-1 : "Don't bleed"
1 : "Human (red) [SC compatible]"
2 : "Alien (yellow) [SC compatible]"
]
]

Expand Down Expand Up @@ -7725,6 +7725,13 @@
127 : "Every sound and scent"
1028 : "Default, except Player"
]
bloodcolor(choices) : "Blood Color" : : "Blood color of monster" =
[
-1 : "Don't bleed"
0 : "No change"
247 : "Human (red)"
195 : "Alien (yellow)"
]
prisonerto(choices) : "Act as Prisoner to" =
[
-1 : "Reset"
Expand Down

0 comments on commit 872de64

Please sign in to comment.