Aw avatar reload

From ActiveWiki
Revision as of 11:03, 2 November 2008 by Macavity (talk | contribs) (Cleanup)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Minimum requirements
Added in version 4.1
SDKbuild 58


int aw_avatar_reload (int citizen, int session)

Description

Forces all users in a world to redownload the geometry and textures of the avatar in use by the selected user.

Callback

None (returns immediately)

Notes

If the selected user exists and the call was successful then AW_EVENT_AVATAR_RELOAD is sent to all users in the world as a signal to reload its avatar.

Arguments

citizen
Citizen number.
session
Session number.

Only one of the arguments can be used to select a user. The other must be set to 0.

Argument attributes

None

Return values

RC_SUCCESS
RC_NOT_INITIALIZED
RC_NO_INSTANCE
RC_NO_CONNECTION
The connection to the world is down.
RC_UNAUTHORIZED
Only instances owned by a caretaker (i.e. aw_bool (AW_WORLD_CARETAKER_CAPABILITY) returns 1) may use this method.

Returned attributes

AW_AVATAR_CITIZEN
AW_AVATAR_SESSION

Usage

void handle_avatar_reload (void)
{
  /* simulate an avatar reload */
  printf ("Avatar of %d (session %d) is forced to reload (reason %d)\n",
         aw_int (AW_AVATAR_CITIZEN),
         aw_int (AW_AVATAR_SESSION),
         rc);
}

aw_event_set (AW_EVENT_AVATAR_RELOAD, handle_avatar_reload);
aw_avatar_reload (0, 4711);

See also