Aliens Vs Predator source code mod is an open source project powered by Assembla

Assembla offers free public and private SVN/Git repositories and project hosting with bug/issue tracking and collaboration tools.

avp_source_code_mod

Commit ecea45defab258134a175bcf8a178f1ac7e4243e

User picture

sound changes

Files Affected

 
9a76eea2f5a4966f140916a40d0f5bf4b00fb01becea45defab258134a175bcf8a178f1ac7e4243e
202
 
202
 
203
static void DoAlienLimbLossSound(VECTORCH *position)
203
static void DoAlienLimbLossSound(VECTORCH *position)
204
{
204
{
205
    PlayAlienSound(0, ASC_LimbLoss, 0, NULL, position);
205
    SpeciesSound(0, ASC_LimbLoss, 0, NULL, position, ALIEN_SOUND);
206
}
206
}
207
 
207
 
208
static void MakeFleshRippingNoises(VECTORCH *positionPtr)
208
static void MakeFleshRippingNoises(VECTORCH *positionPtr)
9a76eea2f5a4966f140916a40d0f5bf4b00fb01becea45defab258134a175bcf8a178f1ac7e4243e
700
    if (PlatStartSoundSys())
700
    if (PlatStartSoundSys())
701
    {
701
    {
702
        load_common_sounds();
702
        load_common_sounds();
703
        LoadMarineScreamSounds();
703
        LoadSounds();
704
        LoadPredatorScreamSounds();
 
 
705
        LoadAlienScreamSounds();
 
 
706
        LoadQueenScreamSounds();
 
 
707
    }
704
    }
708
 
705
 
709
    if(UserProfile.grabmouse)
706
    if(UserProfile.grabmouse)
...
 
...
 
1052
//roll_credits();
1049
//roll_credits();
1053
EmptyHierarchyLibrary();
1050
EmptyHierarchyLibrary();
1054
DeallocateAllImages();
1051
DeallocateAllImages();
1055
UnloadScreamSounds();
1052
UnloadSounds();
1056
free(mainshapelist);
1053
free(mainshapelist);
1057
cleanup_openal();
1054
cleanup_openal();
1058
cleanup_strings();
1055
cleanup_strings();
9a76eea2f5a4966f140916a40d0f5bf4b00fb01becea45defab258134a175bcf8a178f1ac7e4243e
1418
                switch(messagePtr->characterType)
1418
                switch(messagePtr->characterType)
1419
                {
1419
                {
1420
                    case NGCT_Marine :
1420
                    case NGCT_Marine :
1421
                        PlayMarineScream(0, (MARINE_SOUND_CATERGORY)messagePtr->scream,0,&ghostData->SoundHandle2,&position);
1421
                        SpeciesSound(0, (MARINE_SOUND_CATERGORY)messagePtr->scream, 0, &ghostData->SoundHandle2, &position, HUMAN_SOUND);
1422
                    break;
1422
                    break;
1423
                    case NGCT_Alien :
1423
                    case NGCT_Alien :
1424
                        PlayAlienSound(0, (ALIEN_SOUND_CATEGORY)messagePtr->scream,0,&ghostData->SoundHandle2,&position);
1424
                        SpeciesSound(0, (ALIEN_SOUND_CATEGORY)messagePtr->scream, 0, &ghostData->SoundHandle2, &position, ALIEN_SOUND);
1425
                    break;
1425
                    break;
1426
                    case NGCT_Predator :
1426
                    case NGCT_Predator :
1427
                        if ((PREDATOR_SOUND_CATEGORY)messagePtr->scream == PSC_Medicomp_Special)
1427
                        if ((PREDATOR_SOUND_CATEGORY)messagePtr->scream == PSC_Medicomp_Special)
1428
                            Sound_Play(SID_PRED_ROAR, "de", &position, &ghostData->SoundHandle2);
1428
                            Sound_Play(SID_PRED_ROAR, "de", &position, &ghostData->SoundHandle2);
1429
                        else
1429
                        else
1430
                            PlayPredatorSound(0, (PREDATOR_SOUND_CATEGORY)messagePtr->scream,0,&ghostData->SoundHandle2,&position);
1430
                            SpeciesSound(0, (PREDATOR_SOUND_CATEGORY)messagePtr->scream, 0, &ghostData->SoundHandle2, &position, PREDATOR_SOUND);
1431
                }
1431
                }
1432
            }
1432
            }
1433
 
1433
 
...
 
...
 
2194
    switch(netGameData.playerData[senderPlayerIndex].characterType)
2194
    switch(netGameData.playerData[senderPlayerIndex].characterType)
2195
    {
2195
    {
2196
        case NGCT_Alien:
2196
        case NGCT_Alien:
2197
            PlayAlienSound(0, ASC_Scream_Dying, 0, NULL, &sbPtr->DynPtr->Position);
2197
            SpeciesSound(0, ASC_Scream_Dying, 0, NULL, &sbPtr->DynPtr->Position, ALIEN_SOUND);
2198
        break;
2198
        break;
2199
        case NGCT_Marine:
2199
        case NGCT_Marine:
2200
            PlayMarineScream(0, MSC_Death, 0, NULL, &sbPtr->DynPtr->Position);
2200
            SpeciesSound(0, MSC_Death, 0, NULL, &sbPtr->DynPtr->Position, HUMAN_SOUND);
2201
        break;
2201
        break;
2202
        case NGCT_Predator:
2202
        case NGCT_Predator:
2203
            PlayPredatorSound(0, PSC_Scream_Dying, 0, NULL, &sbPtr->DynPtr->Position);
2203
            SpeciesSound(0, PSC_Scream_Dying, 0, NULL, &sbPtr->DynPtr->Position, PREDATOR_SOUND);
2204
        break;
2204
        break;
2205
        default:
2205
        default:
2206
        {
2206
        {
...
 
...
 
3809
        position.vy = messagePtr->vy;
3809
        position.vy = messagePtr->vy;
3810
        position.vz = messagePtr->vz;
3810
        position.vz = messagePtr->vz;
3811
 
3811
 
3812
        PlayAlienSound((int)messagePtr->alienType,(int)messagePtr->soundCategory,messagePtr->pitch,NULL,&position);
3812
        SpeciesSound((int)messagePtr->alienType, (int)messagePtr->soundCategory, messagePtr->pitch, NULL, &position, ALIEN_SOUND);
3813
    }
3813
    }
3814
}
3814
}
3815
 
3815
 
9a76eea2f5a4966f140916a40d0f5bf4b00fb01becea45defab258134a175bcf8a178f1ac7e4243e
557
 
557
 
558
    if (alienStatusPointer->sound_mouth == SOUND_NOACTIVEINDEX)
558
    if (alienStatusPointer->sound_mouth == SOUND_NOACTIVEINDEX)
