Raised This Month: $32 Target: $400
 8% 

[CS] M3 & XM1014 damage type bit(s)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Rirre
Veteran Member
Join Date: Nov 2006
Old 07-02-2015 , 14:44   [CS] M3 & XM1014 damage type bit(s)
Reply With Quote #1

This is working for all weapons except if the victim got hit by a shotgun.
Code:
#define DMG_BULLET      (1 << 1) #define DMG_NEVERGIB        (1 << 12) #define DMG_GRENADE  (1 << 24) int TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType ) {     if ( bitsDamageType & (DMG_BULLET | DMG_NEVERGIB | DMG_GRENADE) )     {         //...     } }
So what's the bit(s) for the shotgun(s)?

Last edited by Rirre; 07-02-2015 at 14:47.
Rirre is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viña del Mar, Chile
Old 07-02-2015 , 19:26   Re: [CS] M3 & XM1014 damage type bit(s)
Reply With Quote #2

Actually, DMG_BULLET | DMG_NEVERGIB is shotgun bullet's damagetype
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
Rirre
Veteran Member
Join Date: Nov 2006
Old 07-14-2015 , 08:08   Re: [CS] M3 & XM1014 damage type bit(s)
Reply With Quote #3

Yeah it works fine without parentheses, thanks

Last edited by Rirre; 07-14-2015 at 08:09.
Rirre is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viña del Mar, Chile
Old 07-17-2015 , 02:00   Re: [CS] M3 & XM1014 damage type bit(s)
Reply With Quote #4

Quote:
Originally Posted by Rirre View Post
Yeah it works fine without parentheses, thanks
Sure? Maybe you're doing everytime a true condition

PHP Code:
if( 1&0|1|1|// 1&0 == 0, 0|1 == 1, ... 
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 10-12-2015 , 01:56   Re: [CS] M3 & XM1014 damage type bit(s)
Reply With Quote #5

Quote:
Originally Posted by meTaLiCroSS View Post
Sure? Maybe you're doing everytime a true condition

PHP Code:
if( 1&0|1|1|// 1&0 == 0, 0|1 == 1, ... 
Numbers computed by | are usually computed first.

So

PHP Code:
<< << << << 
Must be the same with

PHP Code:
30 

Last edited by claudiuhks; 10-12-2015 at 11:40.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
Reply



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 23:27.


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