Bug #16802

Optimize supply income FSM script

Added by Bomba1 about 4 years ago. Updated about 4 years ago.

Status:Closed Start date:01/18/2011
Priority:Normal Due date:
Assignee:Benny % Done:

100%

Category:-
Target version:Warfare BE 2.067
Affected Version: I am using some Mods:
Affected ArmA II version:Please select... Reproducible for you:

Description

plz optimize little bit supply income FSM script.
public variables EastSupplies, WestSupplies frequently updating with this script, (side have half or more captured cities)

be better set summary value, if summary value > 0
http://code.google.com/p/arma2warfare/source/diff?spec=svn469&old=221&r=469&format=side&path=/trunk/Warfare.Bomba.Takistan/Server/FSM/updateresources.fsm

History

Updated by Bomba1 about 4 years ago

lines 60-62

Updated by Benny about 4 years ago

  • Status changed from New to Assigned
  • Assignee set to Benny
  • Target version set to Warfare BE 2.067

I tho i did it in some versions, but i don't remember why i set it back like that.

Updated by Bomba1 about 4 years ago

Benny wrote:

I tho i did it in some versions, but i don't remember why i set it back like that.

also please add time correction coefficient. if server have a lag some time, this help correct income values for supplies and money

_correction = (time - _lastUpdate) / _ii;
_eastSupplies = (WF_Logic getVariable ""EastSupplies"") + (_eastIncome * _correction);
_westSupplies = (WF_Logic getVariable ""WestSupplies"") + (_westIncome * _correction);

http://code.google.com/p/arma2warfare/source/browse/trunk/Warfare.Bomba.Takistan/Server/FSM/updateresources.fsm?r=477
line 65

Updated by Benny about 4 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

Fixed, i'd rather let the correction aside for now.

Also available in: Atom PDF