559
    {
559
    {
560
        PlayAlienSound((int)alienStatusPointer->Type, ASC_Scream_General, 0, &alienStatusPointer->sound_mouth, &sbPtr->DynPtr->Position);
560
        SpeciesSound((int)alienStatusPointer->Type, ASC_Scream_General, 0, &alienStatusPointer->sound_mouth, &sbPtr->DynPtr->Position, ALIEN_SOUND);
561
 
561
 
562
        if(NetworkPeer == AvP.PlayMode)
562
        if(NetworkPeer == AvP.PlayMode)
563
            AddNetMsg_SpotAlienSound((int)ASC_Scream_General, (int)alienStatusPointer->Type, 0, &sbPtr->DynPtr->Position);
563
            AddNetMsg_SpotAlienSound((int)ASC_Scream_General, (int)alienStatusPointer->Type, 0, &sbPtr->DynPtr->Position);
...
 
...
 
710
/*
710
/*
711
    if (alienStatusPointer->sound_mouth == SOUND_NOACTIVEINDEX)
711
    if (alienStatusPointer->sound_mouth == SOUND_NOACTIVEINDEX)
712
    {
712
    {
713
        PlayAlienSound((int)alienStatusPointer->Type, ASC_Taunt, 0, &alienStatusPointer->sound_mouth, &sbPtr->DynPtr->Position);
713
        SpeciesSound((int)alienStatusPointer->Type, ASC_Taunt, 0, &alienStatusPointer->sound_mouth, &sbPtr->DynPtr->Position, ALIEN_SOUND);
714
 
714
 
715
        if(NetworkPeer == AvP.PlayMode)
715
        if(NetworkPeer == AvP.PlayMode)
716
            AddNetMsg_SpotAlienSound((int)ASC_Taunt, (int)alienStatusPointer->Type, 0, &sbPtr->DynPtr->Position);
716
            AddNetMsg_SpotAlienSound((int)ASC_Taunt, (int)alienStatusPointer->Type, 0, &sbPtr->DynPtr->Position);
...
 
...
 
3797
            /* Is it still attached? */
3797
            /* Is it still attached? */
3798
            if (head && !(head->flags & section_data_notreal))
3798
            if (head && !(head->flags & section_data_notreal))
3799
            {
3799
            {
3800
                PlayAlienSound((int)alienStatusPointer->Type, ASC_Scream_Dying, 0, &alienStatusPointer->sound_mouth, &sbPtr->DynPtr->Position);
3800
                SpeciesSound((int)alienStatusPointer->Type, ASC_Scream_Dying, 0, &alienStatusPointer->sound_mouth, &sbPtr->DynPtr->Position, ALIEN_SOUND);
3801
                //PlayAlienSound((int)alienStatusPointer->Type, ASC_Death, 0, NULL, &sbPtr->DynPtr->Position);
3801
                //SpeciesSound((int)alienStatusPointer->Type, ASC_Death, 0, NULL, &sbPtr->DynPtr->Position, ALIEN_SOUND);
3802
 
3802
 
3803
                if(NetworkPeer == AvP.PlayMode)
3803
                if(NetworkPeer == AvP.PlayMode)
3804
                    AddNetMsg_SpotAlienSound((int)ASC_Scream_Dying, (int)alienStatusPointer->Type, 0, &sbPtr->DynPtr->Position);
3804
                    AddNetMsg_SpotAlienSound((int)ASC_Scream_Dying, (int)alienStatusPointer->Type, 0, &sbPtr->DynPtr->Position);
...
 
...
 
4149
        {
4149
        {
4150
            int pitch = (FastRandom() & 255) - 128;
4150
            int pitch = (FastRandom() & 255) - 128;
4151
 
4151
 
4152
            PlayAlienSound((int)alienStatusPointer->Type, ASC_Scream_Hurt, pitch, &alienStatusPointer->sound_mouth, &sbPtr->DynPtr->Position);
4152
            SpeciesSound((int)alienStatusPointer->Type, ASC_Scream_Hurt, pitch, &alienStatusPointer->sound_mouth, &sbPtr->DynPtr->Position, ALIEN_SOUND);
4153
 
4153
 
4154
            if(NetworkPeer == AvP.PlayMode)
4154
            if(NetworkPeer == AvP.PlayMode)
4155
                AddNetMsg_SpotAlienSound(ASC_Scream_Hurt, (int)alienStatusPointer->Type, pitch, &sbPtr->DynPtr->Position);
4155
                AddNetMsg_SpotAlienSound(ASC_Scream_Hurt, (int)alienStatusPointer->Type, pitch, &sbPtr->DynPtr->Position);
9a76eea2f5a4966f140916a40d0f5bf4b00fb01becea45defab258134a175bcf8a178f1ac7e4243e
26
#include <assert.h>
26
#include <assert.h>
27
#include <stdio.h>
27
#include <stdio.h>
28
 
28
 
 
 
29
extern ACTIVESOUNDSAMPLE ActiveSounds[SOUND_MAXACTIVE];
29
extern void EnableBehaviourType(STRATEGYBLOCK* sbptr, void *bhdata);
30
extern void EnableBehaviourType(STRATEGYBLOCK* sbptr, void *bhdata);
30
 
31
 
31
#define FLARE_COUNTER (ONE_FIXED * 20)
32
#define FLARE_COUNTER (ONE_FIXED * 20)
...
 
...
 
1556
        //make_new_marine(sbPtr, MNPCW_GrenadeLauncher);
1557
        //make_new_marine(sbPtr, MNPCW_GrenadeLauncher);
1557
        //make_new_marine(sbPtr, MNPCW_SADAR);
1558
        //make_new_marine(sbPtr, MNPCW_SADAR);
1558
        int marine_ok;
1559
        int marine_ok;
 
 
1560
weapon = MNPCW_MUnarmed+1;
1559
 
1561
 
1560
        if ( (weapon <= 0) || (weapon >= (int)MNPCW_End))
1562
        if ( (weapon <= 0) || (weapon >= (int)MNPCW_End))
1561
            marine_ok = make_new_marine(sbPtr, MNPCW_PulseRifle);
1563
            marine_ok = make_new_marine(sbPtr, MNPCW_PulseRifle);
...
 
...
 
1892
 
1894
 
1893
    if (marineStatusPointer->sound_mouth == SOUND_NOACTIVEINDEX)
1895
    if (marineStatusPointer->sound_mouth == SOUND_NOACTIVEINDEX)
1894
    {
1896
    {
1895
        PlayMarineScream(marineStatusPointer->Voice, MSC_Surprise, marineStatusPointer->VoicePitch, &marineStatusPointer->sound_mouth, &sbPtr->DynPtr->Position);
1897
        SpeciesSound(marineStatusPointer->Voice, MSC_Surprise, marineStatusPointer->VoicePitch, &marineStatusPointer->sound_mouth, &sbPtr->DynPtr->Position, HUMAN_SOUND);
1896
 
 
 
1897
        marineStatusPointer->Courage -= 5000;
1898
        marineStatusPointer->Courage -= 5000;
1898
    }
1899
    }
1899
 
1900
 
...
 
...
 
2091
                    if(&marineStatusPointer->sound_mouth == ActiveSounds[a].externalRef)
2092
                    if(&marineStatusPointer->sound_mouth == ActiveSounds[a].externalRef)
2092
                        continue;
2093
                        continue;
2093
 
2094
 
 
 
2095
                    if(-1 != ActiveSounds[a].species)
 
 
2096
                    {
 
 
2097
                        switch(ActiveSounds[a].species)
 
 
2098
                        {
 
 
2099
                            case ALIEN_SOUND:
 
 
2100
                            {
 
 
2101
                                switch(ActiveSounds[a].species_category)
 
 
2102
                                {
 
 
2103
                                }
 
 
2104
                            }
 
 
2105
                            break;
 
 
2106
                            case HUMAN_SOUND:
 
 
2107
                            {
 
 
2108
                                switch(ActiveSounds[a].species_category)
 
 
2109
                                {
 
 
2110
                                }
 
 
2111
                            }
 
 
2112
                            break;
 
 
2113
                            case PREDATOR_SOUND:
 
 
2114
                            {
 
 
2115
                                switch(ActiveSounds[a].species_category)
 
 
2116
                                {
 
 
2117
                                }
 
 
2118
                            }
 
 
2119
                            break;
 
 
2120
                            case QUEEN_SOUND:
 
 
2121
                            {
 
 
2122
                                switch(ActiveSounds[a].species_category)
 
 
2123
                                {
 
 
2124
                                }
 
 
2125
                            }
 
 
2126
                        }
 
 
2127
                    }
 
 
2128
 
2094
                    priority = MUL_FIXED(NormalFrameTime, -1000);
2129
                    priority = MUL_FIXED(NormalFrameTime, -1000);
2095
                }
2130
                }
2096
                else if (!ActiveSounds[a].loop)
2131
                else if (!ActiveSounds[a].loop)
...
 
...
 
2293
                            {
2328
                            {
2294
                                case GrimaceExpression:
2329
                                case GrimaceExpression:
2295
                                case GrimaceEyesClosed:
2330
                                case GrimaceEyesClosed:
2296
                                    PlayMarineScream(marineStatusPointer->Voice, MSC_Angry, marineStatusPointer->VoicePitch,
2331
                                    SpeciesSound(marineStatusPointer->Voice, MSC_Angry, marineStatusPointer->VoicePitch,
2297
                                        &marineStatusPointer->sound_mouth, &sbPtr->DynPtr->Position);
2332
                                        &marineStatusPointer->sound_mouth, &sbPtr->DynPtr->Position, HUMAN_SOUND);
2298
                                break;
2333
                                break;
2299
                                case PanicExpression:
2334
                                case PanicExpression:
2300
                                case PanicEyesClosed:
2335
                                case PanicEyesClosed:
2301
                                    PlayMarineScream(marineStatusPointer->Voice, MSC_Panic, marineStatusPointer->VoicePitch,
2336
                                    SpeciesSound(marineStatusPointer->Voice, MSC_Panic, marineStatusPointer->VoicePitch,
2302
                                        &marineStatusPointer->sound_mouth, &sbPtr->DynPtr->Position);
2337
                                        &marineStatusPointer->sound_mouth, &sbPtr->DynPtr->Position, HUMAN_SOUND);
2303
                                default:
2338
                                default:
2304
                                break;
2339
                                break;
2305
                            }
2340
                            }
...
 
...
 
2318
            {
2353
            {
2319
                if (marineStatusPointer->sound_mouth == SOUND_NOACTIVEINDEX)
2354
                if (marineStatusPointer->sound_mouth == SOUND_NOACTIVEINDEX)
2320
                {
2355
                {
2321
                    PlayMarineScream(marineStatusPointer->Voice, MSC_Sobbing,marineStatusPointer->VoicePitch,
2356
                    SpeciesSound(marineStatusPointer->Voice, MSC_Sobbing,marineStatusPointer->VoicePitch,
2322
                        &marineStatusPointer->sound_mouth, &sbPtr->DynPtr->Position);
2357
                        &marineStatusPointer->sound_mouth, &sbPtr->DynPtr->Position, HUMAN_SOUND);
2323
                }
2358
                }
2324
            }
2359
            }
2325
        }
2360
        }
...
 
...
 
2905
 
2940
 
2906
    if (marineStatusPointer->sound_mouth == SOUND_NOACTIVEINDEX)
2941
    if (marineStatusPointer->sound_mouth == SOUND_NOACTIVEINDEX)
2907
    {
2942
    {
2908
        PlayMarineScream(marineStatusPointer->Voice, MSC_Taunt, marineStatusPointer->VoicePitch,
2943
        SpeciesSound(marineStatusPointer->Voice, MSC_Taunt, marineStatusPointer->VoicePitch,
2909
            &marineStatusPointer->sound_mouth, &sbPtr->DynPtr->Position);
2944
            &marineStatusPointer->sound_mouth, &sbPtr->DynPtr->Position, HUMAN_SOUND);
2910
    }
2945
    }
2911
}
2946
}
2912
 
2947
 
...
 
...
 
7601
    /* That was senses. Now courage. */
7636
    /* That was senses. Now courage. */
7602
    if (!marineStatusPointer->Android)
7637
    if (!marineStatusPointer->Android)
7603
    {
7638
    {
7604
printf("Courage%d\n", marineStatusPointer->Courage);
7639
printf("Courage %d\n", marineStatusPointer->Courage);
7605
        if (marineStatusPointer->Courage >= ONE_FIXED)
7640
        if (marineStatusPointer->Courage >= ONE_FIXED)
7606
        {
7641
        {
7607
            marineStatusPointer->Courage = ONE_FIXED;
7642
            marineStatusPointer->Courage = ONE_FIXED;
...
 
...
 
7621
            if ((marineStatusPointer->Target == NULL) && !marineStatusPointer->suspicious)
7656
            if ((marineStatusPointer->Target == NULL) && !marineStatusPointer->suspicious)
7622
                marineStatusPointer->Courage += MUL_FIXED(NormalFrameTime, 3000);
7657
                marineStatusPointer->Courage += MUL_FIXED(NormalFrameTime, 3000);
7623
 
7658
 
7624
            marineStatusPointer->Courage += NpcSquad.Squad_Delta_Morale;
7659
            //marineStatusPointer->Courage += NpcSquad.Squad_Delta_Morale;
7625
 
7660
 
7626
            if(marineStatusPointer->Courage > ((ONE_FIXED) / 2))
7661
            if(marineStatusPointer->Courage > ((ONE_FIXED) / 2))
7627
            {
7662
            {
...
 
...
 
7709
 
7744
 
7710
    if (marineStatusPointer->sound_mouth == SOUND_NOACTIVEINDEX)
7745
    if (marineStatusPointer->sound_mouth == SOUND_NOACTIVEINDEX)
7711
    {
7746
    {
7712
        PlayMarineScream(marineStatusPointer->Voice, MSC_Oooph, marineStatusPointer->VoicePitch,
7747
        SpeciesSound(marineStatusPointer->Voice, MSC_Oooph, marineStatusPointer->VoicePitch,
7713
            &marineStatusPointer->sound_mouth, &sbPtr->DynPtr->Position);
7748
            &marineStatusPointer->sound_mouth, &sbPtr->DynPtr->Position, HUMAN_SOUND);
7714
    }
7749
    }
7715
}
7750
}
7716
 
7751
 
...
 
...
 
7721
    if (marineStatusPointer->sound_mouth == SOUND_NOACTIVEINDEX)
7756
    if (marineStatusPointer->sound_mouth == SOUND_NOACTIVEINDEX)
7722
    {
7757
    {
7723
        /* I figure if you're screaming already, forget it. */
7758
        /* I figure if you're screaming already, forget it. */
7724
        PlayMarineScream(marineStatusPointer->Voice, MSC_OnFire,marineStatusPointer->VoicePitch,
7759
        SpeciesSound(marineStatusPointer->Voice, MSC_OnFire,marineStatusPointer->VoicePitch,
7725
            &marineStatusPointer->sound_mouth, &sbPtr->DynPtr->Position);
7760
            &marineStatusPointer->sound_mouth, &sbPtr->DynPtr->Position, HUMAN_SOUND);
7726
    }
7761
    }
7727
    /* That too was really quite unpleasant. */
7762
    /* That too was really quite unpleasant. */
7728
}
7763
}
...
 
...
 
7734
    if (marineStatusPointer->sound_mouth == SOUND_NOACTIVEINDEX)
7769
    if (marineStatusPointer->sound_mouth == SOUND_NOACTIVEINDEX)
7735
    {
7770
    {
7736
        /* I figure if you're screaming already, forget it. */
7771
        /* I figure if you're screaming already, forget it. */
7737
        PlayMarineScream(marineStatusPointer->Voice, MSC_Electrocution, marineStatusPointer->VoicePitch,
7772
        SpeciesSound(marineStatusPointer->Voice, MSC_Electrocution, marineStatusPointer->VoicePitch,
7738
            &marineStatusPointer->sound_mouth, &sbPtr->DynPtr->Position);
7773
            &marineStatusPointer->sound_mouth, &sbPtr->DynPtr->Position, HUMAN_SOUND);
7739
    }
7774
    }
7740
}
7775
}
7741
 
