Skip to content

Commit

Permalink
Releases version v1.00.02 (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
Spoffy authored Oct 11, 2022
2 parents f8bb0bd + eed0835 commit 71de9cc
Show file tree
Hide file tree
Showing 18 changed files with 109 additions and 32 deletions.
2 changes: 1 addition & 1 deletion maps/altis/mission.sqm
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ class Mission
assetType="Free";
class Intel
{
briefingName="Mike Force (v1.00.01)";
briefingName="Mike Force (v1.00.02)";
timeOfChanges=1800.0002;
startWeather=0.30000001;
startWind=0.1;
Expand Down
2 changes: 1 addition & 1 deletion maps/cam_lao_nam/mission.sqm
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ class Mission
appId=1227700;
class Intel
{
briefingName="Mike Force (v1.00.01)";
briefingName="Mike Force (v1.00.02)";
resistanceWest=0;
timeOfChanges=1800.0002;
startWeather=0.34999999;
Expand Down
2 changes: 1 addition & 1 deletion maps/vn_khe_sanh/mission.sqm
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ class Mission
assetType="Free";
class Intel
{
briefingName="Mike Force (v1.00.01)";
briefingName="Mike Force (v1.00.02)";
timeOfChanges=1800.0002;
startWeather=0.25;
startWind=0.1;
Expand Down
8 changes: 4 additions & 4 deletions maps/vn_the_bra/mission.sqm
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ class EditorData
class Camera
{
pos[]={3349.2559,50.78791,4392.5313};
dir[]={0.11972697,-0.55215997,0.8251121};
up[]={0.079291657,0.83373106,0.54644305};
aside[]={0.98964697,-9.8749297e-008,-0.14360218};
dir[]={0.11972583,-0.55215305,0.82510179};
up[]={0.079289421,0.83374274,0.54643047};
aside[]={0.98963594,0,-0.14360043};
};
};
binarizationWanted=0;
Expand Down Expand Up @@ -267,7 +267,7 @@ class Mission
assetType="Free";
class Intel
{
briefingName="Mike Force (v1.00.01)";
briefingName="Mike Force (v1.00.02)";
timeOfChanges=1800.0002;
startWeather=0.25;
startWind=0.1;
Expand Down
2 changes: 1 addition & 1 deletion mission/config/arsenal.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ class vn_whitelisted_arsenal_loadouts
{"vn_m1_garand_mag",{-1,0,-1,-1}},
{"vn_m1_garand_t_mag",{-1,1,-1,-1}},
{"vn_m1918_mag",{-1,0,-1,-1}},
{"vn_m1918_t_mag",{-1,1,-1,-1}},
{"vn_m1918_t_mag",{-1,1,-1,-1}}
};

items[] =
Expand Down
14 changes: 14 additions & 0 deletions mission/config/changelog.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
class Changelog {
class 1_00_02 {
version = "1.00.02";
date = "9th October 2022";
changes[] = {
"[New] Adds masterarm functionality to vehicle spawn building",
"[Change] Makes HQ defense complete faster",
"[Change] Updates dynamic view distance to have more configuration options",
"[Change] AI will no longer despawn when last player is downed in the AO",
"[Fix] Sites will no longer fall through the map and be un-completable",
"[Fix] Players will no longer get 'Mission Failed' if the server loads take a long time",
"[Fix] Player numbers will update correctly after players disconnect",
"[Fix] Zeus'd in vehicles will now have the correct skin, instead of US default"
};
};
class 1_00_01 {
version = "1.00.01";
date = "16th July 2022";
Expand Down
2 changes: 0 additions & 2 deletions mission/description.ext
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ wreckLimit = 2;
wreckRemovalMinTime = 60;
wreckRemovalMaxTime = 360;

disableRandomization[] = {"All"};

showHUD[] =
{
true, // Scripted HUD (same as showHUD command)
Expand Down
8 changes: 8 additions & 0 deletions mission/eventhandlers/mission/eh_HandleDisconnect.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ if !(isNull _unit) then
// save players loadout
["SET", (_uid + "_loadout"), getUnitLoadout _unit] call para_s_fnc_profile_db;

private _playerTeam = _unit getVariable ["vn_mf_db_player_group", "FAILED"];
private _playerTeamArray = missionNamespace getVariable [_playerTeam, []];

// Remove the player from their team array
_playerTeamArray deleteAt (_playerTeamArray find _unit);
missionNamespace setVariable [_playerTeam, _playerTeamArray];
publicVariable _playerTeam;

// delete unit
deleteVehicle _unit;
};
Expand Down
13 changes: 7 additions & 6 deletions mission/functions/core/teams/fn_force_team_change.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@ private _playerGroupArray = missionNamespace getVariable [_playerGroup,[]];
_player setVariable ["vn_mf_db_player_group", _team, true];

// Remove the player from their original team's group array
missionNamespace setVariable [_playerGroup, _playerGroupArray - [_player]];
_playerGroupArray deleteAt (_playerGroupArray find _player);
missionNamespace setVariable [_playerGroup, _playerGroupArray];
publicVariable _playerGroup;

// add them to the new group
private _nextPlayerGroup = _player getVariable ["vn_mf_db_player_group", "FAILED"]; //did vn_mf_db_player_group fail to set?
private _nextPlayerGroupArray = missionNamespace getVariable [_nextPlayerGroup, []];
_nextPlayerGroupArray pushBackUnique _player;
// add them to the new team
private _nextPlayerTeam = _player getVariable ["vn_mf_db_player_group", "FAILED"];
private _nextPlayerTeamArray = missionNamespace getVariable [_nextPlayerTeam, []];
_nextPlayerTeamArray pushBackUnique _player;

missionNamespace setVariable [_nextPlayerGroup, _nextPlayerGroupArray];
publicVariable _nextPlayerGroup;
Expand All @@ -41,4 +42,4 @@ publicVariable _nextPlayerGroup;
[] call vn_mf_fnc_tr_overview_team_update;
}] remoteExec ["spawn", _player];

[] remoteExecCall ["vn_mf_fnc_apply_unit_traits", _player];
[] remoteExecCall ["vn_mf_fnc_apply_unit_traits", _player];
3 changes: 2 additions & 1 deletion mission/functions/systems/sites/fn_create_aa_emplacement.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ params ["_position", ["_style", "heavy"]];

private _aaGun = ["vn_o_nva_static_dshkm_high_02", "vn_o_nva_static_zpu4"] select (_style == "heavy");

private _crewedAAGun = [[_aaGun, _position] call para_g_fnc_create_vehicle, [], grpNull];
private _crewedAAGun = [[_aaGun, _position, 15, 3, true] call para_g_fnc_create_vehicle_safely, [], grpNull];
[_crewedAAGun # 0, sizeOf typeOf (_crewedAAGun # 0)] call para_s_fnc_hide_foliage;

private _vehicles = [_crewedAAGun select 0];
private _units = _crewedAAGun select 1;
Expand Down
2 changes: 2 additions & 0 deletions mission/functions/systems/sites/fn_create_hq_buildings.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

params ["_position"];

[_position, 20] call para_s_fnc_hide_foliage;

vn_mf_hq_composition = [
["Land_vn_o_shelter_01",[-0.541992,2.78516,0],0,1,0,[0,0],"","",true,false],
["Land_vn_pavn_weapons_stack3",[0.99707,2.85059,0],65.7312,1,0,[0,0],"","",true,false],
Expand Down
3 changes: 2 additions & 1 deletion mission/functions/systems/sites/fn_create_mortar.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@

params ["_position"];

private _mortar = [[selectRandom vehicles_vc_mortars, _position] call para_g_fnc_create_vehicle, [], grpNull];
private _mortar = [[selectRandom vehicles_vc_mortars, _position, 15, 3, true] call para_g_fnc_create_vehicle_safely, [], grpNull];
[_mortar # 0, sizeOf typeOf (_mortar # 0)] call para_s_fnc_hide_foliage;

private _vehicles = [_mortar select 0];
private _units = _mortar select 1;
Expand Down
2 changes: 1 addition & 1 deletion mission/functions/systems/sites/fn_sites_generate.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ private _fnc_findPos = {
for "_i" from 1 to _attempts do
{
_attempt = _startPos getPos [_minDist + random (_maxDist - _minDist), random 360];
if (!surfaceIsWater _attempt || !([_attempt] call _fnc_noSitesZoneCheck)) exitWith {
if (!surfaceIsWater _attempt && !([_attempt] call _fnc_noSitesZoneCheck)) exitWith {
_result = _attempt;
break;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
private _tutorialEnabled = ["para_enableTutorial"] call para_c_fnc_optionsMenu_getValue;

// Early exit if the tutorial is disabled
if (_tutorialEnabled != 1) exitWith {
if (!_tutorialEnabled) exitWith {
//systemChat "Tutorial Disabled";
false;
};
Expand Down
2 changes: 1 addition & 1 deletion mission/functions/tasks/primary/fn_task_pri_capture.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ _taskDataStore setVariable ["INIT", {
private _hqs = (missionNamespace getVariable ["sites_hq", []]) inAreaArray _zone;
private _hqPosition = if (count _hqs > 0) then {getPos (_hqs # 0)} else {_zonePosition};

private _defendObj = [_hqPosition, 3, 5] call para_s_fnc_ai_obj_request_defend;
private _defendObj = [_hqPosition, 3, 2] call para_s_fnc_ai_obj_request_defend;

_taskDataStore setVariable ["hqDefendObjective", _defendObj];
_taskDataStore setVariable ["aiObjectives", [_defendObj]];
Expand Down
63 changes: 62 additions & 1 deletion mission/para_player_init_client.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ call vn_mf_fnc_display_location_time;
private _version = getText(missionConfigFile >> "version");
private _lastVersion = (["GET", "last_version", ""] call para_s_fnc_profile_db) select 1;
//Open welcome screen for new players
private _welcomeScreenEnabled = (["para_enableWelcomeScreen"] call para_c_fnc_optionsMenu_getValue) == 1;
private _welcomeScreenEnabled = ["para_enableWelcomeScreen"] call para_c_fnc_optionsMenu_getValue;
private _versionHasChanged = _lastVersion == "" || _lastVersion != _version;

if (_versionHasChanged) exitWith {
Expand All @@ -208,6 +208,67 @@ call vn_mf_fnc_display_location_time;
// Tutorial System
[] call vn_mf_fnc_tutorial_subsystem_client_init;


//Add Master Arm addAction for Boats and Land Vehicles
if hasInterface then
{
// Remove action to re-add it later
private _old_action_id = player getVariable ["vn_mf_masterarm_action_id", -1];
if (_old_action_id > -1) then { player removeAction _old_action_id; player setVariable ["vn_mf_masterarm_action_id", -1]; };

private _action =
[
localize "STR_VN_MASTER_ARM_OPEN_ACTION",
{
params ["_target", "_caller", "_actionId", "_arguments"];
["init"] call VN_fnc_masterarm;
},
[],
-100,
true,
true,
"",
toString {
private _vehicle = vehicle _this;
local _vehicle && {
!(_vehicle isKindOf 'Air' || _vehicle isKindOf 'Man') && {
speed _vehicle <= 5 && {
driver _vehicle == _this && {vn_fnc_masterarm_action_objects findif {(_vehicle distance _x) < 25} > -1}
}
}
}
},
25
];

if (player getVariable ["vn_mf_masterarm_action_id", -1] <= -1) then
{
private _action_id = player addAction _action;
player setVariable ["vn_mf_masterarm_action_id",_action_id];
};

private _vn_action = player getVariable ["vn_mf_masterarm_event_respawn",-1];
if (_vn_action <= -1) then
{
private _retun = player addEventHandler ["Respawn",
{
_this spawn
{
params ["_unit", "_corpse"];

waitUntil {player == _unit};

_corpse removeAction (_corpse getVariable ["vn_mf_masterarm_action_id", -1]);
_corpse setVariable ["vn_mf_masterarm_action_id", -1];

// Add new actions to player
[] spawn vn_fnc_masterarm_actions;
};
}];
player setVariable ["vn_mf_masterarm_event_respawn",_retun];
};
};

//DEV (ToDo): Until client Scheduler is added:
[]spawn
{
Expand Down
9 changes: 0 additions & 9 deletions mission/para_player_loaded_client.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,6 @@ player addEventHandler ["Respawn", _fnc_disableChatter];
//This way they can still exit if they want.
player enableSimulation false;

//Assign player to Mike Force if they aren't in a group or failed to join one.
private _playerGroup = player getVariable ["vn_mf_db_player_group", "FAILED"];
if(_playerGroup == "FAILED") then // Should be the only time this check is needed.
{
[player, "MikeForce"] call vn_mf_fnc_force_team_change;
} else {
[player, _playerGroup] call vn_mf_fnc_force_team_change;
};

// Start loading screen, so we wait while server init completes.
startLoadingScreen ["Welcome to Mike Force!", "MikeForce_loadingScreen"];
[selectRandom (getArray(missionConfigFile >> "gamemode" >> "loadingScreens" >> "images")),5002] call vn_mf_fnc_update_loading_screen;
2 changes: 1 addition & 1 deletion mission/version.hpp
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// Remember to update this in the mission.sqm too!
#define VN_MF_VERSION v1.00.01
#define VN_MF_VERSION v1.00.02

0 comments on commit 71de9cc

Please sign in to comment.