gruppe-adler / grad-persistence

Save/Load mission progress in server's profileNamespace
26 stars 13 forks source link

Problem with player saves utilizing a keylogger EH (JIP player) #46

Open TenuredCLOUD opened 3 years ago

TenuredCLOUD commented 3 years ago

If you use a Keylogging EH my example 'ESC key' and you press ESC key while you're a JIP player GRAD will still save even though the player is not actually in the game yet.

Is this an Arma bug or a GRAD bug?

` [] spawn { waitUntil {!isNull(findDisplay 46)};

(findDisplay 46) displayAddEventHandler ["KeyDown", {
    if(_this select 1 == 1) //ESC key
    then {
          [] execVM "Persistency db\autosave.sqf";

    };
}];

}; ` ^^ This is the code I use to call the function for GRAD player save

Inside the autosave.sqf I utilize:

[player,true] remoteExecCall ["grad_persistence_fnc_savePlayer"];

I believe this is an Arma issue because even though it's findDisplay 46 I think that since a JIP player is automatically placed within the spawn position but has no simulation enabled (until fully loaded in) I think this is possibly why this will still save... Any ideas or techniques to get around this problem?

Thanks

Elvensbane commented 3 years ago

I have had this issue for a while now and the only commonality is seemingly we both use GRAD as I don't use that kind of eventhandler stuff.

I believe its like you said, likely related to pressing escape or otherwise getting an issue during connection to the server / lobby.