This article's documentation is for the "GoldSrc" engine. Click here for more information.
This article's documentation is for anything that uses the Source engine. Click here for more information.

Deathmatch: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(It's this check, for sure. It is also what stops CRevertSaved::LoadThink( void ) from running.)
m (That newline looks better with the CVAR's description)
 
(9 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{Orphan|date=January 2024}}
{{stub}}
{{stub}}
{{this is a|console variable|name=deathmatch|engine=GoldSrc|engine1=Source}}


{{this is a|console variable|name=deathmatch|engine=GoldSrc|engine1=Source}} It is a leftover from {{Quake|2}} used to tell the server whether the current session is in multiplayer or not, using the <code>( g_pGameRules->IsDeathmatch() )</code> check.
It is a leftover from {{Quake|2}} used to tell the server whether the current session is in multiplayer or not, using the <code>( g_pGameRules->IsDeathmatch() )</code> check.


For the game mode, see [[Deathmatch Map Design Theory]].
For the game mode, see [[Deathmatch Map Design Theory]].


== Effects in GoldSrc ==
== Effects in GoldSrc ==
Enables multiplayer mode, regardless of whether multiplayer is actually a deathmatch game.
Enabling the <code>deathmatch</code> console variable is essential for the proper functionality of {{ent|Info_player_deathmatch|eng=goldsrc}} as otherwise, players will spawn at a random {{ent|info_player_start|eng=goldsrc}} or at the map's origin <code>(0,0,0)</code>.
Enabling the <code>deathmatch</code> console variable is essential for the proper functionality of {{ent|Info_player_deathmatch|eng=goldsrc}} as otherwise, players will spawn at a random {{ent|info_player_start|eng=goldsrc}} or at the map's origin <code>(0,0,0)</code>.


This command also allows weapons and ammunition to respawn, with every <code>weapon_</code> and <code>ammo_</code> entity taking 20 seconds to respawn. When creating a deathmatch map, it should also be taken into account that standing at a respawn point of an item still allows it to spawn and be repeatedly picked up, this means that players should be encouraged to keep moving around instead of sticking in one spot.
This command also allows weapons and ammunition to respawn, with every <code>weapon_</code> and <code>ammo_</code> entity taking 20 seconds to respawn. When creating a deathmatch map, it should also be taken into account that standing at a respawn point of an item still allows it to spawn and be repeatedly picked up, this means that players should be encouraged to keep moving around instead of sticking in one spot.
If any entity has spawnflag 2048 ("not in deathmatch") enabled, it will not appear when deathmatch is enabled. This is hardcoded on an engine level, and as such applies to all entities.
{{tip|"Not in singleplayer" behavior can be achieved by naming an entity and using a {{ent|trigger_auto}} with spawnflag 2048 to [[killtarget]] the entity.{{confirm|What about trigger_auto itself?}} }}
== Effects in Source ==
{{confirm|Deprecated outside of {{hls}}/{{hldms}}? Might still affect spawning of {{ent|infodecal}} and{{ent|info_projecteddecal}}.}}

Latest revision as of 05:32, 30 May 2025

Stub

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

deathmatch is a console variable available in all GoldSrc GoldSrc and Source Source games.

It is a leftover from Quake Quake used to tell the server whether the current session is in multiplayer or not, using the ( g_pGameRules->IsDeathmatch() ) check.

For the game mode, see Deathmatch Map Design Theory.

Effects in GoldSrc

Enables multiplayer mode, regardless of whether multiplayer is actually a deathmatch game.

Enabling the deathmatch console variable is essential for the proper functionality of Info_player_deathmatch as otherwise, players will spawn at a random info_player_start or at the map's origin (0,0,0).

This command also allows weapons and ammunition to respawn, with every weapon_ and ammo_ entity taking 20 seconds to respawn. When creating a deathmatch map, it should also be taken into account that standing at a respawn point of an item still allows it to spawn and be repeatedly picked up, this means that players should be encouraged to keep moving around instead of sticking in one spot.

If any entity has spawnflag 2048 ("not in deathmatch") enabled, it will not appear when deathmatch is enabled. This is hardcoded on an engine level, and as such applies to all entities.

Tip.pngTip:"Not in singleplayer" behavior can be achieved by naming an entity and using a trigger_auto with spawnflag 2048 to killtarget the entity.
Confirm:What about trigger_auto itself?

Effects in Source

Confirm:Deprecated outside of Half-Life: Source/Half-Life Deathmatch: Source? Might still affect spawning of infodecal andinfo_projecteddecal.