Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changes between Version 12 and Version 13 of code/doc/Identifier


Ignore:
Timestamp:
Sep 28, 2008, 9:13:30 PM (16 years ago)
Author:
landauf
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • code/doc/Identifier

    v12 v13  
    199199== Networking ==
    200200
    201 Because [wiki:Identifier Identifiers] use pointers, they are not qualified for networking. It's possible to just send the classname and use the [wiki:Factory], but this is expensive. That's why there's a network ID.
    202 
    203 The network ID is an unsigned integer. You can retrieve an [wiki:Identifier] with a given network ID by using the macro ClassByID(int) (include [wiki:CoreIncludes CoreIncludes.h] to use it). It's not determined which network ID belongs to which Identifier. This changes from version to version and from system to system, depending on the number of existing classes and the code executed before main(). So ClassByID(5) might be different on each client. That's why the server has to synchronize the network ID's.
    204 
    205 You can retrieve the network ID of an [wiki:Identifier] with getNetworkID().[[br]]
    206 You can set the network ID of an [wiki:Identifier] with setNetworkID(int).
     201Because Identifiers use pointers, they are not qualified for networking. It's possible to just send the classname and use the [wiki:Factory], but this is expensive. That's why there's a network ID.
     202
     203The network ID is an unsigned integer. You can retrieve an Identifier with a given network ID by using the macro ClassByID(int) (include [wiki:CoreIncludes CoreIncludes.h] to use it). It's not determined which network ID belongs to which Identifier. This changes from version to version and from system to system, depending on the number of existing classes and the code executed before main(). So ClassByID(5) might be different on each client. That's why the server has to synchronize the network ID's.
     204
     205You can retrieve the network ID of an Identifier with getNetworkID().[[br]]
     206You can set the network ID of an Identifier with setNetworkID(int).
    207207
    208208After changing the network ID of an Identifier to ''newid'', there might be two Identifiers with the ID ''newid''. ClassByID(''newid'') will then return the changed Identifier and not the old one.
    209209
    210 Read the Wiki-page of [wiki:Factory] to get more information about how to iterate through all [wiki:Identifier Identifiers].
     210Read the Wiki-page of [wiki:Factory] to get more information about how to iterate through all Identifiers.
    211211
    212212== Technical information ==