7776
 
...
 
...
 
7746
    if (marineStatusPointer->sound_mouth == SOUND_NOACTIVEINDEX)
7781
    if (marineStatusPointer->sound_mouth == SOUND_NOACTIVEINDEX)
7747
    {
7782
    {
7748
        /* I figure if you're screaming already, forget it. */
7783
        /* I figure if you're screaming already, forget it. */
7749
        PlayMarineScream(marineStatusPointer->Voice, MSC_Death, marineStatusPointer->VoicePitch,
7784
        SpeciesSound(marineStatusPointer->Voice, MSC_Death, marineStatusPointer->VoicePitch,
7750
            &marineStatusPointer->sound_mouth, &sbPtr->DynPtr->Position);
7785
            &marineStatusPointer->sound_mouth, &sbPtr->DynPtr->Position, HUMAN_SOUND);
7751
    }
7786
    }
7752
}
7787
}
7753
 
7788
 
...
 
...
 
7767
        ZoneAlert(3, sbPtr->containingModule->m_aimodule);
7802
        ZoneAlert(3, sbPtr->containingModule->m_aimodule);
7768
    }
7803
    }
7769
 
7804
 
7770
    if(marineStatusPointer->sound_mouth != SOUND_NOACTIVEINDEX)
 
 
7771
        Sound_Stop(marineStatusPointer->sound_mouth); /* Cut them off! */
 
 
7772
 
 
 
7773
    /*notify death target ,if marine has one*/
7805
    /*notify death target ,if marine has one*/
7774
    if(marineStatusPointer->death_target_sbptr)
7806
    if(marineStatusPointer->death_target_sbptr)
7775
        RequestState(marineStatusPointer->death_target_sbptr, marineStatusPointer->death_target_request, 0);
7807
        RequestState(marineStatusPointer->death_target_sbptr, marineStatusPointer->death_target_request, 0);
...
 
...
 
8165
 
8197
 
8166
    marineStatusPointer->Wounds |= wounds;
8198
    marineStatusPointer->Wounds |= wounds;
8167
 
8199
 
8168
    /* Might want to get a new target? */
8200
    if (!marineStatusPointer->Android)
 
 
8201
    {
 
 
8202
        if(marineStatusPointer->sound_mouth != SOUND_NOACTIVEINDEX)
 
 
8203
        {
 
 
8204
            switch(ActiveSounds[marineStatusPointer->sound_mouth].species_category)
 
 
8205
            {
 
 
8206
                case MSC_Sobbing:
 
 
8207
                case MSC_Taunt:
 
 
8208
                case MSC_Falling:
 
 
8209
                case MSC_Jump:
 
 
8210
                    Sound_Stop(marineStatusPointer->sound_mouth); /* Cut them off! */
 
 
8211
                default:
 
 
8212
                break;
 
 
8213
            }
 
 
8214
        }
 
 
8215
    }
8169
 
8216
 
8170
    if((sbPtr->DamageBlock.Health <= 0) || ((marineStatusPointer->Wounds & section_flag_left_foot) && (marineStatusPointer->Wounds &
section_flag_right_foot)))
8217
    if((sbPtr->DamageBlock.Health <= 0) || ((marineStatusPointer->Wounds & section_flag_left_foot) && (marineStatusPointer->Wounds &
section_flag_right_foot)))
8171
    {
8218
    {
...
 
...
 
8176
    }
8223
    }
8177
    else
8224
    else
8178
    {
8225
    {
 
 
8226
        /* Might want to get a new target? */
 
 
8227
 
8179
        marineStatusPointer->Courage /= 2;
8228
        marineStatusPointer->Courage /= 2;
8180
 
8229
 
8181
        if (sbPtr->DamageBlock.IsOnFire)
8230
        if (sbPtr->DamageBlock.IsOnFire)
...
 
...
 
8193
            if (!marineStatusPointer->Android)
8242
            if (!marineStatusPointer->Android)
8194
            {
8243
            {
8195
                if(MBS_AcidAvoidance != marineStatusPointer->behaviourState)
8244
                if(MBS_AcidAvoidance != marineStatusPointer->behaviourState)
8196
                {
 
 
8197
                    if(marineStatusPointer->sound_mouth != SOUND_NOACTIVEINDEX)
 
 
8198
                        Sound_Stop(marineStatusPointer->sound_mouth); /* Cut them off! */
 
 
8199
 
 
 
8200
                    PlayMarineScream(marineStatusPointer->Voice, MSC_Acid, marineStatusPointer->VoicePitch,
 
 
8201
                        &marineStatusPointer->sound_mouth, &sbPtr->DynPtr->Position);
 
 
8202
 
 
 
8203
                    Enter_AcidAvoidance_State(sbPtr, incoming);
8245
                    Enter_AcidAvoidance_State(sbPtr, incoming);
8204
                }
8246
 
8205
                else if (marineStatusPointer->sound_mouth == SOUND_NOACTIVEINDEX)
8247
                if (marineStatusPointer->sound_mouth == SOUND_NOACTIVEINDEX)
8206
                {
8248
                {
8207
                    PlayMarineScream(marineStatusPointer->Voice, MSC_Acid, marineStatusPointer->VoicePitch,
8249
                    SpeciesSound(marineStatusPointer->Voice, MSC_Acid, marineStatusPointer->VoicePitch,
8208
                        &marineStatusPointer->sound_mouth, &sbPtr->DynPtr->Position);
8250
                        &marineStatusPointer->sound_mouth, &sbPtr->DynPtr->Position, HUMAN_SOUND);
8209
                }
8251
                }
8210
            }
8252
            }
8211
        }
8253
        }
8212
        else if (!marineStatusPointer->Android)
8254
        else if (!marineStatusPointer->Android)
8213
        {
8255
        {
8214
            extern ACTIVESOUNDSAMPLE ActiveSounds[SOUND_MAXACTIVE];
 
 
8215
 
 
 
8216
            if((marineStatusPointer->sound_mouth != SOUND_NOACTIVEINDEX) && (ActiveSounds[marineStatusPointer->sound_mouth].soundIndex <= SID_STARTOF_SCREAMSLOTS))
 
 
8217
                Sound_Stop(marineStatusPointer->sound_mouth); /* Cut them off! */
 
 
8218
 
 
 
8219
            if (marineStatusPointer->sound_mouth == SOUND_NOACTIVEINDEX)
8256
            if (marineStatusPointer->sound_mouth == SOUND_NOACTIVEINDEX)
8220
            {
8257
            {
8221
                PlayMarineScream(marineStatusPointer->Voice, MSC_Pain, marineStatusPointer->VoicePitch,
8258
                SpeciesSound(marineStatusPointer->Voice, MSC_Pain, marineStatusPointer->VoicePitch,
8222
                    &marineStatusPointer->sound_mouth, &sbPtr->DynPtr->Position);
8259
                    &marineStatusPointer->sound_mouth, &sbPtr->DynPtr->Position, HUMAN_SOUND);
8223
            }
8260
            }
8224
        }
8261
        }
8225
 
8262
 
...
 
...
 
12586
        0,                    /* ARealMarine */
12623
        0,                    /* ARealMarine */
12587
        0,                    /* Android */
12624
        0,                    /* Android */
12588
        1                    /* CanSprint */
12625
        1                    /* CanSprint */
12589
    },
 
 
12590
    {
 
 
12591
        MNPCW_Scientist_A,            /* ID */
 
 
12592
        SFX_NONE,                /* enum SFX_ID SfxID; */
 
 
12593
        NULL,                    /* Func. */
 
 
12594
        NULL,                    /* Misfire func. */
 
 
12595
        NULL,                    /* WeaponPanicFireFunction */
 
 
12596
        "scientist",                /* Riffname */
 
 
12597
        "clip",                     /* HierarchyName */
 
 
12598
        "clip board",                /* GunflashName */
 
 
12599
        NULL,                    /* ElevationSection */
 
 
12600
        "bub with molotov",             /* HitLocationTableName */
 
 
12601
        "Template",                /* TemplateName */
 
 
12602
        NULL,                    /* ClipName */
 
 
12603
        0,                    /* MinRange (Don't fire when closer) */
 
 
12604
        MARINE_CLOSE_APPROACH_DISTANCE,        /* ForceFireRange (Fire if closer) */
 
 
12605
        10000,                    /* MaxRange (Don't fire if further) */
 
 
12606
        -10000,                    /* Accuracy */
 
 
12607
        1,                    /* Firing Rate */
 
 
12608
        MARINE_NEAR_FIRE_TIME,            /* Firing Time */
 
 
12609
        0,                    /* MinimumBurstSize */
 
 
12610
        AMMO_NONE,                /* Ammo profile */
 
 
12611
        -1,                    /* clip_size */
 
 
12612
        0,                    /* numberofclips*/
 
 
12613
        MSSS_Standard,                /* Reload_Sequence */
 
 
12614
        0,                    /* TargetCallibrationShift */
 
 
12615
        SID_NOSOUND,                /* StartSound */
 
 
12616
        SID_NOSOUND,                /* LoopSound */
 
 
12617
        SID_NOSOUND,                /* EndSound */
 
 
12618
        0,                    /* UseElevation */
 
 
12619
        0,                    /* ARealMarine */
 
 
12620
        0,                    /* Android */
 
 
12621
        1                    /* CanSprint */
 
 
12622
    },
 
 
