Raised This Month: $ Target: $400
 0% 

DeathMsg Fix v1.0.3


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Lord_Destros
Veteran Member
Join Date: Jul 2004
Location: With stupid.
Old 02-14-2007 , 15:19   Re: DeathMsg Fix
Reply With Quote #1

Quote:
Originally Posted by Simon Logic View Post
Yes of course. This bug occures only under CS. Under HLDM everything is fine.

Hence my point. Why would anyone run this if they aren't using CS. They probably SHOULD get a bad load rather than having a plugin load that does nothing.

You still don't understand what this plugin does. It fixes a BUG when a player got critical Damage but DeathMsg were not sent by the server. Normally DeathMsg is called before critical Damage event.


It's a result of optimized boolean expression (may be you've heard about boolean algebra) thus it may be hard to understand an expression. By the way, i always test my plugins before posting them here.
1. Hence my point. Why would anyone run this if they aren't using CS. They probably SHOULD get a bad load rather than having a plugin load that does nothing.

2. Yeah I misunderstood that

3. if(!(is_user_alive(id) || g_bDeathMsg[id] || g_bCriticalDamage[id])) is the same as
if(!is_user_alive(id) && !g_bDeathMsg[id] && !g_bCriticalDamage[id])
which always appears to return true (assuming 'id' was killed) since every time ResetHUD you set both of them to false.

EDIT:

Shouldn't you also call client_disconnect to ensure the boolean variables are reset to false (If they disconnect before ResetHUD is called)?
__________________
Quote:
Originally Posted by Twilight Suzuka
Don't worry m'lord. The turtles day will come.

Last edited by Lord_Destros; 02-14-2007 at 22:39. Reason: Forgot a closing parenthesis.
Lord_Destros is offline
Send a message via AIM to Lord_Destros
Simon Logic
Senior Member
Join Date: Nov 2006
Location: RF
Old 02-15-2007 , 03:57   Re: DeathMsg Fix
Reply With Quote #2

Quote:
Originally Posted by Lord_Destros View Post
1. Hence my point. Why would anyone run this if they aren't using CS. They probably SHOULD get a bad load rather than having a plugin load that does nothing.
First of all, too many people still can't read attentively. They easily may miss the point that this plugin is for CS only. So question like "Why would anyone run this if they aren't using CS" should never occure. Secondly, the primary rule of good programming habits is to handle every error if possible and print user friendly desciptions (not like those the microsoft put into event log =) ).

Quote:
Originally Posted by Lord_Destros View Post
3. if(!(is_user_alive(id) || g_bDeathMsg[id] || g_bCriticalDamage[id])) is the same as
if(!is_user_alive(id) && !g_bDeathMsg[id] && !g_bCriticalDamage[id])
which always appears to return true (assuming 'id' was killed) since every time ResetHUD you set both of them to false.
onPlayerSpawn() is called on alive players only. g_bCriticalDamage was introduced to filter out other Damage events after a bug was catched. Otherwise my plugin could send more than one DeathMsg during single death.

Quote:
Originally Posted by Lord_Destros View Post
Shouldn't you also call client_disconnect to ensure the boolean variables are reset to false (If they disconnect before ResetHUD is called)?
Simple answer - try/test it. I suppose it can not occure.

Yesterday i discovered that this plugin fixes DeathMsg absence for C4 kill. So if you're using plugin which allows to plant C4 everywhere, may be it's for you too. By the way, this plugin may be incompatible with VEN's Bomb Explosion Features.
__________________
my modest stuff: AXN 1.6.1 | plugins | bsp2csdm

Last edited by Simon Logic; 02-15-2007 at 04:28.
Simon Logic is offline
Send a message via Skype™ to Simon Logic
Lord_Destros
Veteran Member
Join Date: Jul 2004
Location: With stupid.
Old 02-15-2007 , 09:01   Re: DeathMsg Fix
Reply With Quote #3

Quote:
Originally Posted by Simon Logic View Post
First of all, too many people still can't read attentively. They easily may miss the point that this plugin is for CS only. So question like "Why would anyone run this if they aren't using CS" should never occure. Secondly, the primary rule of good programming habits is to handle every error if possible and print user friendly desciptions (not like those the microsoft put into event log =) ).
You never printed a user friendly description of that error XD, you just had it run and do nothing if the server isn't running CS.
__________________
Quote:
Originally Posted by Twilight Suzuka
Don't worry m'lord. The turtles day will come.
Lord_Destros is offline
Send a message via AIM to Lord_Destros
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 18:04.


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