2015-01-11 16:42:31 +00:00
|
|
|
// by commy2
|
2015-01-12 04:02:33 +00:00
|
|
|
#include "script_component.hpp"
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-01-29 07:38:46 +00:00
|
|
|
ADDON = false;
|
|
|
|
|
2015-03-15 15:12:37 +00:00
|
|
|
PREP(addCanInteractWithCondition);
|
2015-01-25 03:56:23 +00:00
|
|
|
PREP(addLineToDebugDraw);
|
2015-02-03 05:37:38 +00:00
|
|
|
PREP(addSetting);
|
2015-04-01 16:48:46 +00:00
|
|
|
PREP(addToInventory);
|
2015-09-21 16:37:19 +00:00
|
|
|
PREP(assignedItemFix);
|
2015-08-15 13:49:41 +00:00
|
|
|
PREP(assignObjectsInList);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(ambientBrightness);
|
2015-03-03 04:37:00 +00:00
|
|
|
PREP(ASLToPosition);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(binarizeNumber);
|
2015-02-14 19:06:55 +00:00
|
|
|
PREP(blurScreen);
|
2015-03-11 02:20:05 +00:00
|
|
|
PREP(cachedCall);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(canGetInPosition);
|
|
|
|
PREP(canInteractWith);
|
|
|
|
PREP(canUseWeapon);
|
|
|
|
PREP(changeProjectileDirection);
|
2015-05-09 11:25:19 +00:00
|
|
|
PREP(checkFiles);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(checkPBOs);
|
|
|
|
PREP(claim);
|
|
|
|
PREP(codeToLetter);
|
|
|
|
PREP(codeToString);
|
2015-01-25 03:56:23 +00:00
|
|
|
PREP(createOrthonormalReference);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(currentChannel);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(debug);
|
|
|
|
PREP(debugModule);
|
|
|
|
PREP(defineVariable);
|
2015-05-10 19:59:53 +00:00
|
|
|
PREP(deviceKeyFindValidIndex);
|
|
|
|
PREP(deviceKeyRegisterNew);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(disableAI);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(disableUserInput);
|
2015-02-14 19:06:55 +00:00
|
|
|
PREP(displayIcon);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(displayText);
|
|
|
|
PREP(displayTextPicture);
|
|
|
|
PREP(displayTextStructured);
|
|
|
|
PREP(doAnimation);
|
2015-04-11 13:59:21 +00:00
|
|
|
PREP(dropBackpack);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(endRadioTransmission);
|
2015-03-11 02:20:05 +00:00
|
|
|
PREP(eraseCache);
|
2015-04-17 21:24:43 +00:00
|
|
|
PREP(errorMessage);
|
2015-01-17 16:56:24 +00:00
|
|
|
PREP(execNextFrame);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(execPersistentFnc);
|
|
|
|
PREP(execRemoteFnc);
|
|
|
|
PREP(executePersistent);
|
|
|
|
PREP(filter);
|
2016-01-27 00:01:01 +00:00
|
|
|
PREP(findUnloadPosition);
|
2016-02-06 19:09:48 +00:00
|
|
|
PREP(firedEH);
|
2015-03-17 10:44:41 +00:00
|
|
|
PREP(fixCollision);
|
2015-03-18 00:36:56 +00:00
|
|
|
PREP(fixFloating);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(fixLoweredRifleAnimation);
|
2015-03-16 18:25:29 +00:00
|
|
|
PREP(fixPosition);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(getAllDefinedSetVariables);
|
2015-01-16 18:24:25 +00:00
|
|
|
PREP(getAllGear);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(getDeathAnim);
|
2016-01-16 23:27:42 +00:00
|
|
|
PREP(getCaptivityStatus);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(getDefaultAnim);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(getDefinedVariable);
|
|
|
|
PREP(getDefinedVariableDefault);
|
|
|
|
PREP(getDefinedVariableInfo);
|
|
|
|
PREP(getFirstObjectIntersection);
|
|
|
|
PREP(getFirstTerrainIntersection);
|
2016-01-16 23:27:42 +00:00
|
|
|
PREP(getForceWalkStatus);
|
2015-02-04 02:20:55 +00:00
|
|
|
PREP(getGunner);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(getInPosition);
|
2015-06-30 17:26:51 +00:00
|
|
|
PREP(getMapGridData);
|
|
|
|
PREP(getMapGridFromPos);
|
|
|
|
PREP(getMapPosFromGrid);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(getMarkerType);
|
2015-06-30 17:26:51 +00:00
|
|
|
PREP(getMGRSdata);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(getName);
|
|
|
|
PREP(getNumberFromMissionSQM);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(getNumberMagazinesIn);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(getPitchBankYaw);
|
2015-02-03 03:43:23 +00:00
|
|
|
PREP(getSettingData);
|
2015-12-12 19:25:42 +00:00
|
|
|
PREP(getStaminaBarControl);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(getStringFromMissionSQM);
|
|
|
|
PREP(getTargetAzimuthAndInclination);
|
|
|
|
PREP(getTargetDistance);
|
|
|
|
PREP(getTargetObject);
|
2015-04-07 13:06:27 +00:00
|
|
|
PREP(getTurnedOnLights);
|
2015-04-02 17:05:50 +00:00
|
|
|
PREP(getTurretDirection);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(getUavControlPosition);
|
|
|
|
PREP(getVehicleCargo);
|
|
|
|
PREP(getVehicleCodriver);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(getVersion);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(getWeaponAzimuthAndInclination);
|
2015-02-12 14:57:55 +00:00
|
|
|
PREP(getWeaponIndex);
|
2015-03-28 00:43:30 +00:00
|
|
|
PREP(getWeaponState);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(getWindDirection);
|
2015-04-02 22:03:08 +00:00
|
|
|
PREP(getZoom);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(goKneeling);
|
|
|
|
PREP(hadamardProduct);
|
2015-09-26 01:16:55 +00:00
|
|
|
PREP(handleModifierKey);
|
|
|
|
PREP(handleModifierKeyUp);
|
|
|
|
PREP(handleModifierKeyInit);
|
2015-09-21 16:37:19 +00:00
|
|
|
PREP(handleScrollWheel);
|
|
|
|
PREP(handleScrollWheelInit);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(hasItem);
|
|
|
|
PREP(hasMagazine);
|
2015-07-28 04:11:29 +00:00
|
|
|
PREP(headBugFix);
|
2015-07-03 01:14:58 +00:00
|
|
|
PREP(hideUnit);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(inheritsFrom);
|
|
|
|
PREP(insertionSort);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(interpolateFromArray);
|
|
|
|
PREP(inTransitionAnim);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(inWater);
|
2015-03-10 22:35:05 +00:00
|
|
|
PREP(isAlive);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(isAutoWind);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(isAwake);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(isEngineer);
|
|
|
|
PREP(isEOD);
|
2015-04-10 19:48:18 +00:00
|
|
|
PREP(isFeatureCameraActive);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(isInBuilding);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(isModLoaded);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(isPlayer);
|
|
|
|
PREP(isTurnedOut);
|
2015-10-19 21:28:50 +00:00
|
|
|
PREP(isUnderwater);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(letterToCode);
|
2015-04-07 16:54:53 +00:00
|
|
|
PREP(lightIntensityFromObject);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(loadPerson);
|
|
|
|
PREP(loadPersonLocal);
|
2015-02-03 19:49:40 +00:00
|
|
|
PREP(loadSettingsFromProfile);
|
2015-01-30 21:56:45 +00:00
|
|
|
PREP(loadSettingsOnServer);
|
2015-04-18 18:06:01 +00:00
|
|
|
PREP(loadSettingsLocalizedText);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(map);
|
|
|
|
PREP(moduleCheckPBOs);
|
|
|
|
PREP(moduleLSDVehicles);
|
|
|
|
PREP(muteUnit);
|
2015-04-12 09:17:58 +00:00
|
|
|
PREP(muteUnitHandleInitPost);
|
2015-04-12 08:05:49 +00:00
|
|
|
PREP(muteUnitHandleRespawn);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(numberToDigits);
|
|
|
|
PREP(numberToDigitsString);
|
2015-04-06 18:47:11 +00:00
|
|
|
PREP(numberToString);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(onAnswerRequest);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(owned);
|
2015-08-24 19:45:02 +00:00
|
|
|
PREP(parseList);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(player);
|
|
|
|
PREP(playerSide);
|
2015-03-03 04:37:00 +00:00
|
|
|
PREP(positionToASL);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(progressBar);
|
2015-02-03 05:52:07 +00:00
|
|
|
PREP(readSettingFromModule);
|
2015-11-07 02:46:06 +00:00
|
|
|
PREP(readSettingsFromParamsArray);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(receiveRequest);
|
2015-03-15 15:12:37 +00:00
|
|
|
PREP(removeCanInteractWithCondition);
|
2015-02-20 05:45:17 +00:00
|
|
|
PREP(removeSpecificMagazine);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(requestCallback);
|
|
|
|
PREP(resetAllDefaults);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(restoreVariablesJIP);
|
2015-09-03 05:11:49 +00:00
|
|
|
PREP(runAfterSettingsInit);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(sanitizeString);
|
2015-10-03 23:26:38 +00:00
|
|
|
PREP(selectWeaponMode);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(sendRequest);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(serverLog);
|
2015-10-03 23:26:38 +00:00
|
|
|
PREP(setAllGear);
|
2016-01-19 19:58:07 +00:00
|
|
|
PREP(setApproximateVariablePublic);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(setCaptivityStatus);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(setDefinedVariable);
|
|
|
|
PREP(setDisableUserInputStatus);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(setForceWalkStatus);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(setHearingCapability);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(setName);
|
|
|
|
PREP(setParameter);
|
|
|
|
PREP(setPitchBankYaw);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(setProne);
|
2015-01-30 21:56:45 +00:00
|
|
|
PREP(setSetting);
|
|
|
|
PREP(setSettingFromConfig);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(setVariableJIP);
|
|
|
|
PREP(setVariablePublic);
|
|
|
|
PREP(setVolume);
|
|
|
|
PREP(sortAlphabeticallyBy);
|
2015-10-16 03:33:05 +00:00
|
|
|
PREP(showHud);
|
2016-01-13 00:18:12 +00:00
|
|
|
PREP(statusEffect_addType);
|
2016-01-16 23:27:42 +00:00
|
|
|
PREP(statusEffect_get);
|
2016-01-13 00:18:12 +00:00
|
|
|
PREP(statusEffect_localEH);
|
|
|
|
PREP(statusEffect_resetVariables);
|
|
|
|
PREP(statusEffect_respawnEH);
|
|
|
|
PREP(statusEffect_sendEffects);
|
|
|
|
PREP(statusEffect_set);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(stringCompare);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(stringToColoredText);
|
2015-02-19 18:12:14 +00:00
|
|
|
PREP(stringRemoveWhiteSpace);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(switchToGroupSide);
|
|
|
|
PREP(throttledPublicVariable);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(toBin);
|
|
|
|
PREP(toBitmask);
|
|
|
|
PREP(toHex);
|
|
|
|
PREP(toNumber);
|
2015-07-03 01:14:58 +00:00
|
|
|
PREP(unhideUnit);
|
2015-09-20 13:52:40 +00:00
|
|
|
PREP(uniqueElements);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(uniqueElementsOnly);
|
|
|
|
PREP(unloadPerson);
|
2015-05-25 16:41:24 +00:00
|
|
|
PREP(unloadPersonLocal);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(unmuteUnit);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(useItem);
|
|
|
|
PREP(useMagazine);
|
2015-01-17 05:58:24 +00:00
|
|
|
PREP(waitAndExecute);
|
2015-08-25 18:18:59 +00:00
|
|
|
PREP(waitUntilAndExecute);
|
2015-05-11 23:44:17 +00:00
|
|
|
PREP(waveHeightAt);
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-04-10 21:23:55 +00:00
|
|
|
PREP(translateToWeaponSpace);
|
|
|
|
PREP(translateToModelSpace);
|
|
|
|
|
2015-04-10 21:20:06 +00:00
|
|
|
// Model and drawing helpers
|
|
|
|
PREP(worldToScreenBounds);
|
|
|
|
|
2015-04-02 06:44:58 +00:00
|
|
|
// config items
|
|
|
|
PREP(getConfigType);
|
|
|
|
PREP(getItemType);
|
|
|
|
PREP(getWeaponType);
|
|
|
|
PREP(getWeaponModes);
|
|
|
|
PREP(getWeaponMuzzles);
|
|
|
|
|
|
|
|
// config objects
|
|
|
|
PREP(getConfigTypeObject);
|
|
|
|
PREP(getConfigGunner);
|
|
|
|
PREP(getConfigCommander);
|
|
|
|
PREP(getHitPoints);
|
|
|
|
PREP(getHitPointsWithSelections);
|
2015-08-30 19:13:29 +00:00
|
|
|
PREP(getSelectionsWithoutHitPoints);
|
2015-04-07 12:44:34 +00:00
|
|
|
PREP(getReflectorsWithSelections);
|
2015-04-07 13:43:23 +00:00
|
|
|
PREP(getLightProperties);
|
2015-04-07 18:54:25 +00:00
|
|
|
PREP(getLightPropertiesWeapon);
|
2015-04-02 06:44:58 +00:00
|
|
|
PREP(getVehicleCrew);
|
2015-09-26 01:16:55 +00:00
|
|
|
PREP(getVehicleUAVCrew);
|
2015-04-02 06:44:58 +00:00
|
|
|
|
|
|
|
// turrets
|
|
|
|
PREP(getTurrets);
|
|
|
|
PREP(getTurretIndex);
|
|
|
|
PREP(getTurretConfigPath);
|
|
|
|
PREP(getTurretGunner);
|
|
|
|
PREP(getTurretCommander);
|
|
|
|
PREP(getTurretCopilot);
|
|
|
|
PREP(getDoorTurrets);
|
|
|
|
PREP(getTurretsFFV);
|
|
|
|
PREP(getTurretsOther);
|
2015-10-28 18:01:47 +00:00
|
|
|
PREP(hasHatch);
|
2015-04-02 06:44:58 +00:00
|
|
|
|
2015-10-03 23:26:38 +00:00
|
|
|
// missing inventory commands
|
|
|
|
PREP(binocularMagazine);
|
|
|
|
PREP(removeBinocularMagazine);
|
|
|
|
|
2015-01-12 04:02:33 +00:00
|
|
|
// ACE_Debug
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(exportConfig);
|
|
|
|
PREP(getChildren);
|
|
|
|
PREP(getDisplayConfigName);
|
|
|
|
PREP(monitor);
|
|
|
|
PREP(showUser);
|
2015-01-12 04:02:33 +00:00
|
|
|
|
2015-03-10 19:59:40 +00:00
|
|
|
PREP(dumpPerformanceCounters);
|
|
|
|
PREP(dumpArray);
|
|
|
|
|
2015-01-12 04:02:33 +00:00
|
|
|
// ACE_CuratorFix
|
2015-01-13 18:31:26 +00:00
|
|
|
PREP(addCuratorUnloadEventhandler);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(fixCrateContent);
|
2015-01-12 04:02:33 +00:00
|
|
|
|
2015-01-13 23:27:42 +00:00
|
|
|
//ACE events global variables
|
2015-01-14 20:44:32 +00:00
|
|
|
GVAR(events) = [[],[]];
|
2015-01-13 23:27:42 +00:00
|
|
|
|
|
|
|
PREP(globalEvent);
|
|
|
|
PREP(_handleNetEvent);
|
2015-01-14 20:44:32 +00:00
|
|
|
PREP(addEventHandler);
|
2015-01-13 23:27:42 +00:00
|
|
|
PREP(targetEvent);
|
|
|
|
PREP(serverEvent);
|
2015-01-14 20:44:32 +00:00
|
|
|
PREP(localEvent);
|
|
|
|
PREP(removeEventHandler);
|
|
|
|
PREP(removeAlLEventHandlers);
|
2015-01-13 23:27:42 +00:00
|
|
|
|
2015-09-21 16:37:19 +00:00
|
|
|
// Synchronized Events
|
|
|
|
PREP(syncedEventPFH);
|
|
|
|
PREP(addSyncedEventHandler);
|
|
|
|
PREP(removeSyncedEventHandler);
|
|
|
|
PREP(requestSyncedEvent);
|
|
|
|
PREP(syncedEvent);
|
|
|
|
|
|
|
|
PREP(_handleSyncedEvent);
|
|
|
|
PREP(_handleRequestSyncedEvent);
|
|
|
|
PREP(_handleRequestAllSyncedEvents);
|
|
|
|
|
2015-04-02 06:44:58 +00:00
|
|
|
// other eventhandlers
|
|
|
|
PREP(addActionEventHandler);
|
|
|
|
PREP(addActionMenuEventHandler);
|
|
|
|
PREP(addScrollWheelEventHandler);
|
|
|
|
PREP(addMapMarkerCreatedEventHandler);
|
|
|
|
|
|
|
|
PREP(removeActionEventHandler);
|
|
|
|
PREP(removeActionMenuEventHandler);
|
|
|
|
PREP(removeScrollWheelEventHandler);
|
|
|
|
PREP(removeMapMarkerCreatedEventHandler);
|
|
|
|
|
2015-01-14 21:29:52 +00:00
|
|
|
// hashes
|
|
|
|
PREP(hashCreate);
|
|
|
|
PREP(hashSet);
|
|
|
|
PREP(hashGet);
|
|
|
|
PREP(hashHasKey);
|
|
|
|
PREP(hashRem);
|
|
|
|
PREP(hashListCreateList);
|
|
|
|
PREP(hashListCreateHash);
|
|
|
|
PREP(hashListSelect);
|
|
|
|
PREP(hashListSet);
|
|
|
|
PREP(hashListPush);
|
|
|
|
|
2015-04-17 17:21:41 +00:00
|
|
|
GVAR(syncedEvents) = HASH_CREATE;
|
2015-10-16 03:33:05 +00:00
|
|
|
GVAR(showHudHash) = [] call FUNC(hashCreate);
|
2015-06-11 07:45:42 +00:00
|
|
|
|
2015-08-25 18:18:59 +00:00
|
|
|
//GVARS for execNextFrame and waitAndExec and waitUntilAndExecute
|
2015-05-26 03:46:56 +00:00
|
|
|
GVAR(waitAndExecArray) = [];
|
2015-06-11 07:45:42 +00:00
|
|
|
GVAR(nextFrameNo) = diag_frameno;
|
|
|
|
GVAR(nextFrameBufferA) = [];
|
|
|
|
GVAR(nextFrameBufferB) = [];
|
2015-08-25 18:18:59 +00:00
|
|
|
GVAR(waitUntilAndExecArray) = [];
|
2015-04-17 17:21:41 +00:00
|
|
|
|
2015-09-03 04:58:24 +00:00
|
|
|
GVAR(settingsInitFinished) = false;
|
|
|
|
GVAR(runAtSettingsInitialized) = [];
|
|
|
|
|
2015-09-21 16:37:19 +00:00
|
|
|
// @todo: Generic local-managed global-synced objects (createVehicleLocal)
|
2015-04-17 17:21:41 +00:00
|
|
|
|
2015-03-10 19:59:40 +00:00
|
|
|
//Debug
|
|
|
|
ACE_COUNTERS = [];
|
|
|
|
|
2015-05-14 23:45:53 +00:00
|
|
|
// Load settings on the server and broadcast them
|
2015-02-03 00:13:31 +00:00
|
|
|
if (isServer) then {
|
2015-01-30 21:56:45 +00:00
|
|
|
call FUNC(loadSettingsOnServer);
|
|
|
|
};
|
2015-01-16 14:30:49 +00:00
|
|
|
|
2016-01-13 00:18:12 +00:00
|
|
|
GVAR(statusEffect_Names) = [];
|
|
|
|
GVAR(statusEffect_isGlobal) = [];
|
2015-09-21 16:37:19 +00:00
|
|
|
|
|
|
|
//////////////////////////////////////////////////
|
|
|
|
// Set up PlayerChanged eventhandler for pre init
|
|
|
|
//////////////////////////////////////////////////
|
|
|
|
|
2015-09-21 15:32:21 +00:00
|
|
|
ACE_player = objNull;
|
2015-09-21 16:37:19 +00:00
|
|
|
uiNamespace setVariable ["ACE_player", objNull];
|
2015-01-16 14:30:49 +00:00
|
|
|
|
2015-09-21 16:37:19 +00:00
|
|
|
// @todo check if this can be removed
|
2015-01-11 16:42:31 +00:00
|
|
|
if (hasInterface) then {
|
2015-01-16 14:30:49 +00:00
|
|
|
// PFH to update the ACE_player variable
|
2015-09-21 15:32:21 +00:00
|
|
|
GVAR(PreInit_playerChanged_PFHID) = [{
|
2015-04-03 15:50:52 +00:00
|
|
|
if !(ACE_player isEqualTo (call FUNC(player))) then {
|
2015-12-14 12:17:48 +00:00
|
|
|
private _oldPlayer = ACE_player;
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-04-03 15:50:52 +00:00
|
|
|
ACE_player = call FUNC(player);
|
2015-01-12 21:34:01 +00:00
|
|
|
uiNamespace setVariable ["ACE_player", ACE_player];
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-01-16 14:30:49 +00:00
|
|
|
// Raise ACE event
|
2015-01-16 15:14:18 +00:00
|
|
|
["playerChanged", [ACE_player, _oldPlayer]] call FUNC(localEvent);
|
2015-01-12 21:34:01 +00:00
|
|
|
};
|
2015-08-04 07:34:31 +00:00
|
|
|
}, 0, []] call CBA_fnc_addPerFrameHandler;
|
2015-01-11 16:42:31 +00:00
|
|
|
};
|
2015-01-14 21:29:52 +00:00
|
|
|
|
2015-09-21 16:37:19 +00:00
|
|
|
|
|
|
|
//////////////////////////////////////////////////
|
2015-05-10 05:53:20 +00:00
|
|
|
// Time handling
|
2015-09-21 16:37:19 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
|
2015-05-10 05:53:20 +00:00
|
|
|
ACE_time = diag_tickTime;
|
|
|
|
ACE_realTime = diag_tickTime;
|
|
|
|
ACE_virtualTime = diag_tickTime;
|
2015-05-10 14:50:58 +00:00
|
|
|
ACE_diagTime = diag_tickTime;
|
2015-05-10 05:53:20 +00:00
|
|
|
ACE_gameTime = time;
|
2015-05-22 19:29:56 +00:00
|
|
|
ACE_pausedTime = 0;
|
|
|
|
ACE_virtualPausedTime = 0;
|
2015-05-10 05:53:20 +00:00
|
|
|
|
|
|
|
PREP(timePFH);
|
2015-08-04 07:34:31 +00:00
|
|
|
[FUNC(timePFH), 0, []] call CBA_fnc_addPerFrameHandler;
|
2015-05-10 05:53:20 +00:00
|
|
|
|
2015-03-23 15:16:50 +00:00
|
|
|
// Init toHex
|
|
|
|
[0] call FUNC(toHex);
|
|
|
|
|
2015-09-21 16:37:19 +00:00
|
|
|
isHC = !hasInterface && !isDedicated; // deprecated because no tag
|
|
|
|
missionNamespace setVariable ["ACE_isHC", ACE_isHC];
|
|
|
|
uiNamespace setVariable ["ACE_isHC", ACE_isHC];
|
2015-02-14 19:29:07 +00:00
|
|
|
|
2015-09-21 16:37:19 +00:00
|
|
|
ADDON = true;
|