12623
    {
 
 
12624
        MNPCW_Scientist_B,            /* ID */
 
 
12625
        SFX_NONE,                /* enum SFX_ID SfxID; */
 
 
12626
        NULL,                    /* Func. */
 
 
12627
        NULL,                    /* Misfire func. */
 
 
12628
        NULL,                    /* WeaponPanicFireFunction */
 
 
12629
        "scientist",                /* Riffname */
 
 
12630
        "testtube",                  /* HierarchyName */
 
 
12631
        "test tube",                /* GunflashName */
 
 
12632
        NULL,                    /* ElevationSection */
 
 
12633
        "bub with molotov",             /* HitLocationTableName */
 
 
12634
        "Template",                /* TemplateName */
 
 
12635
        NULL,                    /* ClipName */
 
 
12636
        0,                    /* MinRange (Don't fire when closer) */
 
 
12637
        MARINE_CLOSE_APPROACH_DISTANCE,        /* ForceFireRange (Fire if closer) */
 
 
12638
        10000,                    /* MaxRange (Don't fire if further) */
 
 
12639
        -10000,                    /* Accuracy */
 
 
12640
        1,                    /* Firing Rate */
 
 
12641
        MARINE_NEAR_FIRE_TIME,            /* Firing Time */
 
 
12642
        0,                    /* MinimumBurstSize */
 
 
12643
        AMMO_NONE,                /* Ammo profile */
 
 
12644
        -1,                    /* clip_size */
 
 
12645
        0,                    /* numberofclips*/
 
 
12646
        MSSS_Standard,                /* Reload_Sequence */
 
 
12647
        0,                    /* TargetCallibrationShift */
 
 
12648
        SID_NOSOUND,                /* StartSound */
 
 
12649
        SID_NOSOUND,                /* LoopSound */
 
 
12650
        SID_NOSOUND,                /* EndSound */
 
 
12651
        0,                    /* UseElevation */
 
 
12652
        0,                    /* ARealMarine */
 
 
12653
        0,                    /* Android */
 
 
12654
        1                    /* CanSprint */
 
 
12655
    }
12626
    }
12656
};
12627
};
12657
 
12628
 
9a76eea2f5a4966f140916a40d0f5bf4b00fb01becea45defab258134a175bcf8a178f1ac7e4243e
340
                }
340
                }
341
            }
341
            }
342
 
342
 
343
            PlayPredatorSound(0, PSC_Swipe, 0, NULL, &sbPtr->DynPtr->Position);
343
            SpeciesSound(0, PSC_Swipe, 0, NULL, &sbPtr->DynPtr->Position, PREDATOR_SOUND);
344
        }
344
        }
345
        /* Prepare next flag. */
345
        /* Prepare next flag. */
346
        workingflags >>= 1;
346
        workingflags >>= 1;
...
 
...
 
1065
    assert(predatorStatusPointer);
1065
    assert(predatorStatusPointer);
1066
 
1066
 
1067
    if (predatorStatusPointer->soundHandle == SOUND_NOACTIVEINDEX)
1067
    if (predatorStatusPointer->soundHandle == SOUND_NOACTIVEINDEX)
1068
        PlayPredatorSound(0, PSC_Scream_General, pitch, &predatorStatusPointer->soundHandle, &sbPtr->DynPtr->Position);
1068
        SpeciesSound(0, PSC_Scream_General, pitch, &predatorStatusPointer->soundHandle, &sbPtr->DynPtr->Position, PREDATOR_SOUND);
1069
}
1069
}
1070
 
1070
 
1071
static void predator_change_behaviour(STRATEGYBLOCK *sbPtr)
1071
static void predator_change_behaviour(STRATEGYBLOCK *sbPtr)
...
 
...
 
1637
                                    predatorStatusPointer->HModelController.LoopAfterTweening = 0;
1637
                                    predatorStatusPointer->HModelController.LoopAfterTweening = 0;
1638
 
1638
 
1639
                                    if (predatorStatusPointer->soundHandle == SOUND_NOACTIVEINDEX)
1639
                                    if (predatorStatusPointer->soundHandle == SOUND_NOACTIVEINDEX)
1640
                                        PlayPredatorSound(0, PSC_Taunt, pitch, &predatorStatusPointer->soundHandle, &sbPtr->DynPtr->Position);
1640
                                        SpeciesSound(0, PSC_Taunt, pitch, &predatorStatusPointer->soundHandle, &sbPtr->DynPtr->Position, PREDATOR_SOUND);
1641
                                }
1641
                                }
1642
                            }
1642
                            }
1643
                            else
1643
                            else
...
 
...
 
2768
                    int rand = FastRandom();
2768
                    int rand = FastRandom();
2769
                    int pitch = (rand & 255) - 128;
2769
                    int pitch = (rand & 255) - 128;
2770
 
2770
 
2771
                    PlayPredatorSound(0, PSC_Scream_Dying, pitch, &predatorStatusPointer->soundHandle, &sbPtr->DynPtr->Position);
2771
                    SpeciesSound(0, PSC_Scream_Dying, pitch, &predatorStatusPointer->soundHandle, &sbPtr->DynPtr->Position, PREDATOR_SOUND);
2772
                }
2772
                }
2773
            }
2773
            }
2774
        }
2774
        }
...
 
...
 
2839
            if (predatorStatusPointer->soundHandle == SOUND_NOACTIVEINDEX)
2839
            if (predatorStatusPointer->soundHandle == SOUND_NOACTIVEINDEX)
2840
            {
2840
            {
2841
                int pitch = (FastRandom() & 255) - 128;
2841
                int pitch = (FastRandom() & 255) - 128;
2842
                PlayPredatorSound(0, PSC_Acid, pitch, &predatorStatusPointer->soundHandle, &sbPtr->DynPtr->Position);
2842
                SpeciesSound(0, PSC_Acid, pitch, &predatorStatusPointer->soundHandle, &sbPtr->DynPtr->Position, PREDATOR_SOUND);
2843
            }
2843
            }
2844
        }
2844
        }
2845
        else
2845
        else
...
 
...
 
2847
            if (predatorStatusPointer->soundHandle == SOUND_NOACTIVEINDEX)
2847
            if (predatorStatusPointer->soundHandle == SOUND_NOACTIVEINDEX)
2848
            {
2848
            {
2849
                int pitch = (FastRandom() & 255) - 128;
2849
                int pitch = (FastRandom() & 255) - 128;
2850
                PlayPredatorSound(0, PSC_Scream_Hurt, pitch, &predatorStatusPointer->soundHandle, &sbPtr->DynPtr->Position);
2850
                SpeciesSound(0, PSC_Scream_Hurt, pitch, &predatorStatusPointer->soundHandle, &sbPtr->DynPtr->Position, PREDATOR_SOUND);
2851
            }
2851
            }
2852
        }
2852
        }
2853
 
2853
 
...
 
...
 
3346
                    predatorStatusPointer->HModelController.LoopAfterTweening = 0;
3346
                    predatorStatusPointer->HModelController.LoopAfterTweening = 0;
3347
 
3347
 
3348
                    if (predatorStatusPointer->soundHandle == SOUND_NOACTIVEINDEX)
3348
                    if (predatorStatusPointer->soundHandle == SOUND_NOACTIVEINDEX)
3349
                        PlayPredatorSound(0, PSC_Taunt, pitch, &predatorStatusPointer->soundHandle, &sbPtr->DynPtr->Position);
3349
                        SpeciesSound(0, PSC_Taunt, pitch, &predatorStatusPointer->soundHandle, &sbPtr->DynPtr->Position, PREDATOR_SOUND);
3350
                }
3350
                }
3351
            }
3351
            }
3352
 
3352
 
9a76eea2f5a4966f140916a40d0f5bf4b00fb01becea45defab258134a175bcf8a178f1ac7e4243e
414
 
414
 
415
static void QueenSoundHiss(STRATEGYBLOCK* sbPtr)
415
static void QueenSoundHiss(STRATEGYBLOCK* sbPtr)
416
{
416
{
417
    assert(sbPtr);
 
 
418
    QUEEN_STATUS_BLOCK *queenStatusPointer = (QUEEN_STATUS_BLOCK *)(sbPtr->dataptr);    
417
    QUEEN_STATUS_BLOCK *queenStatusPointer = (QUEEN_STATUS_BLOCK *)(sbPtr->dataptr);    
419
 
418
 
420
    if(queenStatusPointer->soundHandle == SOUND_NOACTIVEINDEX)
419
    if(queenStatusPointer->soundHandle == SOUND_NOACTIVEINDEX)
421
    {
420
    {
422
        PlayQueenSound(0,QSC_Hiss,0,&queenStatusPointer->soundHandle,&sbPtr->DynPtr->Position);
421
        SpeciesSound(0, QSC_Hiss, 0, &queenStatusPointer->soundHandle, &sbPtr->DynPtr->Position, QUEEN_SOUND);
423
        queenStatusPointer->lastSoundCategory = QSC_Hiss;        
422
        queenStatusPointer->lastSoundCategory = QSC_Hiss;        
424
    }
423
    }
425
}
424
}
...
 
...
 
439
 
438
 
440
    if(queenStatusPointer->soundHandle == SOUND_NOACTIVEINDEX)
439
    if(queenStatusPointer->soundHandle == SOUND_NOACTIVEINDEX)
441
    {
440
    {
442
        PlayQueenSound(0,QSC_Scream_Hurt,0,&queenStatusPointer->soundHandle,&sbPtr->DynPtr->Position);
441
        SpeciesSound(0, QSC_Scream_Hurt, 0, &queenStatusPointer->soundHandle, &sbPtr->DynPtr->Position, QUEEN_SOUND);
443
        queenStatusPointer->lastSoundCategory = QSC_Scream_Hurt;        
442
        queenStatusPointer->lastSoundCategory = QSC_Scream_Hurt;        
444
    }
443
    }
445
}
444
}
...
 
...
 
450
{SOUND_NOACTIVEINDEX,SOUND_NOACTIVEINDEX,SOUND_NOACTIVEINDEX,SOUND_NOACTIVEINDEX,SOUND_NOACTIVEINDEX,SOUND_NOACTIVEINDEX,SOUND_NOACTIVEINDEX,SOUND_NOACTIVEINDEX
,SOUND_NOACTIVEINDEX,SOUND_NOACTIVEINDEX};
449
{SOUND_NOACTIVEINDEX,SOUND_NOACTIVEINDEX,SOUND_NOACTIVEINDEX,SOUND_NOACTIVEINDEX,SOUND_NOACTIVEINDEX,SOUND_NOACTIVEINDEX,SOUND_NOACTIVEINDEX,SOUND_NOACTIVEINDEX
,SOUND_NOACTIVEINDEX,SOUND_NOACTIVEINDEX};
451
    assert(location);
450
    assert(location);
452
 
451
 
453
    PlayQueenSound(0,QSC_Object_Bounce,0,&QueenObjectSoundHandles[object_index],location);
