Merge branch 'master' into medicalImprovements

This commit is contained in:
Glowbal 2015-04-07 20:53:24 +02:00
commit c823826f17
136 changed files with 3178 additions and 3026 deletions

View File

@ -8,8 +8,6 @@ class CfgAmmo {
indirectHit = 12;
indirectHitRange = 2; //2;
caliber = 1.4;
deflecting = 3;
fuseDistance = 3;
tracerStartTime = 0.02;
timeToLive = 40;
explosive = 1.8;

View File

@ -863,9 +863,6 @@ class Heli_Attack_01_base_F: Helicopter_Base_F {
class Turrets: Turrets {
class MainTurret: MainTurret {
directionStabilized = 1;
horizontallyStabilized = 1;
weapons[] = {"ACE_gatling_20mm_Comanche","missiles_DAGR","missiles_ASRAAM", "ACE_AIR_SAFETY"};
magazines[] = {"ACE_500Rnd_20mm_shells_Comanche","4Rnd_AAA_missiles","24Rnd_PG_missiles"};
@ -880,7 +877,7 @@ class Heli_Attack_01_base_F: Helicopter_Base_F {
discretedistance[] = {100,200,300,400,500,600,700,800,900,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000};
discretedistanceinitindex = 3;
copilotHasFlares = 1;
directionStabilized = 1;
isCopilot = 1;
showHMD = 1;
CanEject = 1;
@ -910,6 +907,7 @@ class Heli_Attack_01_base_F: Helicopter_Base_F {
thermalMode[] = {0,1};
gunnerOpticsColor[] = {0,0,0,1};
directionStabilized = 1;
horizontallyStabilized = 1;
gunnerOpticsModel = "\A3\Weapons_F_Beta\Reticle\Heli_Attack_01_Optics_Gunner_wide_F";
};
class Medium: Wide
@ -920,6 +918,7 @@ class Heli_Attack_01_base_F: Helicopter_Base_F {
maxFov = 0.093;
gunnerOpticsColor[] = {0,0,0,1};
directionStabilized = 1;
horizontallyStabilized = 1;
gunnerOpticsModel = "\A3\Weapons_F_Beta\Reticle\Heli_Attack_01_Optics_Gunner_medium_F";
};
class Narrow: Wide
@ -930,6 +929,7 @@ class Heli_Attack_01_base_F: Helicopter_Base_F {
maxFov = 0.029;
gunnerOpticsColor[] = {0,0,0,1};
directionStabilized = 1;
horizontallyStabilized = 1;
gunnerOpticsModel = "\A3\Weapons_F_Beta\Reticle\Heli_Attack_01_Optics_Gunner_narrow_F";
};
@ -941,6 +941,7 @@ class Heli_Attack_01_base_F: Helicopter_Base_F {
maxFov = 0.01;
gunnerOpticsColor[] = {0,0,0,1};
directionStabilized = 1;
horizontallyStabilized = 1;
gunnerOpticsModel = "\A3\Weapons_F_Beta\Reticle\Heli_Attack_01_Optics_Gunner_narrow_F";
};
@ -958,8 +959,7 @@ class Heli_Attack_01_base_F: Helicopter_Base_F {
initFov = 1.1;
minFov = 0.133;
maxFov = 1.1;
visionMode[] = {"Normal","NVG","Ti"};
thermalMode[] = {2,3};
visionMode[] = {"Normal","NVG"};
gunnerOpticsModel = "";
gunnerOpticsEffect[] = {};
hideUnitInfo = 1;

View File

@ -73,6 +73,7 @@ PREP(getStringFromMissionSQM);
PREP(getTargetAzimuthAndInclination);
PREP(getTargetDistance);
PREP(getTargetObject);
PREP(getTurnedOnLights);
PREP(getTurretCommander);
PREP(getTurretConfigPath);
PREP(getTurretCopilot);
@ -111,6 +112,7 @@ PREP(isModLoaded);
PREP(isPlayer);
PREP(isTurnedOut);
PREP(letterToCode);
PREP(lightIntensityFromObject);
PREP(loadPerson);
PREP(loadPersonLocal);
PREP(loadSettingsFromProfile);
@ -189,6 +191,8 @@ PREP(getConfigGunner);
PREP(getConfigCommander);
PREP(getHitPoints);
PREP(getHitPointsWithSelections);
PREP(getReflectorsWithSelections);
PREP(getLightProperties);
PREP(getVehicleCrew);
// turrets

View File

@ -11,4 +11,4 @@
*/
#include "script_component.hpp"
sunOrMoon * sunOrMoon * (1 - overcast * 0.25) + (moonIntensity/5 min 1) * (1 - overcast)
(sunOrMoon * sunOrMoon * (1 - overcast * 0.25) + (moonIntensity/5) * (1 - overcast)) min 1

View File

@ -0,0 +1,63 @@
/*
* Author: commy2
* Read properties of given vehicles light.
*
* Arguments:
* 0: Object with lights (Object)
* 1: Light classname (String)
*
* Return Value:
* Stuff from config (Array)
*
*/
#include "script_component.hpp"
private ["_vehicle", "_light"];
_vehicle = _this select 0;
_light = _this select 1;
private "_config";
_config = configFile >> "CfgVehicles" >> typeOf _vehicle >> "Reflectors" >> _light;
private ["_intensity", "_position", "_direction", "_innerAngle", "_outerAngle"];
_intensity = getNumber (_config >> "intensity");
_position = getText (_config >> "position");
_direction = getText (_config >> "direction");
_innerAngle = getNumber (_config >> "innerAngle");
_outerAngle = getNumber (_config >> "outerAngle");
[_intensity, _position, _direction, _innerAngle, _outerAngle]
/*
class Reflectors
{
class Light_1
{
color[] = {1000,1000,1100};
ambient[] = {10,10,11};
intensity = 5;
size = 1;
innerAngle = 90;
outerAngle = 130;
coneFadeCoef = 2;
position = "Light_1_pos";
direction = "Light_1_dir";
hitpoint = "Light_1_hitpoint";
selection = "Light_1_hide";
useFlare = 1;
flareSize = 0.9;
flareMaxDistance = 85;
class Attenuation
{
start = 0;
constant = 0;
linear = 0;
quadratic = 0.9;
hardLimitStart = 40;
hardLimitEnd = 60;
};
};
};
*/

View File

@ -0,0 +1,45 @@
/*
* Author: commy2
*
* Returns all lighting hitpoints of any vehicle.
* Note: These are actual selections that are affected by setHit and getHit, not getHitPointDamage or setHitpointDamage.
* They behave like having an armor value of 0.
*
* Arguments:
* 0: A vehicle, not the classname (Object)
*
* Return Value:
* The light names and selections (Array)
*/
#include "script_component.hpp"
private ["_vehicle", "_config", "_hitpoints", "_selections"];
_vehicle = _this select 0;
_config = configFile >> "CfgVehicles" >> typeOf _vehicle;
_hitpoints = [];
_selections = [];
// iterate through all parents
while {isClass _config} do {
private "_class";
_class = _config >> "Reflectors";
for "_i" from 0 to (count _class - 1) do {
private ["_entry", "_selection"];
_entry = _class select _i;
_selection = getText (_entry >> "hitpoint");
if (!(_selection in _selections) && {!isNil {_vehicle getHit _selection}}) then {
_hitpoints pushBack configName _entry;
_selections pushBack _selection;
};
};
_config = inheritsFrom _config;
};
[_hitPoints, _selections]

View File

@ -0,0 +1,36 @@
/*
* Author: commy2
*
* Returns all turned on lights of any vehicle or streetlamp.
*
* Arguments:
* 0: A vehicle, not the classname (Object)
*
* Return Value:
* All burning lights (Array)
*/
#include "script_component.hpp"
private "_vehicle";
_vehicle = _this select 0;
if (!isLightOn _vehicle) exitWith {[]};
private ["_reflectorsWithSelections", "_lights", "_hitpoints"];
_reflectorsWithSelections = [_vehicle] call FUNC(getReflectorsWithSelections);
_lights = _reflectorsWithSelections select 0;
_hitpoints = _reflectorsWithSelections select 1;
private "_turnedOnLights";
_turnedOnLights = [];
{
if (_vehicle getHit _x <= 0.9) then {
_turnedOnLights pushBack (_lights select _forEachIndex);
};
} forEach _hitpoints;
_turnedOnLights

View File

@ -0,0 +1,56 @@
/*
* Author: commy2
* Calculate light intensity object 1 recieves from object 2
*
* Arguments:
* 0: Object that recieves light (Object)
* 1: Object that emits light (Object)
*
* Return Value:
* Brightest light level
*
*/
#include "script_component.hpp"
private ["_unit", "_lightSource"];
_unit = _this select 0;
_lightSource = _this select 1;
private "_unitPos";
_unitPos = _unit modelToWorld (_unit selectionPosition "spine3");
private ["_lights", "_lightLevel"];
_lights = [_lightSource] call FUNC(getTurnedOnLights);
_lightLevel = 0;
{
private ["_properties", "_intensity", "_innerAngle", "_outerAngle", "_position", "_direction", "_directionToUnit", "_distance", "_angle"];
_properties = [_lightSource, _x] call FUNC(getLightProperties);
// @todo intensity affects range?
//_intensity = _properties select 0;
_innerAngle = (_properties select 3) / 2;
_outerAngle = (_properties select 4) / 2;
// get world position and direction
_position = _lightSource modelToWorld (_lightSource selectionPosition (_properties select 1));
_direction = _lightSource modelToWorld (_lightSource selectionPosition (_properties select 2));
_direction = _position vectorFromTo _direction;
_directionToUnit = _position vectorFromTo _unitPos;
_distance = _unitPos distance _position;
_angle = acos (_direction vectorDotProduct _directionToUnit);
_lightLevel = _lightLevel max ((linearConversion [0, 30, _distance, 1, 0, true]) * (linearConversion [_innerAngle, _outerAngle, _angle, 1, 0, true]));
//systemChat format ["%1 %2", (linearConversion [0, 30, _distance, 1, 0, true]), (linearConversion [_innerAngle, _outerAngle, _angle, 1, 0, true])];
} forEach _lights;
_lightLevel

View File

@ -296,25 +296,21 @@
<Hungarian>Nincs hang</Hungarian>
</Key>
<Key ID="STR_ACE_ACTION_ACCEPT_REQUEST_KEY_TITLE">
<Original>Accept Requests</Original>
<Polish>Akceptuj prośby</Polish>
<Spanish>Aceptar Peticiones</Spanish>
<English>Accept Requests</English>
</Key>
<Key ID="STR_ACE_ACTION_DECLINE_REQUEST_KEY_TITLE">
<Original>Decline Requests</Original>
<Polish>Ignoruj prośby</Polish>
<Spanish>Rechazar Peticiones</Spanish>
<English>Decline Requests</English>
</Key>
<Key ID="STR_ACE_ACTION_ACCEPT_REQUEST_KEY_TOOLTIP">
<Original>Accept Requests send by other players. These can be requests to use / share equipment, perform certain actions.</Original>
<Polish>Akceptuj prośby wysłane przez innych graczy. Akceptacji wymagają między innymi akcje używania / współdzielenia wyposażenia, wykonywania określonych czynności.</Polish>
<Spanish>Acepta Peticiones de otros jugadores. Pueden ser solicitudes para usar / compartir equipamiento, realizar ciertas acciones.</Spanish>
<English>Accept Requests send by other players. These can be requests to use / share equipment, perform certain actions.</English>
</Key>
<Key ID="STR_ACE_ACTION_DECLINE_REQUEST_KEY_TOOLTIP">
<Original>Decline Requests send by other players. These can be requests to use / share equipment, perform certain actions.</Original>
<Polish>Ignoruj prośby wysłane przez innych graczy. Akceptacji wymagają między innymi akcje używania / współdzielenia wyposażenia, wykonywania określonych czynności.</Polish>
<Spanish>Rechazar Peticiones de otros jugadores. Pueden ser solicitudes para usar / compartir equipamiento, realizar ciertas acciones.</Spanish>
<English>Decline Requests send by other players. These can be requests to use / share equipment, perform certain actions.</English>

View File

@ -50,6 +50,12 @@ _velocityCorrection = (vectorMagnitude velocity _projectile) -
[_projectile, (_vehicle getVariable format ["%1_%2", QGVAR(Azimuth), _turret]), _offset, -_velocityCorrection] call EFUNC(common,changeProjectileDirection);
// Remove the platform velocity
if( (vectorMagnitude velocity _vehicle) > 2) then {
_sumVelocity = (velocity _projectile) vectorDiff (velocity _vehicle);
_projectile setVelocity _sumVelocity;
};
// Air burst missile
// handle locally only

View File

@ -1,6 +1,9 @@
// by commy2
#include "script_component.hpp"
// fixes laser when being captured. Needed, because the selectionpsoition of the right hand is used
["SetHandcuffed", {if (_this select 1) then {(_this select 0) action ["GunLightOff", _this select 0]};}] call EFUNC(common,addEventHandler);
if !(hasInterface) exitWith {};
GVAR(nearUnits) = [];

View File

@ -17,7 +17,6 @@
</Key>
<Key ID="STR_ACE_Laserpointer_useLaser">
<Original>&lt;t color='#9cf953'&gt;Use: &lt;/t&gt;Turn Laser ON/OFF</Original>
<English>&lt;t color='#9cf953'&gt;Use: &lt;/t&gt;Turn Laser ON/OFF</English>
<Czech>&lt;t color='#9cf953'&gt;Použití: &lt;/t&gt;Zapnout/vypnout laser</Czech>
<French>&lt;t color='#9cf953'&gt;Utiliser : &lt;/t&gt;laser on/off</French>

View File

@ -1,13 +0,0 @@
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
};
};
class Extended_FiredBIS_EventHandlers {
class AllVehicles {
class ADDON {
firedBIS = QUOTE(_this call FUNC(forceMagazineMuzzleVelocity));
};
};
};

View File

@ -22,7 +22,6 @@ class CfgMagazines {
descriptionShort = "$STR_ACE_30Rnd_65x39_caseless_mag_SDDescription";
picture = "\A3\weapons_f\data\ui\m_30stanag_caseless_green_CA.paa";
initSpeed = 320;
GVAR(forceMagazineMuzzleVelocity) = 1;
};
class ACE_30Rnd_65x39_caseless_mag_AP: 30Rnd_65x39_caseless_mag {
@ -58,7 +57,6 @@ class CfgMagazines {
displayNameShort = "$STR_ACE_30Rnd_65x39_caseless_green_mag_SDNameShort";
descriptionShort = "$STR_ACE_30Rnd_65x39_caseless_green_mag_SDDescription";
initSpeed = 320;
GVAR(forceMagazineMuzzleVelocity) = 1;
};
class ACE_30Rnd_65x39_caseless_green_mag_AP: 30Rnd_65x39_caseless_green {
@ -90,7 +88,6 @@ class CfgMagazines {
displayNameShort = "$STR_ACE_30Rnd_556x45_mag_SDNameShort";
descriptionShort = "$STR_ACE_30Rnd_556x45_mag_SDDescription";
initSpeed = 320;
GVAR(forceMagazineMuzzleVelocity) = 1;
picture = "\A3\weapons_f\data\ui\m_30stanag_green_ca.paa";
};
@ -130,7 +127,6 @@ class CfgMagazines {
displayNameShort = "$STR_ACE_20Rnd_762x51_mag_SDNameShort";
descriptionShort = "$STR_ACE_20Rnd_762x51_mag_SDDescription";
initSpeed = 320;
GVAR(forceMagazineMuzzleVelocity) = 1;
};
class ACE_20Rnd_762x51_Mag_AP: 20Rnd_762x51_Mag {

View File

@ -1,7 +0,0 @@
#include "script_component.hpp"
ADDON = false;
PREP(forceMagazineMuzzleVelocity);
ADDON = true;

View File

@ -12,8 +12,6 @@ class CfgPatches {
};
};
#include "CfgEventHandlers.hpp"
#include "CfgAmmo.hpp"
#include "CfgMagazines.hpp"
#include "CfgVehicles.hpp"

View File

@ -1,41 +0,0 @@
/*
* Author: commy2
*
* DESCRIPTION.
*
* Arguments:
* firedBIS
*
* Return Value:
* None
*/
#include "script_component.hpp"
private ["_weapon", "_magazine", "_projectile"];
_weapon = _this select 1;
_magazine = _this select 5;
_projectile = _this select 6;
if (getNumber (configFile >> "CfgMagazines" >> _magazine >> QGVAR(forceMagazineMuzzleVelocity)) != 1) exitWith {
//hint str (speed _projectile / 3.6);
};
private ["_initSpeedWeapon", "_initSpeedMagazine"];
_initSpeedWeapon = getNumber (configFile >> "CfgWeapons" >> _weapon >> "initSpeed");
_initSpeedMagazine = getNumber (configFile >> "CfgMagazines" >> _magazine >> "initSpeed");
//systemChat format ["W: %1m/s, M: %2m/s", _initSpeedWeapon, _initSpeedMagazine];
// force magazine initSpeed
private ["_credit", "_debit"];
_credit = vectorMagnitude velocity _projectile;
_debit = _credit + (_initSpeedMagazine - _initSpeedWeapon);
_projectile setVelocity ((velocity _projectile) vectorMultiply (_debit / _credit));
//hint str (speed _projectile / 3.6);

View File

@ -1 +0,0 @@
#include "\z\ace\addons\magazines\script_component.hpp"

View File

@ -886,7 +886,7 @@ class CfgVehicles {
scope = 2;
accuracy = 1000;
displayName = "[ACE] Medical Supply Crate";
model = "\A3\weapons_F\AmmoBoxes\AmmoBox_F";
model = PATHTOF(data\ace_medcrate.p3d);
author = "$STR_ACE_Common_ACETeam";
class TransportItems {
class ACE_fieldDressing {

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -3,31 +3,26 @@
<Package name="WindDeflection">
<Container ID="Weather_Meter">
<Key ID="STR_ACE_WEATHER_METER_WIND_CATEGORY">
<Original>Wind Information</Original>
<English>Wind Information</English>
<Polish>Informacje o wietrze</Polish>
<Spanish>Información del viento</Spanish>
</Key>
<Key ID="STR_ACE_WEATHER_METER_WIND_DIRECTION">
<Original>Direction: %1</Original>
<English>Direction: %1</English>
<Polish>Kierunek: %1</Polish>
<Spanish>Dirección: %1</Spanish>
</Key>
<Key ID="STR_ACE_WEATHER_METER_WIND_SPEED">
<Original>Speed: %1 m/s</Original>
<English>Speed: %1 m/s</English>
<Polish>Prędkość: %1</Polish>
<Spanish>Velocidad: %1 m/s</Spanish>
</Key>
<Key ID="STR_ACE_WEATHER_METER_WEATHER_CATEGORY">
<Original>Weather Information</Original>
<English>Weather Information</English>
<Polish>Informacje o pogodzie</Polish>
<Spanish>Información Meteorológica</Spanish>
</Key>
<Key ID="STR_ACE_WEATHER_METER_WEATHER_HUMIDITY">
<Original>Humidity: %1%</Original>
<English>Humidity: %1%</English>
<Polish>Wilgotność: %1</Polish>
<Spanish>Humedad: %1%</Spanish>

View File

@ -48,6 +48,7 @@ import hashlib
import configparser
import json
import traceback
import time
if sys.platform == "win32":
import winreg
@ -538,8 +539,8 @@ See the make.cfg file for additional build options.
input("Press Enter to continue...")
print("Resuming build...")
continue
else:
print("WARNING: Module is stored on work drive (" + work_drive + ").")
#else:
#print("WARNING: Module is stored on work drive (" + work_drive + ").")
try:
# Remove the old pbo, key, and log
@ -577,9 +578,27 @@ See the make.cfg file for additional build options.
#PABST: Convert config (run the macro'd config.cpp through CfgConvert twice to produce a de-macro'd cpp that pboProject can read without fucking up:
os.chdir(os.path.join(arma3tools_path, "CfgConvert"))
shutil.copyfile(os.path.join(work_drive, prefix, module, "config.cpp"), os.path.join(work_drive, prefix, module, "config.backup"))
print_green("\Pabst (double converting):" + "cfgConvertGUI.exe " + os.path.join(work_drive, prefix, module, "config.cpp"))
ret = subprocess.call(["cfgConvertGUI.exe", os.path.join(work_drive, prefix, module, "config.cpp")])
if ret != 0:
print_error("cfgConvertGUI (bin) return code == " + str(ret))
input("Press Enter to continue...")
#PABST: Need micro sleeps because cfgConvertGUI can return before it's finished procressing
time.sleep(0.05)
ret = subprocess.call(["cfgConvertGUI.exe", os.path.join(work_drive, prefix, module, "config.bin")])
if ret != 0:
print_error("cfgConvertGUI (txt) return code == " + str(ret))
input("Press Enter to continue...")
time.sleep(0.05)
#cmd = [rapifyTool, "-L", "-P", os.path.join(work_drive, prefix, module, "config.cpp")];
#ret = subprocess.call(cmd)
#if ret != 0:
# print_error("rapifyTool return code == " + str(ret) + str(cmd))
# input("Press Enter to continue...")
# Call pboProject
os.chdir("P:\\")
@ -625,12 +644,12 @@ See the make.cfg file for additional build options.
if not build_successful:
print_error("pboProject return code == " + str(ret))
print_error("Module not successfully built/signed.")
#input("Press Enter to continue...")
input("Press Enter to continue...")
print ("Resuming build...")
continue
#PABST: cleanup config BS (you could comment this out to see the "de-macroed" cpp
print_green("\Pabst (restoring): " + os.path.join(work_drive, prefix, module, "config.cpp"))
#print_green("\Pabst (restoring): " + os.path.join(work_drive, prefix, module, "config.cpp"))
os.remove(os.path.join(work_drive, prefix, module, "config.cpp"))
os.remove(os.path.join(work_drive, prefix, module, "config.bin"))
os.rename(os.path.join(work_drive, prefix, module, "config.backup"), os.path.join(work_drive, prefix, module, "config.cpp"))