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

[ANY] BlessCurse 1.20


Post New Thread Reply   
 
Thread Tools Display Modes
RedSword
SourceMod Plugin Approver
Join Date: Mar 2006
Location: Quebec, Canada
Old 03-13-2015 , 21:17   Re: [ANY] BlessCurse 1.20
Reply With Quote #11

Hey,

You could replace
Code:
#define DEFAULT_BLESSING_LEVEL 4.0
#define DEFAULT_CURSE_LEVEL 4.0
by ConVars. Also
Code:
IsClientEntity
a client is always an entity, so your function is sementically incorrect. On L122 you could be using MaxClients instead of MAXPLAYERS; you're over-looping.

You could also change your forum compiler version so people could use the "Get Plugin" button rather than download your .smx.

For approval please fix the following :`

In that same loop, if a blessed/cursed user disconnected, he'll still be considered Cursed/Blessed, so he'll still have his PlayerBlessCurseLevels value != 1.0, meaning you'll be using %N on a disconnected client --> ERROR.

Red
__________________
My plugins :
Red Maze
Afk Bomb
RAWR (per player/rounds Awp Restrict.)
Kill Assist
Be Medic

You can also Donate if you appreciate my work
RedSword is offline
sneakret
Member
Join Date: Jul 2012
Old 03-19-2015 , 04:32   Re: [ANY] BlessCurse 1.20
Reply With Quote #12

I forgot I'd even posted this.

You're right about MaxClients. I think that's fixed in the current version, but I don't use it or intend to publish it. If you want to adopt this plugin and maintain it, feel free.

I also agree that having the defaults be cvars would be handy.

I'm on a tablet at the moment, and don't have the code I front of me, but I am pretty sure the %N won't be hit for a disconnected player. It's probably prevented by an "IsClientEntity" check.

IsClientEntity means "is this entity a client?" An entity that is a client can reasonably be called a "client entity." It is not semantically incorrect, but I can see how it could seem that way. I could also write a function called "IsClientUserId", to find out if the given user ID belonged to an active client.

Last edited by sneakret; 03-19-2015 at 04:32.
sneakret is offline
RedSword
SourceMod Plugin Approver
Join Date: Mar 2006
Location: Quebec, Canada
Old 03-19-2015 , 12:21   Re: [ANY] BlessCurse 1.20
Reply With Quote #13

Quote:
Originally Posted by sneakret View Post
I'm on a tablet at the moment, and don't have the code I front of me, but I am pretty sure the %N won't be hit for a disconnected player. It's probably prevented by an "IsClientEntity" check. [...]
If you look at the OnShowBlessedCmd callback (sm_blessed), you can see that no IsClientEntity is being called. I also got the following error by testing (seems also that your VFormat usage is incorrect) :

Spoiler


(note that the line number differ by 1 since I removed TF2 dependency)

and

Quote:
Originally Posted by sneakret View Post
You're right about MaxClients. I think that's fixed in the current version, but I don't use it or intend to publish it. If you want to adopt this plugin and maintain it, feel free.
If I understand correctly by your 2nd & 3rd sentences you mean that you won't update your plugin (instead of just the "MaxClients" thing). I'll unapprove your plugin then.

Red
__________________
My plugins :
Red Maze
Afk Bomb
RAWR (per player/rounds Awp Restrict.)
Kill Assist
Be Medic

You can also Donate if you appreciate my work

Last edited by RedSword; 03-19-2015 at 12:24.
RedSword is offline
RedSword
SourceMod Plugin Approver
Join Date: Mar 2006
Location: Quebec, Canada
Old 09-08-2015 , 12:16   Re: [ANY] BlessCurse 1.20
Reply With Quote #14

Changing status from "Ready for review" to "(none)", since there is no will to correct it & last edit was in 2012.
__________________
My plugins :
Red Maze
Afk Bomb
RAWR (per player/rounds Awp Restrict.)
Kill Assist
Be Medic

You can also Donate if you appreciate my work
RedSword is offline
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 02:06.


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