@@ -368,13 +368,13 @@ Schedule_t slScientistStartle[] =
368
368
};
369
369
370
370
371
-
371
+ // Marphy Fact Files Fix - Restore fear display animation
372
372
Task_t tlFear[] =
373
373
{
374
374
{TASK_STOP_MOVING, (float )0 },
375
375
{TASK_FACE_ENEMY, (float )0 },
376
376
{TASK_SAY_FEAR, (float )0 },
377
- // { TASK_PLAY_SEQUENCE, (float)ACT_FEAR_DISPLAY },
377
+ {TASK_PLAY_SEQUENCE_FACE_ENEMY, (float )ACT_FEAR_DISPLAY},
378
378
};
379
379
380
380
Schedule_t slFear[] =
@@ -416,12 +416,13 @@ void CScientist::DeclineFollowing()
416
416
417
417
void CScientist::Scream ()
418
418
{
419
- if (FOkToSpeak ())
420
- {
421
- Talk (10 );
422
- m_hTalkTarget = m_hEnemy;
423
- PlaySentence (" SC_SCREAM" , RANDOM_FLOAT (3 , 6 ), VOL_NORM, ATTN_NORM);
424
- }
419
+ // Marphy Fact Files Fix - This speech check always fails during combat, so removing
420
+ // if ( FOkToSpeak() )
421
+ // {
422
+ Talk (10 );
423
+ m_hTalkTarget = m_hEnemy;
424
+ PlaySentence (" SC_SCREAM" , RANDOM_FLOAT (3 , 6 ), VOL_NORM, ATTN_NORM);
425
+ // }
425
426
}
426
427
427
428
@@ -458,15 +459,16 @@ void CScientist::StartTask(Task_t* pTask)
458
459
break ;
459
460
460
461
case TASK_SAY_FEAR:
461
- if (FOkToSpeak ())
462
- {
463
- Talk (2 );
464
- m_hTalkTarget = m_hEnemy;
465
- if (m_hEnemy->IsPlayer ())
466
- PlaySentence (" SC_PLFEAR" , 5 , VOL_NORM, ATTN_NORM);
467
- else
468
- PlaySentence (" SC_FEAR" , 5 , VOL_NORM, ATTN_NORM);
469
- }
462
+ // Marphy Fact FIles Fix - This speech check always fails during combat, so removing
463
+ // if ( FOkToSpeak() )
464
+ // {
465
+ Talk (2 );
466
+ m_hTalkTarget = m_hEnemy;
467
+ if (m_hEnemy->IsPlayer ())
468
+ PlaySentence (" SC_PLFEAR" , 5 , VOL_NORM, ATTN_NORM);
469
+ else
470
+ PlaySentence (" SC_FEAR" , 5 , VOL_NORM, ATTN_NORM);
471
+ // }
470
472
TaskComplete ();
471
473
break ;
472
474
@@ -504,14 +506,18 @@ void CScientist::RunTask(Task_t* pTask)
504
506
case TASK_RUN_PATH_SCARED:
505
507
if (MovementIsComplete ())
506
508
TaskComplete ();
507
- if (RANDOM_LONG (0 , 31 ) < 8 )
509
+
510
+ // Marphy Fact Files Fix - Reducing scream (which didn't work before) chance significantly
511
+ // if ( RANDOM_LONG(0,31) < 8 )
512
+ if (RANDOM_LONG (0 , 63 ) < 1 )
508
513
Scream ();
509
514
break ;
510
515
511
516
case TASK_MOVE_TO_TARGET_RANGE_SCARED:
512
517
{
513
- if (RANDOM_LONG (0 , 63 ) < 8 )
514
- Scream ();
518
+ // Marphy Fact Files Fix - Removing redundant scream
519
+ // if ( RANDOM_LONG(0,63)< 8 )
520
+ // Scream();
515
521
516
522
if (m_hEnemy == NULL )
517
523
{
@@ -764,6 +770,7 @@ bool CScientist::TakeDamage(entvars_t* pevInflictor, entvars_t* pevAttacker, flo
764
770
// of sounds this monster regards. In the base class implementation,
765
771
// monsters care about all sounds, but no scents.
766
772
// =========================================================
773
+ // Marphy Fact Files Fix - Restore scientist's sense of smell
767
774
int CScientist::ISoundMask ()
768
775
{
769
776
return bits_SOUND_WORLD |
@@ -916,6 +923,9 @@ Schedule_t* CScientist::GetSchedule()
916
923
{
917
924
m_hEnemy = NULL ;
918
925
pEnemy = NULL ;
926
+
927
+ // Marphy Fact Files Fix - Fix scientists not disregarding enemy after hiding
928
+ m_fearTime = gpGlobals->time ;
919
929
}
920
930
}
921
931
@@ -991,12 +1001,38 @@ Schedule_t* CScientist::GetSchedule()
991
1001
case MONSTERSTATE_COMBAT:
992
1002
if (HasConditions (bits_COND_NEW_ENEMY))
993
1003
return slFear; // Point and scream!
1004
+
994
1005
if (HasConditions (bits_COND_SEE_ENEMY))
1006
+ {
1007
+ // Marphy Fact Files Fix - Fix scientists not disregarding enemy after hiding
1008
+ m_fearTime = gpGlobals->time ;
995
1009
return slScientistCover; // Take Cover
1010
+ }
996
1011
997
1012
if (HasConditions (bits_COND_HEAR_SOUND))
998
1013
return slTakeCoverFromBestSound; // Cower and panic from the scary sound!
999
1014
1015
+ // Marphy Fact Files Fix - Fix scientists not disregarding enemy after hiding
1016
+ if (pEnemy)
1017
+ {
1018
+ if (HasConditions (bits_COND_SEE_ENEMY))
1019
+ m_fearTime = gpGlobals->time ;
1020
+ else if (DisregardEnemy (pEnemy)) // After 15 seconds of being hidden, return to alert
1021
+ {
1022
+ m_hEnemy = NULL ;
1023
+ pEnemy = NULL ;
1024
+
1025
+ m_fearTime = gpGlobals->time ;
1026
+
1027
+ if (IsFollowing ())
1028
+ {
1029
+ return slScientistStartle;
1030
+ }
1031
+
1032
+ return slScientistHide; // Hide after disregard
1033
+ }
1034
+ }
1035
+
1000
1036
return slScientistCover; // Run & Cower
1001
1037
break ;
1002
1038
}
@@ -1042,6 +1078,9 @@ MONSTERSTATE CScientist::GetIdealState()
1042
1078
// Strip enemy when going to alert
1043
1079
m_IdealMonsterState = MONSTERSTATE_ALERT;
1044
1080
m_hEnemy = NULL ;
1081
+
1082
+ // Marphy Fact Files Fix - Fix scientists not disregarding enemy after hiding
1083
+ m_fearTime = gpGlobals->time ;
1045
1084
return m_IdealMonsterState;
1046
1085
}
1047
1086
// Follow if only scared a little
0 commit comments