Skip to content

User Action do not get initialized #1

Description

@Input-BDF

I'm not totally sure, but i belive there is a little timing issue. At least on our dedicated server some player reported, that they do not have the options to deploy cargo ropes. I examined this a little bit and found out, that ASLR_Actions_Loaded is not set for these players.
Same behaviour can be reproduced for all players if admin uses #restart.

Using _this setVariable ["ASLR_Actions_Loaded",false]; via Zeus on the affected players resolves the issue.

I think the reason is that player object is not ready and available yet for some reason, when running aslr_client_init.sqf. Changing your loop to:

[] spawn {
	waitUntil {!isNull player}; //ensure player object is already initialized
	while {true} do {
		if(!isNull player && isPlayer player) then {
			if!( player getVariable ["ASLR_Actions_Loaded",false] ) then {
				[] call ASLR_Add_Player_Actions;
				[] call ASLR_Setup_Keybinding;
				player setVariable ["ASLR_Actions_Loaded",true];
			};
		};
		missionNamespace setVariable ["ASLR_Nearby_Vehicles", (call ASLR_Find_Nearby_Vehicles)];
		sleep 2;
	};
};

could fix this.

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions