AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Snippets and Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=112)
-   -   CS:GO Quirks (https://forums.alliedmods.net/showthread.php?t=202256)

psychonic 12-02-2012 12:50

CS:GO Quirks
 
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).

TnTSCS 12-02-2012 12:53

Re: CS:GO Quirks
 
Thanks psy :) Much appreciated

Powerlord 12-02-2012 13:08

Re: CS:GO Quirks
 
Is GetMaxHumanPlayers supported across all games, or is it in the cstrike module?

asherkin 12-02-2012 14:24

Re: CS:GO Quirks
 
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 (Post 1847239)
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+.

psychonic 12-02-2012 14:41

Re: CS:GO Quirks
 
Quote:

Originally Posted by Powerlord (Post 1847239)
Is GetMaxHumanPlayers supported across all games, or is it in the cstrike module?

Quote:

Originally Posted by asherkin (Post 1847284)
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.

Peace-Maker 12-02-2012 20:29

Re: CS:GO Quirks
 
Thanks!

StrikerMan780 11-09-2013 19:46

Re: CS:GO Quirks
 
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.

psychonic 11-09-2013 19:57

Re: CS:GO Quirks
 
Quote:

Originally Posted by StrikerMan780 (Post 2058939)
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.

StrikerMan780 11-09-2013 21:01

Re: CS:GO Quirks
 
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.

Lordearon 11-16-2013 02:58

Re: CS:GO Quirks
 
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


All times are GMT -4. The time now is 18:28.

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