Raised This Month: $ Target: $400
 0% 

CS:GO Quirks


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
psychonic

BAFFLED
Join Date: May 2008
Old 12-02-2012 , 12:50   CS:GO Quirks
Reply With Quote #1

I've typed up a wiki article with some of the quirks when coding for CS:GO, including workarounds for some things and just a bunch of info overall.

http://wiki.alliedmods.net/CSGO_Quirks

Feel free to add to or improve on it (or improve the formatting as it's horrendous for reading through).

Last edited by psychonic; 12-02-2012 at 12:57.
psychonic is offline
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 12-02-2012 , 12:53   Re: CS:GO Quirks
Reply With Quote #2

Thanks psy Much appreciated
__________________
View my Plugins | Donate
TnTSCS is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 12-02-2012 , 13:08   Re: CS:GO Quirks
Reply With Quote #3

Is GetMaxHumanPlayers supported across all games, or is it in the cstrike module?
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 12-02-2012 , 14:24   Re: CS:GO Quirks
Reply With Quote #4

If you're going to add to it, please remember it's a page of technical information and should be written as-such.

Quote:
Originally Posted by Powerlord View Post
Is GetMaxHumanPlayers supported across all games, or is it in the cstrike module?
All games, hence why it isn't prefixed. It's only possible to be different from MaxClients in L4D+.
__________________
asherkin is offline
psychonic

BAFFLED
Join Date: May 2008
Old 12-02-2012 , 14:41   Re: CS:GO Quirks
Reply With Quote #5

Quote:
Originally Posted by Powerlord View Post
Is GetMaxHumanPlayers supported across all games, or is it in the cstrike module?
Quote:
Originally Posted by asherkin View Post
If you're going to add to it, please remember it's a page of technical information and should be written as-such.


All games, hence why it isn't prefixed. It's only possible to be different from MaxClients in L4D+.
To clarify:

from http://hg.alliedmods.net/sourcemod-c...ients.inc#l212
/**
* Returns the maximum number of human players allowed on the server. This is
* a game-specific function used on newer games to limit the number of humans
* that can join a game and can be lower than MaxClients. It is the number often
* reflected in the server browser or when viewing the output of the status command.
* On unsupported games or modes without overrides, it will return the same value
* as MaxClients.
*
* You should not globally cache the value to GetMaxHumanPlayers() because it can change across
* game modes. You may still cache it locally.
*
* @return Maximum number of humans allowed.
*/

The function behind it only exists on L4D and later, and it's game specific, backed by gamerules in the games that use it. (L4D, L4D2, and CS:GO). In engines that does have it or on games that don't implement it (ND, Swarm), it will be the same value as MaxClients.
psychonic is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 12-02-2012 , 20:29   Re: CS:GO Quirks
Reply With Quote #6

Thanks!
__________________
Peace-Maker is offline
StrikerMan780
AlliedModders Donor
Join Date: Jul 2009
Location: Canada
Old 11-09-2013 , 19:46   Re: CS:GO Quirks
Reply With Quote #7

Sorry for the bump, but I need to ask, does the issue with the sounds still apply? Just curious if Valve had fixed that yet or not. I had given up on CS:GO modding for a while since so many things are broken. (Ie. No Overlays, custom sound issue, etc.) Plus, I got tired of making a ton of IF checks for one of my cross-game-compatible plugins.

Last edited by StrikerMan780; 11-09-2013 at 19:50.
StrikerMan780 is offline
psychonic

BAFFLED
Join Date: May 2008
Old 11-09-2013 , 19:57   Re: CS:GO Quirks
Reply With Quote #8

Quote:
Originally Posted by StrikerMan780 View Post
Sorry for the bump, but I need to ask, does the issue with the sounds still apply? Just curious if Valve had fixed that yet or not.
Yes, it still applies. There's nothing to "fix"; newer games just use a newer soundcaching system that just isn't made to allow new sounds on-the-fly for performance reasons.

Last edited by psychonic; 11-09-2013 at 19:58.
psychonic is offline
StrikerMan780
AlliedModders Donor
Join Date: Jul 2009
Location: Canada
Old 11-09-2013 , 21:01   Re: CS:GO Quirks
Reply With Quote #9

They really should have considered that server owners might have wanted to use their own sounds, and have the game add new sounds downloaded from servers to the cache automatically on map-load (would only needed to be done once). With the way things are now, you cannot use the different sound type prefixes other than *. (So Stereo sounds with panning are not possible, neither are Distance-based sounds)

Even if it isn't "technically" broken, I still consider it broken, considering you have to use cheap workarounds for something that should "just work", and ESPECIALLY considering that they allow file/sound downloads from servers in the first place. I also consider it very inconsistent with the other Source Engine games, new sound system or not.

Last edited by StrikerMan780; 11-09-2013 at 21:11.
StrikerMan780 is offline
Lordearon
Member
Join Date: Jan 2013
Location: Vietnam
Old 11-16-2013 , 02:58   Re: CS:GO Quirks
Reply With Quote #10

also, calling CS_DropWeapon with the c4 index on a client after bomb_beginplant event causes the CSGO server to crash - don't have a workaround yet,

EDIT: TnTSCS actually has a workaround where he calls the Dissabled method on the bombsite entity with AcceptEntityInput.
Read more about it here: https://forums.alliedmods.net/showth...91#post2061162

Last edited by Lordearon; 11-16-2013 at 03:02.
Lordearon 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 05:38.


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