Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.56 New Commands Conversion #2241

Closed
7 of 13 tasks
jonpas opened this issue Aug 23, 2015 · 27 comments
Closed
7 of 13 tasks

1.56 New Commands Conversion #2241

jonpas opened this issue Aug 23, 2015 · 27 comments

Comments

@jonpas
Copy link
Member

jonpas commented Aug 23, 2015


Direct conversions:

  • To joinString from
    • CBA_fnc_join
  • To splitString from
    • CBA_fnc_split
    • BIS_fnc_splitString
  • To AGLToASL from
    • FUNC(positionToASL)
    • EFUNC(common,positionToASL)
  • To ASLToAGL from
    • FUNC(ASLToPosition)
    • EFUNC(common,ASLToPosition)
  • To #include "..\"script_component.hpp" (inside function folders) from
    • #include "\z\ace\addons\<component>\script_component.hpp"
    • We won't be doing this 👍

Other improvements (just for reference, not necessary to complete this issue):

  • lineIntersectsSurfaces - major improvements (attach, frag, missile guideance, laser ...)
  • getAllHitPointsDamage / setHitIndex / getHitIndex - can make repair work on sub turrets that have identical hitpoint names
  • getModelInfo - should improve wire cutters
  • didJIP - JIP detect in common
  • magazinesAllTurrets - rearming
  • objectParent

Add others in comments. Those checked off above are either done or not found in ACE3 codebase.

@kymckay
Copy link
Member

kymckay commented Aug 23, 2015

I don't know if remoteExec is a great idea. I haven't looked into the "security" functionality of it yet, could users theoretically break code that uses it?

@jonpas
Copy link
Member Author

jonpas commented Aug 23, 2015

@SilentSpike They've added a great deal of security functionality to it, from quick BIKI read you can now white-list things through CfgRemoteExec. I was just thinking it could be a better replacement in terms of performance for the current remote execution framework in ACE3.

@kymckay
Copy link
Member

kymckay commented Aug 23, 2015

I mean to say, would the "security" functionality result in ACE scripts being blocked if the user configures it a certain way

@bux
Copy link
Member

bux commented Aug 23, 2015

Afaik, it would. Server admins can disable RemoteExec completely.

@jonpas
Copy link
Member Author

jonpas commented Aug 23, 2015

Ah, I see.

@kymckay
Copy link
Member

kymckay commented Aug 23, 2015

Kinda defeats the whole purpose of the command 😛 Good job BI 🌟

