ALiVEOS / ALiVE.OS

ALiVE Open Source GPL v2
http://alivemod.com/
Other
160 stars 80 forks source link

Can't adjust simulation speed in multiplayer #801

Closed Snail-Goat closed 1 year ago

Snail-Goat commented 1 year ago

Prerequisites

Description

The function _fncprofileSimulator.sqf computes virtual unit movement steps and attack damages using accTime. However the setAccTime function does not work in multiplayer, making it impossible for the player to scale the simulation speed in multiplayer scenarios. setTimeMultiplier does work in multiplayer, and so accTime should be substituted with timeMultiplier in _fncprofileSimulator.sqf to allow time scaling to work.

Steps to Reproduce

  1. Create any single player scenario with Virtual AI debug on
  2. Use setAccTime and setTimeMultiplier to change the scenario speed. Observe changes to the unit movement speeds as time is sped up or slowed down.
  3. Repeat the above in Multiplayer and note that setAccTime no longer works.

Expected behavior: [What you expected to happen]

AliVE simulation should speed up and slow down with the world simulation speed.

Actual behavior: [What actually happened]

It is impossible to change accTime in multiplayer.

DarrellJMartin commented 1 year ago

accTime & timeMultiplier are not the same and their correcponding 'set' calls do not except the same values so cannot just be transposed. setAccTime - accelerates game time (you move faster) only works in single player. setTimeMultiplier - game times flows same as normal, but clock time moves faster (effecting sunlight/weather). Game movement cannot be acclerated in multiplayer for performance/data sync issues between server & clients.