ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


functions:isclientonly

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Last revisionBoth sides next revision
functions:isclientonly [2017/06/13 17:26] – created korshunfunctions:isclientonly [2017/07/16 17:14] korshun
Line 1: Line 1:
 ====== IsClientOnly ====== ====== IsClientOnly ======
-{{tag>info}}+{{tag>zandronum info needs_examples}}
 ''bool IsClientOnly()'' ''bool IsClientOnly()''
  
 ===== Description ===== ===== Description =====
-Returns true if the code is executing only clientside, but not serverside. Shorthand for ''[[IsClient]]() && ![[IsServer]]()''.+Returns true if the code is executing only clientside, but not serverside. **Returns false in singleplayer, unlike [[IsClient]].** Shorthand for ''[[IsClient]]() && ![[IsServer]]()''.
  
-===== Examples ===== 
-The following code will not trigger the error clientside or in singleplayer: 
-<code> 
-if (IsClientOnly()) 
-    Error("This function needs to be executed serverside); 
-</code>