Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Parachute bug fix

  1. #1

    Thumbs up

    I'm pretty sure something like this has been done already in some missions but what the heck.

    The parachute bug basically makes you lose your parachute before getting close enough to the ground, resulting in an annoying death by falling too high. It's caused in multiplayer by different players' games having a different idea of where the ground is and for some reason those clients can affect when the chutes of other players disappear.

    With every client having this script running, they can land safely on the ground regardless of any bugs trying to mess things up.


    parafix.sqs
    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">;Parachute bug fix by Celery
    ;Fixes the issue of paratroopers losing their
    ;chutes prematurely and falling to their deaths
    ;
    ;Have each player exec this script in an init script or trigger

    #start
    ~1
    ?vehicle player iskindof &#34;ParachuteBase&#34;&#58;goto &#34;para&#34;
    goto &#34;start&#34;

    #para
    @vehicle player==player
    ?&#33;alive player&#58;goto &#34;start&#34;
    _altlogic=&#34;Logic&#34; createvehicle &#91;0,0,0&#93;
    _altlogic setpos &#91;getpos player select 0,getpos player select 1,0&#93;
    _alt=player distance _altlogic
    ?&#40;getpos player select 2&#62;1.6&#41;&#58;player setvelocity &#91;0,0,0&#93;;player setpos &#91;getpos player select 0,getpos player select 1,_alt-&#40;getpos player select 2&#41;+1.6&#93;
    deletevehicle _altlogic
    goto &#34;start&#34;[/QUOTE]




  2. #2
    Nice Celery, but why not a more efficient sqf version for something that always runs in the background ?

  3. #3
    well for such a simple script there is most likely no real difference.

    it is said that 1.15 will fix the problem.. once it will be out.

  4. #4
    this bug still exists.
    I patched it this way:
    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
    while{ &#40;&#40;getPos vehicle player&#41;select 2&#41; &#62; 2.0 }do{

    sleep 0.2;
    if&#40; vehicle player == player &#41;then
    {
    player moveInDriver _chute;
    };

    };
    [/QUOTE]

  5. #5
    Second Lieutenant Celery's Avatar
    Join Date
    Apr 9 2003
    Location
    BI Forums
    Posts
    4,882
    Author of the Thread
    Quote Originally Posted by ([APS
    Gnat @ Sep. 28 2008,04:55)]Nice Celery, but why not a more efficient sqf version for something that always runs in the background ?
    Sqs waits until the cpu is available for the job, sqf steals the resources from other tasks if it wants so with sqs there is absolutely no difference while sqf would make it worse if there is lots of stuff happening. And really, optimizing 0.001 fps is only in our heads and I think the function of the script is more important than one task out of a million more for the processor.



    Quote Originally Posted by (Przemek_kondor @ Sep. 28 2008,10:03)
    this bug still exists.
    I patched it this way:
    Do you mean to say that you tested it online and the script doesn&#39;t work?




  6. #6
    no, I mean that 1.15 didn&#39;t fix it (it was reply to Q)

  7. #7
    hm i think we are still running 1.14 or did i miss something

  8. #8
    haha, yes *** , sry - in my mind was 1.05

  9. #9
    Second Lieutenant Celery's Avatar
    Join Date
    Apr 9 2003
    Location
    BI Forums
    Posts
    4,882
    Author of the Thread
    I updated the script with a temporary altitude logic so that landings on artificial structures such as bridges and roofs don&#39;t get glitched.

  10. #10
    I will use it in next version of sabotage.
    Does this bug occur for AI?

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •