Env sprite clientside: Difference between revisions
Jump to navigation
Jump to search

Note: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: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
Warning:Remains as an edict if targetname or parentname is specified and warning
Code:
Alien Swarm: Reactive Drop contains a custom open-source reimplementation, available here.
Note:All
SirYodaJedi (talk | contribs) No edit summary |
SirYodaJedi (talk | contribs) (don't link in CD, because it's not the official valve version (which isn't legally available)) |
||
| Line 1: | Line 1: | ||
{{LanguageBar}} | {{LanguageBar}} | ||
{{this is a|point entity|notext=1|since=Portal 2|name=env_sprite_clientside}}{{also|{{gmod}}{{asrd}}}} | {{this is a|point entity|notext=1|since=Portal 2|name=env_sprite_clientside}}{{also|{{gmod}}{{asrd}}}} | ||
{{CD|CSprite|nolink=1|file1= | {{CD|CSprite|nolink=1|file1=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. | 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. | ||
| Line 7: | Line 7: | ||
{{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.}} | {{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.}} | ||
{{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.}} | {{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.}} | ||
{{codenote|{{asrd|2}} contains a custom open-source reimplementation, available [https://github.com/ReactiveDrop/reactivedrop_public_src/blob/reactivedrop_beta/src/game/shared/Sprite.cpp here].}} | |||
{{note|All <code>Keyvalues</code> are same as {{ent|env_sprite}}}} | {{note|All <code>Keyvalues</code> are same as {{ent|env_sprite}}}} | ||
Latest revision as of 19:55, 19 November 2025
env_sprite_clientside is a point entity available in all
Source games since
Portal 2.(also in ![]()
)
| CSprite |
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.
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."LEVEL DESIGN ERROR: env_sprite_clientside has <targetname/parentname> '<value>' - use env_sprite instead" is printed to console.Keyvalues are same as env_sprite