452
    SpeciesSound(0, QSC_Object_Bounce, 0, &QueenObjectSoundHandles[object_index], location, QUEEN_SOUND);
454
}
453
}
455
 
454
 
456
void InitQueenBehaviour(void* bhdata, STRATEGYBLOCK *sbPtr)
455
void InitQueenBehaviour(void* bhdata, STRATEGYBLOCK *sbPtr)
457
{
456
{
458
    assert(bhdata);
 
 
459
    TOOLS_DATA_QUEEN *toolsData = (TOOLS_DATA_QUEEN *)bhdata; 
457
    TOOLS_DATA_QUEEN *toolsData = (TOOLS_DATA_QUEEN *)bhdata; 
460
 
458
 
461
    /* Reset command interface. */
459
    /* Reset command interface. */
9a76eea2f5a4966f140916a40d0f5bf4b00fb01becea45defab258134a175bcf8a178f1ac7e4243e
22
    VOLUME_DEFAULT,
22
    VOLUME_DEFAULT,
23
    0,
23
    0,
24
    NULL,
24
    NULL,
 
 
25
    -1,
 
 
26
    -1,
25
    0,
27
    0,
26
    0,
28
    0,
27
    0,
29
    0,
...
 
...
 
400
    {
402
    {
401
        int i;
403
        int i;
402
 
404
 
403
        if((index < 0) || (index >= SID_MAXIMUM))
 
 
404
            return; /* no such sound */
 
 
405
 
 
 
406
        GameSounds[index].loaded = 0;
405
        GameSounds[index].loaded = 0;
407
        GameSounds[index].dsFrequency = 0;
406
        GameSounds[index].dsFrequency = 0;
408
 
407
 
...
 
...
 
653
 
652
 
654
                if(AL_NO_ERROR == alGetError())
653
                if(AL_NO_ERROR == alGetError())
655
                {
654
                {
656
                    const static ALfloat zero[3] = { 0.0f, 0.0f, 0.0f };
655
                    static const ALfloat zero[3] = { 0.0f, 0.0f, 0.0f };
657
                    alSourcefv(ActiveSounds[activeIndex].ds3DBufferP, AL_POSITION, zero);
656
                    alSourcefv(ActiveSounds[activeIndex].ds3DBufferP, AL_POSITION, zero);
658
 
657
 
659
                    if(AL_NO_ERROR == alGetError())
658
                    if(AL_NO_ERROR == alGetError())
9a76eea2f5a4966f140916a40d0f5bf4b00fb01becea45defab258134a175bcf8a178f1ac7e4243e
868
        {
868
        {
869
            case I_Alien:
869
            case I_Alien:
870
            {
870
            {
871
                PlayAlienSound(0, ASC_Taunt, 0, &PlayerStatus.sound_mouth, &PlayerStatus.sbptr->DynPtr->Position);
871
                SpeciesSound(0, ASC_Taunt, 0, &PlayerStatus.sound_mouth, &PlayerStatus.sbptr->DynPtr->Position, ALIEN_SOUND);
872
 
872
 
873
                if(SinglePlayer != AvP.PlayMode)
873
                if(SinglePlayer != AvP.PlayMode)
874
                    netGameData.myLastScream = ASC_Taunt;
874
                    netGameData.myLastScream = ASC_Taunt;
...
 
...
 
876
            break;
876
            break;
877
            case I_Marine:
877
            case I_Marine:
878
            {
878
            {
879
                PlayMarineScream(0, MSC_Taunt, 0, &PlayerStatus.sound_mouth, &PlayerStatus.sbptr->DynPtr->Position);
879
                SpeciesSound(0, MSC_Taunt, 0, &PlayerStatus.sound_mouth, &PlayerStatus.sbptr->DynPtr->Position, HUMAN_SOUND);
880
 
880
 
881
                if(SinglePlayer != AvP.PlayMode)
881
                if(SinglePlayer != AvP.PlayMode)
882
                    netGameData.myLastScream = MSC_Taunt;
882
                    netGameData.myLastScream = MSC_Taunt;
...
 
...
 
884
            break;
884
            break;
885
            case I_Predator:
885
            case I_Predator:
886
            {
886
            {
887
                PlayPredatorSound(0, PSC_Taunt, 0, &PlayerStatus.sound_mouth, &PlayerStatus.sbptr->DynPtr->Position);
887
                SpeciesSound(0, PSC_Taunt, 0, &PlayerStatus.sound_mouth, &PlayerStatus.sbptr->DynPtr->Position, PREDATOR_SOUND);
888
 
888
 
889
                if(SinglePlayer != AvP.PlayMode)
889
                if(SinglePlayer != AvP.PlayMode)
890
                    netGameData.myLastScream = PSC_Taunt;
890
                    netGameData.myLastScream = PSC_Taunt;
...
 
...
 
992
    switch (AvP.PlayerType)
992
    switch (AvP.PlayerType)
993
    {
993
    {
994
        case I_Alien:
994
        case I_Alien:
995
            PlayAlienSound(0, ASC_Scream_Dying, 0, NULL, &PlayerStatus.sbptr->DynPtr->Position);
995
            SpeciesSound(0, ASC_Scream_Dying, 0, NULL, &PlayerStatus.sbptr->DynPtr->Position, ALIEN_SOUND);
996
        break;
996
        break;
997
        case I_Marine:
997
        case I_Marine:
998
        {
998
        {
999
            if (damage->Id == AMMO_FACEHUGGER)
999
            if (damage->Id == AMMO_FACEHUGGER)
1000
                PlayMarineScream(0, MSC_Facehugged, 0, NULL, &PlayerStatus.sbptr->DynPtr->Position);
1000
                SpeciesSound(0, MSC_Facehugged, 0, NULL, &PlayerStatus.sbptr->DynPtr->Position, HUMAN_SOUND);
1001
            else
1001
            else
1002
                PlayMarineScream(0, MSC_Death, 0, NULL, &PlayerStatus.sbptr->DynPtr->Position);
1002
                SpeciesSound(0, MSC_Death, 0, NULL, &PlayerStatus.sbptr->DynPtr->Position, HUMAN_SOUND);
1003
        }  
1003
        }  
1004
        break;
1004
        break;
1005
        case I_Predator:
1005
        case I_Predator:
1006
        {
1006
        {
1007
            if (damage->Id == AMMO_FACEHUGGER)
1007
            if (damage->Id == AMMO_FACEHUGGER)
1008
                PlayPredatorSound(0, PSC_Facehugged, 0, NULL, &PlayerStatus.sbptr->DynPtr->Position);
1008
                SpeciesSound(0, PSC_Facehugged, 0, NULL, &PlayerStatus.sbptr->DynPtr->Position, PREDATOR_SOUND);
1009
            else
1009
            else
1010
                PlayPredatorSound(0, PSC_Scream_Dying, 0, NULL, &PlayerStatus.sbptr->DynPtr->Position);
1010
                SpeciesSound(0, PSC_Scream_Dying, 0, NULL, &PlayerStatus.sbptr->DynPtr->Position, PREDATOR_SOUND);
1011
        }
1011
        }
1012
    }
1012
    }
1013
 
1013
 
...
 
...
 
1036
        if(damage)
1036
        if(damage)
1037
        {
1037
        {
1038
            if (damage->Id == AMMO_ALIEN_BITE_KILLSECTION)
1038
            if (damage->Id == AMMO_ALIEN_BITE_KILLSECTION)
1039
                Sound_Play(SID_ALIEN_JAW_ATTACK,"d", &PlayerStatus.sbptr->DynPtr->Position);
1039
                Sound_Play(SID_ALIEN_JAW_ATTACK, "d", &PlayerStatus.sbptr->DynPtr->Position);
1040
        }
1040
        }
1041
        /*---------------------------------**
1041
        /*---------------------------------**
1042
        **         Choose death anim sequence **
1042
        **         Choose death anim sequence **
...
 
...
 
1362
                {
1362
                {
1363
                    if (!damage->Impact && !damage->Cutting && !damage->Penetrative && damage->Fire &&
!damage->Electrical && !damage->Acid)
1363
                    if (!damage->Impact && !damage->Cutting && !damage->Penetrative && damage->Fire &&
!damage->Electrical && !damage->Acid)
1364
                    {
1364
                    {
1365
                        PlayAlienSound(0, ASC_PC_OnFire, pitch, &PlayerStatus.sound_mouth, &PlayerStatus.sbptr->DynPtr->Position);
1365
                        SpeciesSound(0, ASC_PC_OnFire, pitch, &PlayerStatus.sound_mouth, &PlayerStatus.sbptr->DynPtr->Position, ALIEN_SOUND);
1366
 
1366
 
1367
                        if(SinglePlayer != AvP.PlayMode)
1367
                        if(SinglePlayer != AvP.PlayMode)
1368
                            netGameData.myLastScream = ASC_PC_OnFire;
1368
                            netGameData.myLastScream = ASC_PC_OnFire;
1369
                    }
1369
                    }
1370
                    else
1370
                    else
1371
                    {
1371
                    {
1372
                        PlayAlienSound(0, ASC_Scream_Hurt, pitch, &PlayerStatus.sound_mouth, &PlayerStatus.sbptr->DynPtr->Position);
1372
                        SpeciesSound(0, ASC_Scream_Hurt, pitch, &PlayerStatus.sound_mouth, &PlayerStatus.sbptr->DynPtr->Position, ALIEN_SOUND);
1373
 
1373
 
1374
                        if(SinglePlayer != AvP.PlayMode)
1374
                        if(SinglePlayer != AvP.PlayMode)
1375
                            netGameData.myLastScream = ASC_Scream_Hurt;
1375
                            netGameData.myLastScream = ASC_Scream_Hurt;
...
 
...
 
1384
                    switch(damage->Id)
1384
                    switch(damage->Id)
1385
                    {
1385
                    {
1386
                        case AMMO_FACEHUGGER:
1386
                        case AMMO_FACEHUGGER:
1387
                            PlayMarineScream(0, MSC_Facehugged, pitch, &PlayerStatus.sound_mouth, NULL);
1387
                            SpeciesSound(0, MSC_Facehugged, pitch, &PlayerStatus.sound_mouth, &PlayerStatus.sbptr->DynPtr->Position, HUMAN_SOUND);
1388
                        break;
1388
                        break;
1389
                        case AMMO_FALLINGDAMAGE:
1389
                        case AMMO_FALLINGDAMAGE:
1390
                            PlayMarineScream(0, MSC_Falling, pitch, &PlayerStatus.sound_mouth, NULL);
1390
                            SpeciesSound(0, MSC_Falling, pitch, &PlayerStatus.sound_mouth, &PlayerStatus.sbptr->DynPtr->Position, HUMAN_SOUND);
1391
                        break;
1391
                        break;
1392
                        default:
1392
                        default:
1393
                        {
1393
                        {
...
 
...
 
1397
                                {
1397
                                {
1398
                                    if (!damage->Fire)
1398
                                    if (!damage->Fire)
1399
                                    {
1399
                                    {
1400
                                        PlayMarineScream(0, MSC_Acid, pitch, &PlayerStatus.sound_mouth, NULL);
1400
                                        SpeciesSound(0, MSC_Acid, pitch, &PlayerStatus.sound_mouth, &PlayerStatus.sbptr->DynPtr->Position, HUMAN_SOUND);
1401
 
1401
 
1402
                                        if(SinglePlayer != AvP.PlayMode)
1402
                                        if(SinglePlayer != AvP.PlayMode)
1403
                                            netGameData.myLastScream = MSC_Acid;
1403
                                            netGameData.myLastScream = MSC_Acid;
...
 
...
 
1406
                                }
1406
                                }
1407
                                else if (damage->Fire)
1407
                                else if (damage->Fire)
1408
                                {
1408
                                {
1409
                                    PlayMarineScream(0, MSC_PC_OnFire, pitch, &PlayerStatus.sound_mouth, NULL);
1409
                                    SpeciesSound(0, MSC_PC_OnFire, pitch, &PlayerStatus.sound_mouth, &PlayerStatus.sbptr->DynPtr->Position, HUMAN_SOUND);
1410
 
1410
 
1411
                                    if(SinglePlayer != AvP.PlayMode)
1411
                                    if(SinglePlayer != AvP.PlayMode)
1412
                                        netGameData.myLastScream = MSC_PC_OnFire;
1412
                                        netGameData.myLastScream = MSC_PC_OnFire;
...
 
...
 
1415
 
1415
 
1416
                            }
1416
                            }
1417
 
1417
 
1418
                            PlayMarineScream(0, MSC_Pain, pitch, &PlayerStatus.sound_mouth, NULL);
1418
                            SpeciesSound(0, MSC_Pain, pitch, &PlayerStatus.sound_mouth, &PlayerStatus.sbptr->DynPtr->Position, HUMAN_SOUND);
1419
 
1419
 
1420
                            if(SinglePlayer != AvP.PlayMode)
1420
                            if(SinglePlayer != AvP.PlayMode)
1421
                                netGameData.myLastScream = MSC_Pain;
1421
                                netGameData.myLastScream = MSC_Pain;
...
 
...
 
1427
                {
1427
                {
1428
                    if (damage->Id == AMMO_FACEHUGGER)
1428
                    if (damage->Id == AMMO_FACEHUGGER)
1429
                    {
1429
                    {
1430
                        PlayPredatorSound(0, PSC_Facehugged, pitch, &PlayerStatus.sound_mouth, &PlayerStatus.sbptr->DynPtr->Position);
1430
                        SpeciesSound(0, PSC_Facehugged, pitch, &PlayerStatus.sound_mouth, &PlayerStatus.sbptr->DynPtr->Position, PREDATOR_SOUND);
1431
                    }
1431
                    }
1432
                    else
1432
                    else
1433
                    {
1433
                    {
...
 
...
 
1437
                            {
1437
                            {
1438
                                if (damage->Acid)
1438
                                if (damage->Acid)
1439
                                {
1439
                                {
1440
                                    PlayPredatorSound(0, PSC_Acid, pitch, &PlayerStatus.sound_mouth, &PlayerStatus.sbptr->DynPtr->Position);
1440
                                    SpeciesSound(0, PSC_Acid, pitch, &PlayerStatus.sound_mouth, &PlayerStatus.sbptr->DynPtr->Position, PREDATOR_SOUND);
1441
 
1441
 
1442
                                    if(SinglePlayer != AvP.PlayMode)
1442
                                    if(SinglePlayer != AvP.PlayMode)
1443
                                        netGameData.myLastScream = PSC_Acid;
1443
                                        netGameData.myLastScream = PSC_Acid;
...
 
...
 
1446
                            }
1446
                            }
1447
                            else if (!damage->Acid)
1447
                            else if (!damage->Acid)
1448
                            {
1448
                            {
1449
                                PlayPredatorSound(0, PSC_PC_OnFire, pitch, &PlayerStatus.sound_mouth, &PlayerStatus.sbptr->DynPtr->Position);
1449
                                SpeciesSound(0, PSC_PC_OnFire, pitch, &PlayerStatus.sound_mouth, &PlayerStatus.sbptr->DynPtr->Position, PREDATOR_SOUND);
1450
 
1450
 
1451
                                if(SinglePlayer != AvP.PlayMode)
1451
                                if(SinglePlayer != AvP.PlayMode)
1452
                                    netGameData.myLastScream = PSC_PC_OnFire;
1452
                                    netGameData.myLastScream = PSC_PC_OnFire;
...
 
...
 
1454
                            } 
1454
                            } 
1455
                        }
1455
                        }
1456
 
1456
 
1457
                        PlayPredatorSound(0, PSC_Scream_Hurt, pitch, &PlayerStatus.sound_mouth, &PlayerStatus.sbptr->DynPtr->Position);
1457
                        SpeciesSound(0, PSC_Scream_Hurt, pitch, &PlayerStatus.sound_mouth, &PlayerStatus.sbptr->DynPtr->Position, PREDATOR_SOUND);
1458
 
1458
 
1459
                        if(SinglePlayer != AvP.PlayMode)
1459
                        if(SinglePlayer != AvP.PlayMode)
1460
                            netGameData.myLastScream = PSC_Scream_Hurt;
1460
                            netGameData.myLastScream = PSC_Scream_Hurt;
9a76eea2f5a4966f140916a40d0f5bf4b00fb01becea45defab258134a175bcf8a178f1ac7e4243e
223
    VECTORCH * worldPosn = NULL;
223
    VECTORCH * worldPosn = NULL;
224
    int reverb_off = 0;
224
    int reverb_off = 0;
225
    int soundStartPosition = 0;
225
    int soundStartPosition = 0;
 
 
226
    int species = -1;
 
 
227
    int species_category = -1;
226
 
228
 
227
    //printf("About to play sound %i %s\n", soundNumber, GameSounds[soundNumber].wavName);
229
    //printf("About to play sound %i %s\n", soundNumber, GameSounds[soundNumber].wavName);
228
 
230
 
...
 
...
 
285
                break;
287
                break;
286
                case 'P':
288
                case 'P':
287
                    soundStartPosition = va_arg(argPtr,int);
289
                    soundStartPosition = va_arg(argPtr,int);
 
 
290
                break;
 
 
291
                case 's':
 
 
292
                    species = va_arg(argPtr, int);
 
 
293
                break;
 
 
294
                case 'c':
 
 
295
                    species_category = va_arg(argPtr, int);
288
                default:
296
                default:
289
                break;
297
                break;
290
            }
298
            }
...
 
...
 
356
        ActiveSounds[newIndex].volume = volume;
364
        ActiveSounds[newIndex].volume = volume;
357
        ActiveSounds[newIndex].pitch = pitch;
365
        ActiveSounds[newIndex].pitch = pitch;
358
        ActiveSounds[newIndex].externalRef = externalRef;
366
        ActiveSounds[newIndex].externalRef = externalRef;
 
 
367
        ActiveSounds[newIndex].species = species;
 
 
368
        ActiveSounds[newIndex].species_category = species_category;
359
        ActiveSounds[newIndex].loop = loop;
369
        ActiveSounds[newIndex].loop = loop;
360
        ActiveSounds[newIndex].threedee = 0;
370
        ActiveSounds[newIndex].threedee = 0;
361
        ActiveSounds[newIndex].paused = 0;
371
        ActiveSounds[newIndex].paused = 0;
9a76eea2f5a4966f140916a40d0f5bf4b00fb01becea45defab258134a175bcf8a178f1ac7e4243e
21
    SOUNDINDEX last_sound;
21
    SOUNDINDEX last_sound;
22
};
22
};
23
 
23
 
24
struct ScreamVoiceType
 
 
25
{
 
 
26
    struct ScreamSoundCategory* category;
 
 
27
};
 
 
28
 
 
 
29
struct CharacterSoundEffects
24
struct CharacterSoundEffects
30
{
25
{
31
    int num_voice_types;
26
    int num_voice_types;
32
    int num_voice_cats;
27
    int num_voice_cats;
33
    struct ScreamVoiceType* voice_types;
28
 
 
 
29
    struct
 
 
30
    {
 
 
31
        struct ScreamSoundCategory* category;
 
 
32
 
 
 
33
    } *voice_types;
 
 
34
 
34
    SOUNDINDEX global_last_sound;
35
    SOUNDINDEX global_last_sound;
 
 
36
    const char *data_file;
 
 
37
    const char *directory;
35
};
38
};
36
 
39
 
37
static struct CharacterSoundEffects MarineSounds =    {5, 15, 0, SID_NOSOUND};
40
static struct CharacterSoundEffects MarineSounds =    {0, 0, NULL, SID_NOSOUND, "marsound.dat", "marinevoice"};
38
static struct CharacterSoundEffects AlienSounds =    {3,  9, 0, SID_NOSOUND};
41
static struct CharacterSoundEffects AlienSounds =    {0, 0, NULL, SID_NOSOUND, "aliensound.dat", "alienvoice"};
39
static struct CharacterSoundEffects PredatorSounds =    {1,  9, 0, SID_NOSOUND};
42
static struct CharacterSoundEffects PredatorSounds =    {0, 0, NULL, SID_NOSOUND, "predsound.dat", "predatorvoice"};
40
static struct CharacterSoundEffects QueenSounds =    {1,  3, 0, SID_NOSOUND};
43
static struct CharacterSoundEffects QueenSounds =    {0, 0, NULL, SID_NOSOUND, "queensound.dat", "queenvoice"};
41
 
44
 
42
static int load_scream_sounds(const char *path, const char * file_name)
45
static int load_scream_sounds(const char *path, const char * file_name)
43
{
46
{
...
 
...
 
56
 
59
 
57
    if ( i < SID_ENDOF_SCREAMSLOTS)
60
    if ( i < SID_ENDOF_SCREAMSLOTS)
58
    {
61
    {
59
        if (!GameSounds[i].loaded && LoadWavFile(i, path, file_name))
62
        char full_path[50];
 
 
63
        sprintf(full_path, "npc%c%s", DIR_SEPARATOR, path);
 
 
64
        if (!GameSounds[i].loaded && LoadWavFile(i, full_path, file_name))
60
            return i;
65
            return i;
61
    }
66
    }
62
 
67
 
63
return SID_NOSOUND;
68
return SID_NOSOUND;
64
}
69
}
65
 
70
 
66
static void LoadSounds(struct CharacterSoundEffects *testus, const char *data_file, const char *directory)
71
static void LoadSoundsFromFile(struct CharacterSoundEffects *testus)
67
{
72
{
68
    if(testus->voice_types)
73
    char file_path[50];
69
        return;
74
    sprintf(file_path, "fastfile%c%s", DIR_SEPARATOR, testus->data_file);
70
 
75
 
71
    FILE *file = OpenGameFile(data_file, 1, FILETYPE_GAMEDATA);
76
    FILE *file = OpenGameFile(file_path, 1, FILETYPE_GAMEDATA);
72
 
77
 
73
    if(file == NULL)
78
    if(file == NULL)
74
    {
79
    {
75
        printf("Failed to open %s\n", data_file);
80
        printf("Failed to open %s\n", testus->data_file);
76
        return;
81
        return;
77
    }
82
    }
78
 
83
 
...
 
...
 
90
        int i;
95
        int i;
91
        char* bufpos = buffer + 8;
96
        char* bufpos = buffer + 8;
92
 
97
 
93
        //num_voice_types = *(int*)bufpos;
98
        testus->num_voice_types = *(int*)bufpos;
94
        bufpos += 4;
99
        bufpos += 4;
95
        //num_voice_cats = *(int*)bufpos;
100
        testus->num_voice_cats = *(int*)bufpos;
96
        bufpos += 4;
101
        bufpos += 4;
97
 
102
 
98
        testus->voice_types = malloc(testus->num_voice_types * sizeof(struct ScreamVoiceType));
103
        testus->voice_types = malloc(testus->num_voice_types * sizeof(*testus->voice_types));
99
 
104
 
100
        for(i=0; i < testus->num_voice_types; i++)    
105
        for(i=0; i < testus->num_voice_types; i++)    
101
        {
106
        {
...
 
...
 
131
                    //bufpos += 4;
136
                    //bufpos += 4;
132
                    bufpos += 8;
137
                    bufpos += 8;
133
 
138
 
134
                    sound->sound_number = (SOUNDINDEX) load_scream_sounds(directory, file_name);
139
                    sound->sound_number = (SOUNDINDEX) load_scream_sounds(testus->directory, file_name);
135
 
140
 
136
                    if(SID_NOSOUND != sound->sound_number)
141
                    if(SID_NOSOUND != sound->sound_number)
137
                        k++;
142
                        k++;
...
 
...
 
145
    free(buffer);
150
    free(buffer);
146
}
151
}
147
 
152
 
148
void UnloadSounds(struct CharacterSoundEffects * testus)
153
static void FreeSoundStruct(struct CharacterSoundEffects * testus)
149
{
154
{
150
    if(testus->voice_types)
155
    if(testus->voice_types)
151
    {
156
    {
...
 
...
 
171
    }
176
    }
172
}
177
}
173
 
178
 
174
static void PlaySound(struct CharacterSoundEffects * testus, int VoiceType, int SoundCategory, int PitchShift, int* ExternalRef, VECTORCH* Location)
179
void SpeciesSound(int VoiceType, int SoundCategory, int PitchShift, int *ExternalRef, VECTORCH* Location, enum SPECIES_SOUND species)
175
{
180
{
176
//    assert(Location);
181
    struct CharacterSoundEffects * testus;
 
 
182
 
 
 
183
    switch(species)
 
 
184
    {
 
 
185
        case ALIEN_SOUND:
 
 
186
            testus = &AlienSounds;
 
 
187
        break;
 
 
188
        case HUMAN_SOUND:
 
 
189
            testus = &MarineSounds;
 
 
190
        break;
 
 
191
        case PREDATOR_SOUND:
 
 
192
            testus = &PredatorSounds;
 
 
193
        break;
 
 
194
        case QUEEN_SOUND:
 
 
195
            testus = &QueenSounds;
 
 
196
    }
 
 
197
 
 
 
198
    if(ExternalRef && (*ExternalRef != SOUND_NOACTIVEINDEX))
 
 
199
        return; //already playing a sound
177
 
200
 
178
    if(!testus->voice_types || VoiceType < 0 || VoiceType >= testus->num_voice_types)
201
    if(!testus->voice_types || VoiceType < 0 || VoiceType >= testus->num_voice_types)
179
        return;
202
        return;
...
 
...
 
181
    if(SoundCategory < 0 || SoundCategory >= testus->num_voice_cats)
204
    if(SoundCategory < 0 || SoundCategory >= testus->num_voice_cats)
182
        return;
205
        return;
183
 
206
 
184
    if(ExternalRef && (*ExternalRef != SOUND_NOACTIVEINDEX))
 
 
185
        return; //already playing a sound
 
 
186
 
 
 
187
    struct ScreamSoundCategory* cat = &testus->voice_types[VoiceType].category[SoundCategory];
207
    struct ScreamSoundCategory* cat = &testus->voice_types[VoiceType].category[SoundCategory];
188
    //make sure there are some sound for this category
208
    //make sure there are some sound for this category
189
 
209
 
...
 
...
 
213
 
233
 
214
    struct ScreamSound* sound = &cat->sounds[index];
234
    struct ScreamSound* sound = &cat->sounds[index];
215
 
235
 
216
    int pitch = sound->pitch+PitchShift;
236
    int pitch = sound->pitch + PitchShift;
217
 
237
 
218
    if(Location)
238
    if(Location)
219
        Sound_Play((SOUNDINDEX)sound->sound_number, "dvpe", Location, sound->volume, pitch, ExternalRef);
239
        Sound_Play((SOUNDINDEX)sound->sound_number, "vpescd", sound->volume, pitch, ExternalRef, (int)species, SoundCategory, Location);
220
    else
240
    else
221
        Sound_Play((SOUNDINDEX)sound->sound_number, "vpe", sound->volume, pitch, ExternalRef);
241
        Sound_Play((SOUNDINDEX)sound->sound_number, "vpesc",  sound->volume, pitch, ExternalRef, (int)species, SoundCategory);
222
 
242
 
223
    //take note of the last sound played
243
    //take note of the last sound played
224
    testus->global_last_sound = cat->last_sound = (SOUNDINDEX)sound->sound_number;
244
    testus->global_last_sound = cat->last_sound = (SOUNDINDEX)sound->sound_number;
225
}
245
}
226
 
246
 
227
void UnloadScreamSounds()
247
void UnloadSounds()
228
{
 
 
229
    UnloadSounds(&MarineSounds);
 
 
230
    UnloadSounds(&AlienSounds);
 
 
231
    UnloadSounds(&PredatorSounds);
 
 
232
    UnloadSounds(&QueenSounds);
 
 
233
}
 
 
234
 
 
 
235
void LoadMarineScreamSounds()
 
 
236
{
 
 
237
    LoadSounds(&MarineSounds, "fastfile/marsound.dat", "npc/marinevoice");
 
 
238
}
 
 
239
 
 
 
240
void LoadAlienScreamSounds()
 
 
241
{
 
 
242
    LoadSounds(&AlienSounds, "fastfile/aliensound.dat", "npc/alienvoice");
 
 
243
}
 
 
244
 
 
 
245
void LoadPredatorScreamSounds()
 
 
246
{
 
 
247
    LoadSounds(&PredatorSounds, "fastfile/predsound.dat", "npc/predatorvoice");
 
 
248
}
 
 
249
 
 
 
250
void LoadQueenScreamSounds()
 
 
251
{
 
 
252
    LoadSounds(&QueenSounds, "fastfile/queensound.dat", "npc/queenvoice");
 
 
253
}
 
 
254
 
 
 
255
void PlayMarineScream(int VoiceType, int SoundCategory, int PitchShift, int* ExternalRef, VECTORCH* Location)
 
 
256
{
 
 
257
    PlaySound(&MarineSounds, VoiceType, SoundCategory, PitchShift, ExternalRef, Location);
 
 
258
}
 
 
259
 
 
 
260
void PlayAlienSound(int VoiceType, int SoundCategory, int PitchShift, int* ExternalRef, VECTORCH* Location)
 
 
261
{
 
 
262
    PlaySound(&AlienSounds, VoiceType, SoundCategory, PitchShift, ExternalRef, Location);
 
 
263
}
 
 
264
 
 
 
265
void PlayPredatorSound(int VoiceType, int SoundCategory, int PitchShift, int* ExternalRef, VECTORCH* Location)
 
 
266
{
248
{
267
    PlaySound(&PredatorSounds, VoiceType, SoundCategory, PitchShift, ExternalRef, Location);
249
    FreeSoundStruct(&MarineSounds);
 
 
250
    FreeSoundStruct(&AlienSounds);
 
 
251
    FreeSoundStruct(&PredatorSounds);
 
 
252
    FreeSoundStruct(&QueenSounds);
268
}
253
}
269
 
254
 
270
void PlayQueenSound(int VoiceType, int SoundCategory, int PitchShift, int* ExternalRef, VECTORCH* Location)
255
void LoadSounds()
271
{
256
{
272
    PlaySound(&QueenSounds, VoiceType, SoundCategory, PitchShift, ExternalRef, Location);
257
    LoadSoundsFromFile(&MarineSounds);
 
 
258
    LoadSoundsFromFile(&AlienSounds);
 
 
259
    LoadSoundsFromFile(&PredatorSounds);
 
 
260
    LoadSoundsFromFile(&QueenSounds);
273
}
261
}
9a76eea2f5a4966f140916a40d0f5bf4b00fb01becea45defab258134a175bcf8a178f1ac7e4243e
1053
 
1053
 
1054
                                if (PlayerStatus.sound_mouth == SOUND_NOACTIVEINDEX) 
1054
                                if (PlayerStatus.sound_mouth == SOUND_NOACTIVEINDEX) 
1055
                                {
1055
                                {
1056
                                    PlayMarineScream(0, MSC_Jump, 0, &PlayerStatus.sound_mouth, NULL);
1056
                                    SpeciesSound(0, MSC_Jump, 0, &PlayerStatus.sound_mouth, NULL, HUMAN_SOUND);
1057
 
1057
 
1058
                                    if(SinglePlayer != AvP.PlayMode)
1058
                                    if(SinglePlayer != AvP.PlayMode)
1059
                                        netGameData.myLastScream = MSC_Jump;
1059
                                        netGameData.myLastScream = MSC_Jump;
...
 
...
 
1070
 
1070
 
1071
                                if (PlayerStatus.sound_mouth == SOUND_NOACTIVEINDEX) 
1071
                                if (PlayerStatus.sound_mouth == SOUND_NOACTIVEINDEX) 
1072
                                {
1072
                                {
1073
                                    PlayPredatorSound(0, PSC_Jump, 0, &PlayerStatus.sound_mouth, NULL);
1073
                                    SpeciesSound(0, PSC_Jump, 0, &PlayerStatus.sound_mouth, NULL, PREDATOR_SOUND);
1074
 
1074
 
1075
                                    if(SinglePlayer != AvP.PlayMode)
1075
                                    if(SinglePlayer != AvP.PlayMode)
1076
                                        netGameData.myLastScream = PSC_Jump;
1076
                                        netGameData.myLastScream = PSC_Jump;
9a76eea2f5a4966f140916a40d0f5bf4b00fb01becea45defab258134a175bcf8a178f1ac7e4243e
4670
                if (hits)
4670
                if (hits)
4671
                {
4671
                {
4672
                    alien_claw(&Player_Weapon_Damage, ONE_FIXED * hits, 2500);
4672
                    alien_claw(&Player_Weapon_Damage, ONE_FIXED * hits, 2500);
4673
                    PlayAlienSound(0, ASC_Swipe, ((FastRandom() & 255) - 128), &weaponHandle, NULL);
4673
                    SpeciesSound(0, ASC_Swipe, ((FastRandom() & 255) - 128), &weaponHandle, &PlayerStatus.sbptr->DynPtr->Position, ALIEN_SOUND);
4674
                }
4674
                }
4675
 
4675
 
4676
                PlayerStatus.WeaponStateTimeOutCounter -= NormalFrameTime;
4676
                PlayerStatus.WeaponStateTimeOutCounter -= NormalFrameTime;
...
 
...
 
4777
                        CauseDamageToObject(Alien_Tail_Target, &Player_Weapon_Damage, multiple, &attack_dir);
4777
                        CauseDamageToObject(Alien_Tail_Target, &Player_Weapon_Damage, multiple, &attack_dir);
4778
                }
4778
                }
4779
 
4779
 
4780
                PlayAlienSound(0, ASC_TailSound, ((FastRandom() & 255) - 128), &weaponHandle, NULL);
4780
                SpeciesSound(0, ASC_TailSound, ((FastRandom() & 255) - 128), &weaponHandle, &PlayerStatus.sbptr->DynPtr->Position, ALIEN_SOUND);
4781
                /* Slower recoil... */
4781
                /* Slower recoil... */
4782
                HModel_ChangeSpeed(&PlayersWeaponHModelController, ONE_FIXED);
4782
                HModel_ChangeSpeed(&PlayersWeaponHModelController, ONE_FIXED);
4783
            }
4783
            }
...
 
...
 
5289
            else if (PlayersWeaponHModelController.keyframe_flags & 1)
5289
            else if (PlayersWeaponHModelController.keyframe_flags & 1)
5290
            {
5290
            {
5291
                MeleeWeapon_90Degree_Front_Core(&TemplateAmmo[AMMO_PRED_WRISTBLADE].MaxDamage, 2500, 0);
5291
                MeleeWeapon_90Degree_Front_Core(&TemplateAmmo[AMMO_PRED_WRISTBLADE].MaxDamage, 2500, 0);
5292
                PlayPredatorSound(0, PSC_Swipe, ((FastRandom() & 255) - 128), &weaponHandle, NULL);
5292
                SpeciesSound(0, PSC_Swipe, ((FastRandom() & 255) - 128), &weaponHandle, &PlayerStatus.sbptr->DynPtr->Position, PREDATOR_SOUND);
5293
            }
5293
            }
5294
 
5294
 
5295
            PlayerStatus.WeaponState = WEAPONSTATE_FIRING_PRIMARY;
5295
            PlayerStatus.WeaponState = WEAPONSTATE_FIRING_PRIMARY;
...
 
...
 
5313
                    CauseDamageToHModel(Trophy->DisplayBlock->HModelControlBlock, Trophy, &TemplateAmmo[AMMO_PRED_TROPHY_KILLSECTION].MaxDamage,
ONE_FIXED, head_sec, NULL, NULL, 0);
5313
                    CauseDamageToHModel(Trophy->DisplayBlock->HModelControlBlock, Trophy, &TemplateAmmo[AMMO_PRED_TROPHY_KILLSECTION].MaxDamage,
ONE_FIXED, head_sec, NULL, NULL, 0);
5314
 
5314
 
5315
                    if (PlayerStatus.sound_mouth == SOUND_NOACTIVEINDEX)
5315
                    if (PlayerStatus.sound_mouth == SOUND_NOACTIVEINDEX)
5316
                        PlayPredatorSound(0, PSC_Taunt, 0, &PlayerStatus.sound_mouth, &PlayerStatus.sbptr->DynPtr->Position);
5316
                        SpeciesSound(0, PSC_Taunt, 0, &PlayerStatus.sound_mouth, &PlayerStatus.sbptr->DynPtr->Position, PREDATOR_SOUND);
5317
 
5317
 
5318
                    CurrentGameStats_TrophyCollected(Trophy);
5318
                    CurrentGameStats_TrophyCollected(Trophy);
5319
                }
5319
                }
...
 
...
 
5322
                    MeleeWeapon_90Degree_Front_Core(&TemplateAmmo[AMMO_HEAVY_PRED_WRISTBLADE].MaxDamage, 2500, 1);
5322
                    MeleeWeapon_90Degree_Front_Core(&TemplateAmmo[AMMO_HEAVY_PRED_WRISTBLADE].MaxDamage, 2500, 1);
5323
                }
5323
                }
5324
 
5324
 
5325
                PlayPredatorSound(0, PSC_Swipe, ((FastRandom()&255)-128), &weaponHandle, &PlayerStatus.sbptr->DynPtr->Position);
5325
                SpeciesSound(0, PSC_Swipe, ((FastRandom()&255)-128), &weaponHandle, &PlayerStatus.sbptr->DynPtr->Position, PREDATOR_SOUND);
5326
            }
5326
            }
5327
            PlayerStatus.WeaponState = WEAPONSTATE_FIRING_SECONDARY;
5327
            PlayerStatus.WeaponState = WEAPONSTATE_FIRING_SECONDARY;
5328
        }
5328
        }
...
 
...
 
5374
            else if (PlayersWeaponHModelController.keyframe_flags & 1)
5374
            else if (PlayersWeaponHModelController.keyframe_flags & 1)
5375
            {
5375
            {
5376
                MeleeWeapon_90Degree_Front_Core(&TemplateAmmo[AMMO_PRED_WRISTBLADE].MaxDamage, 2500, 0);
5376
                MeleeWeapon_90Degree_Front_Core(&TemplateAmmo[AMMO_PRED_WRISTBLADE].MaxDamage, 2500, 0);
5377
                PlayPredatorSound(0, PSC_Swipe, ((FastRandom()&255)-128), &weaponHandle, NULL);
5377
                SpeciesSound(0, PSC_Swipe, ((FastRandom()&255)-128), &weaponHandle, &PlayerStatus.sbptr->DynPtr->Position, PREDATOR_SOUND);
5378
            }
5378
            }
5379
            PlayerStatus.WeaponState = WEAPONSTATE_FIRING_PRIMARY;
5379
            PlayerStatus.WeaponState = WEAPONSTATE_FIRING_PRIMARY;
5380
        }
5380
        }
9a76eea2f5a4966f140916a40d0f5bf4b00fb01becea45defab258134a175bcf8a178f1ac7e4243e
32
#ifdef __cplusplus
32
#ifdef __cplusplus
33
}
33
}
34
#endif
34
#endif
 
 
35
char *FullFilePath(const char *filename);
35
 
36
 
36
#endif
37
#endif
9a76eea2f5a4966f140916a40d0f5bf4b00fb01becea45defab258134a175bcf8a178f1ac7e4243e
170
        MNPCW_TwoPistols,
170
        MNPCW_TwoPistols,
171
        MNPCW_Skeeter,
171
        MNPCW_Skeeter,
172
        MNPCW_MUnarmed,
172
        MNPCW_MUnarmed,
173
        MNPCW_Scientist_A,
 
 
174
        MNPCW_Scientist_B,
 
 
175
        MNPCW_End
173
        MNPCW_End
176
 
174
 
177
    } MARINE_NPC_WEAPONS;
175
    } MARINE_NPC_WEAPONS;
9a76eea2f5a4966f140916a40d0f5bf4b00fb01becea45defab258134a175bcf8a178f1ac7e4243e
24
    ACTIVESOUNDPRIORITY priority;    
24
    ACTIVESOUNDPRIORITY priority;    
25
    int volume;
25
    int volume;
26
    int pitch;
26
    int pitch;
27
    int *externalRef;            
27
    int *externalRef;
 
 
28
    int species;
 
 
29
    int species_category;
28
    unsigned int loop :1;        
30
    unsigned int loop :1;        
29
    unsigned int threedee :1;
31
    unsigned int threedee :1;
30
    unsigned int paused :1;
32
    unsigned int paused :1;
9a76eea2f5a4966f140916a40d0f5bf4b00fb01becea45defab258134a175bcf8a178f1ac7e4243e
1
#ifndef scream_h 
1
#ifndef scream_h 
2
#define scream_h 1
2
#define scream_h 1
3
 
3
 
 
 
4
enum SPECIES_SOUND
 
 
5
{
 
 
6
    ALIEN_SOUND,
 
 
7
    HUMAN_SOUND,
 
 
8
    PREDATOR_SOUND,
 
 
9
    QUEEN_SOUND,
 
 
10
};
 
 
11
 
4
typedef enum sound_category
12
typedef enum sound_category
5
{
13
{
6
    MSC_Angry = 0,
14
    MSC_Angry,
7
    MSC_Panic,
15
    MSC_Panic,
8
    MSC_Pain,
16
    MSC_Pain,
9
    MSC_Death,
17
    MSC_Death,
...
 
...
 
54
{
62
{
55
    QSC_Hiss,
63
    QSC_Hiss,
56
    QSC_Scream_Hurt,
64
    QSC_Scream_Hurt,
57
 
 
 
58
    QSC_Object_Bounce //not actually used by the queen , but only occurs in queen's level
65
    QSC_Object_Bounce //not actually used by the queen , but only occurs in queen's level
59
 
66
 
60
} QUEEN_SOUND_CATEGORY;
67
} QUEEN_SOUND_CATEGORY;
61
 
68
 
62
extern void PlayPredatorSound(int VoiceType, int SoundCategory, int PitchShift, int* ExternalRef, VECTORCH* Location);
69
void SpeciesSound(int VoiceType, int SoundCategory, int PitchShift, int *ExternalRef, VECTORCH* Location, enum SPECIES_SOUND species);
63
extern void PlayMarineScream(int VoiceType, int SoundCategory, int PitchShift, int* ExternalRef, VECTORCH* Location);
70
extern void UnloadSounds();
64
extern void PlayAlienSound(int VoiceType, int SoundCategory, int PitchShift, int* ExternalRef, VECTORCH* Location);
71
extern void LoadSounds();
65
extern void PlayQueenSound(int VoiceType, int SoundCategory, int PitchShift, int* ExternalRef, VECTORCH* Location);
 
 
66
extern void UnloadScreamSounds();
 
 
67
extern void LoadMarineScreamSounds();
 
 
68
extern void LoadAlienScreamSounds();
 
 
69
extern void LoadPredatorScreamSounds();
 
 
70
extern void LoadQueenScreamSounds();
 
 
71
 
72
 
72
#endif
73
#endif