Fandom

武装突袭 Wiki

Locality in Multiplayer

简体 | 繁體

4,827个页面创建
于此维基上
添加新页面
评论0 Share

您使用了广告屏蔽软件!


Wikia通过广告运营为用户提供免费的服务。我们对用户通过嵌入广告屏蔽软件访问网站进行了使用调整。

如果您使用了广告屏蔽软件,将无法使用我们的服务。请您移除广告屏蔽软件,以确保页面正常加载。


Entities in OFP are handled, in multiplayer, by one computer alone (the server), which sends updates about this entity to all clients connected to the MP game. A unit is "local" when it is handled by the local computer (only registered on that machine,other clients connected won't see that unit as local).

To know if a unit is local, use the local script command.

Basic Rules 编辑

The basic rules to determine locality are as follows:

server = The dedicated server or the client that is hosting the game

client = A game instance used by a player, normally each is on a separate computer

  • The player's unit is always local to its client
  • AI units are always local to the client of their leader
  • A vehicle is always local to the client of its driver
  • AI leaders are always local to the server, if placed in the mission editor
  • AI units created after mission start via scripting will be local to the computer that issued the command
  • Empty vehicles/objects placed in the mission editor are local to the server
  • Empty vehicles/objects created after mission start via scripting (with createVehicle for example) are local to the machine that issued the command

Effects of different localities 编辑

Knowing locality of a unit is very important as certain command only affect local units (see moveInDriver for example). Other commands have only local effect, nothing will be done outside of computer where the command was issued (see setFog for example).

A unit can change locality during its lifetime. Typical cases are:

  • A player dying (his squad AI units are passed to server)
  • Use of a join command
  • Units or players entering or exiting a vehicle
  • TeamSwitch
  • selectPlayer

Further reading 编辑

更多维基

随机维基