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...
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:
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?
I just would look up to Poet's tutorial related to this, since it contains the answer for this exactly...
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