(Will have to look into to check that is the case, but from what I've read in passing it sounds that way too)

@bux
Copy link
Member

bux commented Aug 23, 2015

It's for Alive, Koth, Epoch etc... servers

@PabstMirror
Copy link
Contributor

Easy, drop-in stuff:

  • AGLToASL replaces fnc_positionToASL.sqf
  • ASLToAGL replaces fnc_ASLToPosition.sqf
  • # include supports parent folders #include "..\scriptComponent"

Non-trivial:

  • lineIntersectsSurfaces - amazing (attach, frag, missle guideance, laser) can all be improved
  • getAllHitPointsDamage / setHitIndex / getHitIndex - can make repair work on sub turrets that have identical hitpoint names
  • getModelInfo should improve wire cutters

@kymckay
Copy link
Member

kymckay commented Aug 24, 2015

isJIP can probably be used for something in common

@SzwedzikPL
Copy link
Contributor

shownHUD, showHUD for #1857
Propably magazinesAllTurrets for rearming ? @GitHawk ?

@GitHawk
Copy link
Contributor

GitHawk commented Aug 24, 2015

Thanks @SzwedzikPL
May make determining if a vehicle can be rearmed easier

@PabstMirror
Copy link
Contributor

common's jip detect on line 320 in postInit is wrong and runs on all clients,
replace with new isJip and then verify that fixing doesn't break anything in medical which uses that event

@SzwedzikPL
Copy link
Contributor

getAllHitPointsDamage for common_fnc_getHitPoints. I think it can solve #2259

@jonpas
Copy link
Member Author

jonpas commented Aug 27, 2015

Can someone confirm how exactly remoteExec works? If used from the server it should still be allowed no matter what, is that correct? And so only client execution of it can be restricted.

@SzwedzikPL
Copy link
Contributor

From https://community.bistudio.com/wiki/Arma_3_Remote_Execution

Note: Server doesn’t have any limitations at place, everything is enabled and opened for him. All limitations and rules apply only for client(s).

@SzwedzikPL
Copy link
Contributor

Seems that magazinesAllTurrets and shownHUD are not available in 1.50 :|

@NouberNou NouberNou added this to the Ongoing milestone Aug 29, 2015
@PabstMirror
Copy link
Contributor

AGLToASL - positionToASL are not equal

Our positionToASL is wrong, it converts to ASLW.

When standing on docks:
(player modelToWorld [0,0,0]) = getPosASLW player //Moves with waves (ASLW)
(player modelToWorld [0,0,0]) call ace_common_fnc_positionToASL returns ASLW

getPosASL player == aglToAsl (player modelToWorld [0,0,0]) //Static, not moving

https://community.bistudio.com/wiki/Position#PositionAGL is a great reference.

modelToWorld, worldToModel, modelToWorldVisual, worldToModelVisual, positionCameraToWorld, intersect, terrainIntersect, isOnRoad, drawIcon3D, drawLine3D, distance, moveTo, doMove, move, setDestination, buildingPos, screenToWorld, worldToScreen, AGLToASL, ASLToAGL

are all "AGL".

Because our function isn't right, we need to be careful when converting (EG, interaction menu expects the "wrong" value)

@jonpas
Copy link
Member Author

jonpas commented Aug 29, 2015

I recommend renaming positionToASL to positionToASLW during the conversion process.

@jonpas
Copy link
Member Author

jonpas commented Aug 30, 2015

#2319 #2311

@kymckay
Copy link
Member

kymckay commented Aug 30, 2015

Edited OP as we won't be using the relative filepaths

@commy2
Copy link
Contributor

commy2 commented Aug 31, 2015

I'll re-implement the laserpointers (for BWMod) using lineIntersectsSurfaces and port it then to ACE3.

@commy2
Copy link
Contributor

commy2 commented Aug 31, 2015

#2328

@commy2
Copy link
Contributor

commy2 commented Nov 29, 2015

#2893

@commy2 commy2 changed the title 1.50 New Commands Conversion 1.56 New Commands Conversion Jan 5, 2016
@commy2 commy2 added the sticky label Jan 5, 2016
@commy2
Copy link
Contributor

commy2 commented Jan 5, 2016

Updated OP for upcoming 1.56.

@PabstMirror
Copy link
Contributor

[{
    params ["_args"];
    diag_Log text format ["_args %1", _args];
    _args params ["_count"];
    _count = _count + 1;
    _args set [0, _count];
    (_count > 3);
},
{
    diag_Log text format ["Done %1", _this];
}, [[0]]] call ace_common_fnc_waitUntilAndExecute

Right now this will run forever because we make a deep copy of GVAR(waitUntilAndExecArray). Switching the implementation to

    GVAR(waitUntilAndExecArray) = GVAR(waitUntilAndExecArray) select {
        if ((_x select 2) call (_x select 0)) then {
            (_x select 2) call (_x select 1);
            false
        } else {
            true
        };
    };

Will terminate, which I think would be desired behaviour as it lets us use those params to store array references (and works just like PFEH).

@kymckay
Copy link
Member

kymckay commented Jan 18, 2016

Just because I'm not sure what the status is, figure I'll document here (before I forget) that issue #2848 can probably now be fixed with some of the new array related commands.

(Think the HuntIR code also still needs to be looked at, but doesn't seem like a priority)

@commy2
Copy link
Contributor

commy2 commented Feb 19, 2016

param is broken again don't use that one with find.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants