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

Env sprite clientside: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
No edit summary
 
(21 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{Language subpage}}
{{LanguageBar}}
{{Format|env_sprite_clientside|type=e0|since=Portal 2|notitlechange=1}} It is an entity that controls the drawing of a sprite in the world, created clientside so cannot be parented to moving things and will use up no network bandwidth or CPU.
{{this is a|point entity|notext=1|since=Alien Swarm|name=env_sprite_clientside}}{{also|{{gmod}}}}
:{{note|This entity is still an edict on spawn in order to transmit information to clients, but is promptly removed after spawn. This means it can still contribute to edict crash in round based games.}}
{{CD|CSprite|nolink=1|file1=[https://github.com/ReactiveDrop/reactivedrop_public_src/blob/reactivedrop_beta/src/game/shared/Sprite.cpp#L33 Sprite.cpp]}}
:{{note|This entity is also available in {{gmod|3.1}}.}}
It is an entity that controls the drawing of a sprite in the world, created clientside so cannot be parented to moving things and will use up no network bandwidth or CPU.


==Keyvalues==
{{note|This entity is the same as {{ent|env_sprite}} with only difference being that it's removed server-side upon spawning, reducing [[edict]] usage thereafter.}}
{{KV Sprite}}
{{warning|When '''loading a saved game''' it spawns only if at least one sprite using the same model also exists as server-side entity. This is because if no server-side version exists the sprite model is not precached anymore (see output of command <code>cl_precacheinfo modelprecache</code>) after loading the game and therefore the client-side entity is unable to spawn. Mind that this is not an issue outside loading saves because the server-side version that precaches this when map is started for the first time is this entity itself which removes itself shortly after.}}
{{KV RenderFields}}
{{warning|Remains as an edict if {{mono|targetname}} or {{mono|parentname}} is specified and warning <code>"LEVEL DESIGN ERROR: env_sprite_clientside has <targetname/parentname> '<value>' - use env_sprite instead"</code> is printed to console.}}
{{KV BaseEntity}}


==Flags==
{{note|All <code>Keyvalues</code> are same as {{ent|env_sprite}}}}
{{Fl Sprite}}


==Inputs==
== See also ==
{{I Sprite}}
* {{ent|env_sprite}}
{{I RenderFields}}
* {{ent|env_sprite_oriented}}
{{I BaseEntity}}
* {{ent|env_fire}}
 
* {{ent|env_steam}}
==Outputs==
* {{ent|env_lightglow}}
{{O BaseEntity}}
* {{ent|env_lensflare}}
 
==See also==
* [[env_sprite]]
* [[env_sprite_oriented]]
* [[env_fire]]
* [[env_steam]]
* [[env_lightglow]]

Latest revision as of 23:36, 1 June 2025

English (en)Translate (Translate)

env_sprite_clientside is a point entity available in all Source Source games since Alien Swarm Alien Swarm.(also in Garry's Mod)

C++ Class hierarchy
CSprite
CBaseEntity
C++ Sprite.cpp

It is an entity that controls the drawing of a sprite in the world, created clientside so cannot be parented to moving things and will use up no network bandwidth or CPU.

Note.pngNote:This entity is the same as env_sprite with only difference being that it's removed server-side upon spawning, reducing edict usage thereafter.
Warning.pngWarning:When loading a saved game it spawns only if at least one sprite using the same model also exists as server-side entity. This is because if no server-side version exists the sprite model is not precached anymore (see output of command cl_precacheinfo modelprecache) after loading the game and therefore the client-side entity is unable to spawn. Mind that this is not an issue outside loading saves because the server-side version that precaches this when map is started for the first time is this entity itself which removes itself shortly after.
Warning.pngWarning:Remains as an edict if targetname or parentname is specified and warning "LEVEL DESIGN ERROR: env_sprite_clientside has <targetname/parentname> '<value>' - use env_sprite instead" is printed to console.
Note.pngNote:All Keyvalues are same as env_sprite

See also