Raised This Month: $94 Target: $400
 23% 

Bullet Whizz


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff        Approver:   Xanimos (85)
Cheap_Suit
Veteran Member
Join Date: May 2004
Old 06-14-2006 , 03:25   Bullet Whizz
Reply With Quote #1

.: Description :.
Now you can hear bullets fly by if an enemy is shooting at you. This seriously add suspense to cs.
Anyhow, I just wanted to test the new stock function KoST made for me.


.: Cvars :.
amx_bulletwhizz (D: 1) - on/off plugin
amx_bulletwhizz_dis (D: 35) - max distance to hear the whizz sound


.: Sound Files :.
- misc/whizz1.wav
- misc/whizz2.wav
- misc/whizz3.wav
- misc/whizz4.wav
- misc/whizz5.wav


.: Module(s) Required :.
  • Fakemeta
  • Engine
Attached Files
File Type: zip whizz_sounds.zip (88.7 KB, 27899 views)
File Type: sma Get Plugin or Get Source (Bullet_Whizz.sma - 28340 views - 3.8 KB)
__________________
HDD fried, failed to backup files. Sorry folks, just don't have free time anymore. This is goodbye.

Last edited by Cheap_Suit; 06-26-2006 at 18:31.
Cheap_Suit is offline
ThomasNguyen
Senior Member
Join Date: May 2006
Old 06-14-2006 , 03:28  
Reply With Quote #2

Nice.
__________________
ThomasNguyen is offline
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 06-14-2006 , 03:36  
Reply With Quote #3

Good job again. Like the origionality/realism.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
chowdown
Member
Join Date: Nov 2005
Old 06-14-2006 , 04:40  
Reply With Quote #4

I like it. Makes the game more interesting to play, and helps you out if you are getting shot at.
__________________
woot
chowdown is offline
Send a message via AIM to chowdown
Cheap_Suit
Veteran Member
Join Date: May 2004
Old 06-14-2006 , 15:28  
Reply With Quote #5

Small update.

Btw, this is not useless
__________________
HDD fried, failed to backup files. Sorry folks, just don't have free time anymore. This is goodbye.
Cheap_Suit is offline
KoST
Senior Member
Join Date: Jul 2005
Old 06-14-2006 , 15:50  
Reply With Quote #6

are u using fm_is_ent_visible because of this case?

Code:
|
|  o <- Victim
|
|
-------------------(Wall)
<Aim>
|
|
|
|
|
<Me>
__________________
KoST is offline
Cheap_Suit
Veteran Member
Join Date: May 2004
Old 06-14-2006 , 15:55  
Reply With Quote #7

Code:
stock bool:is_user_visible(id, target) {     new Float:myOrigin[3]     entity_get_vector(id, EV_VEC_origin, myOrigin)         new Float:fViewOfs[3]     entity_get_vector(id, EV_VEC_view_ofs, fViewOfs)         new Float:targetOrigin[3]     entity_get_vector(target, EV_VEC_origin, targetOrigin)         new Float:EyesPos[3]     xs_vec_add(myOrigin, fViewOfs, EyesPos)     new Float:hitOrigin[3]     new hitIndex = trace_line(id, EyesPos, targetOrigin, hitOrigin)         if(hitIndex == target) {         return true     }     return false }

Quote:
Originally Posted by VEN
Code:
fm_is_visible(index, const Float:point[3])
As you can see that function checks whether given point is visible to an entity/player.
If point is an origin of the other player it's not visible because it's enclosed into the solid box.
So function works as it should work.

Your function should work for all solid target-entities except SOLID_TRIGGER.

EDIT:

I implemented
Code:
bool:fm_is_ent_visible(index, entity)
which compatible with all entity solidity types.
Now you can check for any entity <-> entity visiblity.
PS: I might have miss understood you. Yea I used fm_is_user_visible because of that.
__________________
HDD fried, failed to backup files. Sorry folks, just don't have free time anymore. This is goodbye.
Cheap_Suit is offline
KoST
Senior Member
Join Date: Jul 2005
Old 06-14-2006 , 16:42  
Reply With Quote #8

[edit]

Code:
--------------<Aim>-------------- plane 1
                ^
                |
                | (me_aim vector)
                |
                |
--------------<Me>-------------- plane 2
you can imagine this like two planes which have me_aim as normal vector. this stock only returns positive values if victim is between them. no need to check for visibility i guess..

Code:
stock get_distance_to_line(Float:pos_start[3], Float:pos_end[3], Float:pos_object[3]) {     new Float:vec_start_end[3], Float:vec_start_object[3], Float:vec_end_object[3], Float:vec_end_start[3]     xs_vec_sub(pos_end, pos_start, vec_start_end) // vector from start to end     xs_vec_sub(pos_object, pos_start, vec_start_object) // vector from end to object     xs_vec_sub(pos_start, pos_end, vec_end_start) // vector from end to start     xs_vec_sub(pos_end, pos_object, vec_end_object) // vector object to end         new Float:len_start_object = getVecLen(vec_start_object)     new Float:angle_start = floatacos(xs_vec_dot(vec_start_end, vec_start_object) / (getVecLen(vec_start_end) * len_start_object), degrees)     new Float:angle_end = floatacos(xs_vec_dot(vec_end_start, vec_end_object) / (getVecLen(vec_end_start) * getVecLen(vec_end_object)), degrees)     if(angle_start <= 90.0 && angle_end <= 90.0)         return floatround(len_start_object * floatsin(angle_start, degrees))     return -1 }

it checks if alpha and beta are <=90 degrees if c is victim. if one of them is larger then we are outside the planes.
__________________
KoST is offline
Cheap_Suit
Veteran Member
Join Date: May 2004
Old 06-14-2006 , 17:15  
Reply With Quote #9

ic, thanks.
__________________
HDD fried, failed to backup files. Sorry folks, just don't have free time anymore. This is goodbye.
Cheap_Suit is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-14-2006 , 18:01  
Reply With Quote #10

Works perfectly.

Thanks.
Arkshine is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:25.


Powered by vBulletin®
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Theme made by Freecode