Jump to content

ForceStaticTraders true and Traderpositions problem


He-Man

Recommended Posts

I noticed, that ForceStaticTraders = true and the defined Traderpositions not really works.

I set ForceStaticTraders = true, and the Trader Positions are often not in traderBlds from CfgEpoch.

That's because this lines:

EPOCH_server_spawnTraders:

Spoiler

            _pos = _home;
...

                  if (daytime > (_schedule select 0) && daytime < (_schedule select 1)) then {
                        _pos = _work;
                    };

This causes, that the Trader Position is sometimes _home and sometimes _work.

But the traderBlds have only effect on the _work position. _home is absolutely random.

 

To fix this, Change:

EPOCH_server_spawnTraders.sqf:

Spoiler

                    if (daytime > (_schedule select 0) && daytime < (_schedule select 1)) then {
                        _pos = _work;
                    };
                    if (EPOCH_forceStaticTraders) then {     // new
                        _pos = _work;                                             // new
                    };                                                                       // new

 

EPOCH_server_loadTraders.sqf:

Spoiler

                if (daytime > (_schedule select 0) && daytime < (_schedule select 1)) then {
                    _pos = (_work select 0);
                };
                if (EPOCH_forceStaticTraders) then {        // new
                    _pos = (_work select 0);                           // new
                };                                                                     // new

Now the Traderposition is always the _work position, if forceStaticTraders = true and the traderBlds from CfgEpoch will take effect.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...