Supplying vehicle as JIP parameter into remoteExec command seems like a very useful feature to auto remove the JIP remote exec on vehicle deletion, but it has a huge flaw of only supporting a single remote execution per entity. Looks like JIP handlers are stored as strings internally and providing a vehicle simply turns it into netid. This can be observed with following test:
- Have a game with server player and client player:
- Run this as server player:
{diag_log str 111} remoteExecCall ["call", 0, player]; {diag_log str 222} remoteExecCall ["call", 0, player]; {diag_log str 333} remoteExecCall ["call", 0, netid player];
- Observe both server and client seeing all 3 numbers in the RPT
- Have client rejoin
- Observe client only seeing "333" in the RPT
Unfortunately such behaviour makes using entity or its netid as handle borderline useless, because any mod can overwrite mission or other mod JIP behaviour on same entity.
I'm not sure about exact internal implementation, but I suggest removing\ignoring JIP queue execs by matching netid at the start of string rather than full string match. This way you will be able to stack several JIP queue remote executions like this
{diag_log str 111} remoteExecCall ["call", 0, format ["%1 queue 1", netid player]]; {diag_log str 222} remoteExecCall ["call", 0, format ["%1 queue 2", netid player]]; {diag_log str 333} remoteExecCall ["call", 0, format ["%1 queue 3", netid player]];
And have them removed\ignored once entity is deleted.
Maybe even let us supply array with entity and queue unique handle as a substitute for format:
{diag_log str 111} remoteExecCall ["call", 0, [player, "queue 1"]]; {diag_log str 222} remoteExecCall ["call", 0, [player, "queue 2"]]; {diag_log str 333} remoteExecCall ["call", 0, [player, "queue 3"]];