Cs gamerules: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 1: Line 1:
{{stub}}
{{stub}}
{{ent not in fgd|codeonly=1}}
{{Ent not in fgd|codeonly=1}}
{{CD|CCSGameRulesProxy|file1=cs_gamerules.cpp}}
{{CD|CCSGameRulesProxy|file1=cs_gamerules.cpp}}
{{this is a|entity|name=cs_gamerules|game=Counter-Strike: Source|game1=Left 4 Dead series}} It controls game rules and logic, including which team wins due to either eliminating the other, or completing the objective.
{{This is a|logical entity|name=cs_gamerules|game=Counter-Strike: Source|game1=Left 4 Dead series}} It controls game rules and logic, including which team wins due to either eliminating the other, or completing the objective.
{{PreservedEnt|cs_gamerules}}
{{PreservedEnt|cs_gamerules}}


This entity is also present in {{l4d|4}} and {{l4d2|4}}, alongside [[terror_gamerules]] with its own additional game rules.
This entity is also present in {{l4d|4}} and {{l4d2|4}}, alongside [[terror_gamerules]] with its own additional game rules.

Revision as of 04:20, 29 April 2025

Stub

This article or section is a stub. You can help by expanding it.

Icon-NotInFGD.png
This entity is not in the FGD by default.
It should not be put directly in a map because it can only be configured through code.
C++ Class hierarchy
CCSGameRulesProxy
CGameRulesProxy
CBaseEntity
C++ cs_gamerules.cpp

cs_gamerules is a logical entity available in Counter-Strike: Source Counter-Strike: Source and Left 4 Dead seriesLeft 4 Dead series Left 4 Dead series. It controls game rules and logic, including which team wins due to either eliminating the other, or completing the objective.

Icon-Important.pngImportant:This is a preserved entity in Counter-Strike: SourceCounter-Strike: Global Offensive.
If the game has round restart mechanics this entity may not behave as expected:
More info
  • On a new round entities with this classname will intentionally not reset. You can use logic_auto to emulate resetting it.
  • Killing it removes it forever, as it is not respawned on a new round.
  • It cannot be spawned with a point_template.
  • Parenting this with non-preserved entities may have undesirable effects.

This entity is also present in Left 4 Dead Left 4 Dead and Left 4 Dead 2 Left 4 Dead 2, alongside terror_gamerules with its own additional game rules.