Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| actor_properties [2017/06/13 11:47] – korshun | actor_properties [2017/07/04 12:06] (current) – korshun |
|---|
| |
| All ''SetActor**PropertyName**'' functions first call [[zdoom>GetActorProperty]] and compare the new value of the property to the current one. If both values are the same, [[zdoom>SetActorProperty]] is **not** called. This automatically optimizes bandwidth use in Zandronum multiplayer. | All ''SetActor**PropertyName**'' functions first call [[zdoom>GetActorProperty]] and compare the new value of the property to the current one. If both values are the same, [[zdoom>SetActorProperty]] is **not** called. This automatically optimizes bandwidth use in Zandronum multiplayer. |
| | |
| | <code> |
| | function void SetActorHealth(int tid, int Health) |
| | { |
| | if (GetActorProperty(tid, APROP_Health) != Health) |
| | SetActorProperty(tid, APROP_Health, Health); |
| | } |
| | </code> |
| |
| Some actor properties are optimized by zandronum itself. However, the set of optimized actor properties depends on zandronum version, and not all actor properties are currently optimized (https://zandronum.com/tracker/view.php?id=1609). | Some actor properties are optimized by zandronum itself. However, the set of optimized actor properties depends on zandronum version, and not all actor properties are currently optimized (https://zandronum.com/tracker/view.php?id=1609). |
| | |
| | <note important>All string properties are compared in a case-insensitive way before being set. This means, for example, that ''%%SetActorNameTag(0, "Thing")%%'' will not call ''SetActorProperty'' if the **NameTag** property is already set to ''%%"thing"%%''.</note> |
| |
| ===== List of all properties ===== | ===== List of all properties ===== |