Raised This Month: $51 Target: $400
 12% 

[CS:S, CS:GO] Roll The Dice (Würfeln)


Post New Thread Reply   
 
Thread Tools Display Modes
dordnung
Veteran Member
Join Date: Apr 2010
Old 02-06-2013 , 05:04   Re: [CS:S, CS:GO] Roll The Dice (Würfeln)
Reply With Quote #51

UPDATE

Code:
1.5 - Moved precaches to OnMapStart()
     - Fixed bug, that other team see the text
     - Changed colors for CS:GO
     - Fixed infinite loop on missing config
@Sheepdude

Now it should be fixed anyway ^^ Thanks for approving!
__________________

Last edited by dordnung; 02-06-2013 at 05:08.
dordnung is offline
Sheepdude
SourceMod Donor
Join Date: Aug 2012
Location: Chicago
Old 02-06-2013 , 09:16   Re: [CS:S, CS:GO] Roll The Dice (Würfeln)
Reply With Quote #52

It's a nice plugin, the effects are really fun and detailed.

In my OCD brain I was trying to think of a way to optimize that random loop for cases when very few options are enabled (worst-case scenario: only 1 option is enabled), since theoretically, landing on an enabled number could never occur (if you ignore statistical certainty as n increases), or, at least, it could take a long time. So I came up with this:

Code:
DiceNow(client)
{
	new number, count;
	number = count = GetRandomInt(1, 25);
	while(!EnabledNumbers[number])
	{
		if(number == 25)
			number = 0;
		else
			number = number % 25 + 1;
		if(number == count) // Looped through every number without finding a match
			return;
	}
...
That reduces the loop complexity to O(n) (at most 25 iterations), and solves the unusual bug that creates an infinite loop if the user has stupidly set their config to disable every option. It's slightly less random than what you have now, since a large group of closely-numbered disabled options will tend toward the same result, but it's just a suggestion. =P
__________________
Sheepdude is offline
dordnung
Veteran Member
Join Date: Apr 2010
Old 02-06-2013 , 09:49   Re: [CS:S, CS:GO] Roll The Dice (Würfeln)
Reply With Quote #53

Hey, that is a very good idea^^

I immediately added it!
__________________
dordnung is offline
Sheepdude
SourceMod Donor
Join Date: Aug 2012
Location: Chicago
Old 02-06-2013 , 09:58   Re: [CS:S, CS:GO] Roll The Dice (Würfeln)
Reply With Quote #54

Oh, except it should be:

Code:
		if (number == 25)
			number = 1;
Whoops. =3
__________________
Sheepdude is offline
dordnung
Veteran Member
Join Date: Apr 2010
Old 02-06-2013 , 10:57   Re: [CS:S, CS:GO] Roll The Dice (Würfeln)
Reply With Quote #55

eh, sure^^

Changed it^^
__________________
dordnung is offline
rmrf
New Member
Join Date: Jan 2013
Old 02-18-2013 , 04:15   Re: [CS:S, CS:GO] Roll The Dice (Würfeln)
Reply With Quote #56

Hey,

Thanks for the great plugin! Just somethings I noted about it:

1) M3 doesn't exist in CS:GO, maybe add some CSS vs CSGO flags?
Code:
#define UNKNOWN 0
#define GAME_CSTRIKE  1
#define GAME_CSGO   2

decl String:gdir[PLATFORM_MAX_PATH];
GetGameFolderName(gdir, sizeof(gdir));
if (StrEqual(gdir, "cstrike", false))   game = GAME_CSTRIKE; else
if (StrEqual(gdir, "csgo", false))    game = GAME_CSGO; else
game = UNKNOWN;
Then just have a switch for whenever you need to evaluate 'game.' For my fix for this, since I'll only use this plugin for CSGO, I just changed the weapon to weapon_Sawedoff.

2) There might be something weird with one of the speed upgrades. I've had two friends tell me that when the received it their view began shaking quite a lot to the point of it being unplayable.

I'm running this plugin on CSGO with the latest snapshots for MMSource, SMod, and SDKHooks

Well that's all that I noticed for now. Again, thanks for the great plugin and actually maintaining it!

Last edited by rmrf; 02-18-2013 at 04:26.
rmrf is offline
dordnung
Veteran Member
Join Date: Apr 2010
Old 02-18-2013 , 04:48   Re: [CS:S, CS:GO] Roll The Dice (Würfeln)
Reply With Quote #57

1)

According to valve there have to be a M3 in CS:GO (https://developer.valvesoftware.com/...nsive_Entities)

2) I will take a look at it
__________________
dordnung is offline
VJScope
Senior Member
Join Date: Jul 2012
Location: Finland
Old 02-18-2013 , 21:48   Re: [CS:S, CS:GO] Roll The Dice (Würfeln)
Reply With Quote #58

I have some ideas if you have time:

RTD should cost money = if you use RTD, you spend some of your money. This could be a convar.

effects:
Froggy Legs (I love this! You get to jump twice. Once while in the air.)
Ghost Rider (A bit speed and burns all the time. Maybe hp up to 150?)
Backwards (Same effect as sv_accelerate -5. If you can make it so it effects only one player it would be amazing!)
Ice Skater (Changes of sv_friction.)
Berserker (Knife only and kills player with one hit. Maybe like in CSS?)
Invisible Man

Here's a good start!
__________________
Strange women lying in ponds distributing swords is no basis for a system of government. Supreme executive power derives from a mandate from the masses, not from some farcical aquatic ceremony.
VJScope is offline
dordnung
Veteran Member
Join Date: Apr 2010
Old 02-19-2013 , 11:42   Re: [CS:S, CS:GO] Roll The Dice (Würfeln)
Reply With Quote #59

UPDATE

Code:
1.55 - Added Feature 26-30 (see first post)
     - Fixed bug, that wrong text is shown
     - Added cvar dice_money and dice_count 
     - Fixed NoClip Timer bug
     - Fixed translation mistakes
@VJScope

sv_accelerate and sv_friction can't be changed clientside ): and also burning a player always take damage
__________________

Last edited by dordnung; 02-19-2013 at 12:10.
dordnung is offline
rmrf
New Member
Join Date: Jan 2013
Old 02-19-2013 , 18:34   Re: [CS:S, CS:GO] Roll The Dice (Würfeln)
Reply With Quote #60

Quote:
Originally Posted by Popoklopsi View Post
1)

According to valve there have to be a M3 in CS:GO (https://developer.valvesoftware.com/...nsive_Entities)

2) I will take a look at it
Code:
Can't create weapon weapon_m3 in GiveNamedItem!
Well not sure why they would list it there but I've never seen it in any game. If you're looking for the autoshotty it's called XM1014 now. But personally I think it'd be better to give a player the sawedoff over the auto-shotgun.

Also, updated the plugin with your latest update and things seem to run pretty well! I haven't heard anything about any speed increase glitches today either.

Thanks!
rmrf 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 19:12.


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