1.7.7.1 Repair Items List Duplicating

seaweeduk

OpenDayZ Rockstar!
I've been having a weird issue with 1.7.7.1 I haven't been able to solve yet. The new repair items list for vehicles appears to dupliate itself any time you click a repair option or enter a vehicle.

gmsy.png


This can get really confusing and annoying, especially after refueling. I don't have any errors in my selfActions file and am using the default repair code


Code:
        //Repairing Vehicles
    if ((dayz_myCursorTarget != cursorTarget) and _isVehicle and !_isMan and _hasToolbox and (damage cursorTarget < 1)) then {
        _vehicle = cursorTarget;
        {dayz_myCursorTarget removeAction _x} forEach s_player_repairActions;s_player_repairActions = [];
        dayz_myCursorTarget = _vehicle;
        _allFixed = true;
        _hitpoints = _vehicle call vehicle_getHitpoints;
 
        {
            _damage = [_vehicle,_x] call object_getHit;
 
            _cmpt = toArray (_x);
            _cmpt set [0,20];
            _cmpt set [1,toArray ("-") select 0];
            _cmpt set [2,20];
            _cmpt = toString _cmpt;
 
            _configVeh = configFile >> "cfgVehicles" >> "RepairParts" >> _x;
            _part = getText(_configVeh >> "part");
            if (isnil ("_part")) then { _part = "PartGeneric"; };
 
            // get every damaged part no matter how tiny damage is!
            _damagePercent = round((1 - _damage) * 100);
            if (_damage > 0) then {
                _allFixed = false;
                _color = "color='#ffff00'"; //yellow
                if (_damage >= 0.5) then {_color = "color='#ff8800'";}; //orange
                if (_damage >= 0.9) then {_color = "color='#ff0000'";}; //red
                _cmpt = format[localize "str_actions_medical_09_status",_cmpt,_damagePercent];
 
                _string = format[localize "str_actions_medical_09",_cmpt,_color]; //Repair - Part
                _handle = dayz_myCursorTarget addAction [_string, "\z\addons\dayz_code\actions\repair.sqf",[_vehicle,_part,_x], 0, false, true, "",""];
                s_player_repairActions set [count s_player_repairActions,_handle];
            };
 
        } forEach _hitpoints;
        if (_allFixed) then {
            _vehicle setDamage 0;
        };
    };

Is anyone else having the same problems? I would really like to get this solved as it's driving me mad!

I tried adding this code to the resetactions in variables.sqf to try and make sure the list was being cleared

Code:
        {dayz_myCursorTarget removeAction _x} forEach s_player_repairActions;s_player_repairActions = [];
 
Normaly this happens when its conflicting with another script.

Do you have any other scripts added?

My guess did you do anything with kh_actions.sqf
 
Normaly this happens when its conflicting with another script.

Do you have any other scripts added?

My guess did you do anything with kh_actions.sqf

Yup I have a bunch of other scripts, can't see which is causing the issue though, my guess was removing parts from vehicles but all the code is working without errors (other than the duping)

Full selfactions here http://pastebin.com/jGzvGaF9
 
Back
Top