Wolf3d Haven Forum

Please log in or register. Smile
Wolf3d Haven Forum

A friendly Wolfenstein 3D community, about Wolfenstein 3D, the game that gave birth to first person shooters...


    [Solved] SDL Bullet Tracing - madenoise trouble

    Share

    kkk911
    Don't Hurt Me!
    Don't Hurt Me!

    Male
    Number of posts : 61
    Age : 19
    Location : Hungary
    Hobbie : Modding, Photography, Gaming, collecting scale modells
    Registration date : 2012-03-25

    [Solved] SDL Bullet Tracing - madenoise trouble

    Post by kkk911 on Sat Dec 20, 2014 10:01 am

    EDIT: Ohh, man...how much a dumbass i am? xD
    I just would look up to Poet's tutorial related to this, since it contains the answer for this exactly... No
    Anyway, here is the post:

    Hello there!
    So i've tried out AulmiuN's Bullet Tracing - For SDL! code, which can be found at Diehard Wolfers.
    It worked pretty much, but when i'm tried to make a gun silenced, a little problem came in.

    What i've done is deleting the "madenoise = true;" line from the 'GunAttack" function, then insterting this line to all the weapons, that i don't want to be silenced, like this:
    Code:
    {

    switch (gamestate.weapon)
    {
    case wp_pistol:
    SD_PlaySound (ATKPISTOLSND);
    madenoise = true;
    break;
    case wp_machinegun:
    SD_PlaySound (ATKMACHINEGUNSND);
    madenoise = true;
    break;
    case wp_chaingun:
    SD_PlaySound (ATKGATLINGSND);
    madenoise = true;
    break;
    case wp_rifle:
    SD_PlaySound (SHOOTSND);
    break;
    case wp_rocket:
    SD_PlaySound (MISSILEFIRESND);
    madenoise = true;
    break;
    }

    Now, when i fire with the "rifle", the enemies doesn't hear it, but when i shoot and kill an enemy with it, all the others are starts chasing me. (or they gets alarmed, etc....)

    Is there a way to fix this?


    Last edited by kkk911 on Mon Jan 05, 2015 8:24 am; edited 1 time in total

    ronwolf1705
    Hardcore Wolfer
    Hardcore Wolfer

    Male
    Number of posts : 1252
    Age : 25
    Registration date : 2007-03-26

    Re: [Solved] SDL Bullet Tracing - madenoise trouble

    Post by ronwolf1705 on Sat Dec 20, 2014 10:50 am

    In WL_STATE, search for DamageActor. There is a 'madenoise = true' in the DamageActor function that should be deleted. What that line does is that upon hitting an enemy noise is made, therefore enemies get alerted. Deleting that line should fix it.




    kkk911
    Don't Hurt Me!
    Don't Hurt Me!

    Male
    Number of posts : 61
    Age : 19
    Location : Hungary
    Hobbie : Modding, Photography, Gaming, collecting scale modells
    Registration date : 2012-03-25

    Re: [Solved] SDL Bullet Tracing - madenoise trouble

    Post by kkk911 on Sat Dec 20, 2014 12:10 pm

    Okay, tried it and everything worked fine now!

    Thanks a lot! Smile

    Sponsored content

    Re: [Solved] SDL Bullet Tracing - madenoise trouble

    Post by Sponsored content Today at 7:50 pm


      Current date/time is Sat Dec 03, 2016 7:50 pm