Major Hotfix 01042025@1925

This commit is contained in:
Jacob Schmidt 2025-01-04 19:25:56 -06:00
parent 48e3e15f71
commit 872857c257
7 changed files with 57 additions and 14 deletions

View File

@ -2,3 +2,20 @@ name = "FORGE Server"
author = "IDSolutions" author = "IDSolutions"
prefix = "forge_server" prefix = "forge_server"
mainprefix = "z" mainprefix = "z"
[files]
include = [
"*.dll",
"*.so",
"*.json",
"mod.cpp",
"README.md",
"LICENSE",
"icon_64_ca.paa",
"icon_128_ca.paa",
"icon_128_highlight_ca.paa",
"title_co.paa"
]
[version]
git_hash = 0

View File

@ -3,7 +3,7 @@
value_serverDone = false; value_serverDone = false;
publicVariable "value_serverDone"; publicVariable "value_serverDone";
diag_log "Executing SOF Server Side Functions..."; diag_log "Executing FORGE Server Side Functions...";
[] call EFUNC(save,handleDisconnect); [] call EFUNC(save,handleDisconnect);
diag_log "Server Handle Disconnect Initialized."; diag_log "Server Handle Disconnect Initialized.";

View File

@ -10,6 +10,11 @@ class CfgPatches {
authors[] = {"J. Schmidt", "Creedcoder"}; authors[] = {"J. Schmidt", "Creedcoder"};
author = "IDSolutions"; author = "IDSolutions";
VERSION_CONFIG; VERSION_CONFIG;
serverSaveLoop = 0;
serverSaveLoopTime = 30;
companyGenerals[] = {"76561198027566824"};
AISkill = 0.8;
}; };
}; };

View File

@ -20,7 +20,7 @@
params ["_msg", "_syschatEnabled"]; params ["_msg", "_syschatEnabled"];
private _text = format ["[SOF] %1", _msg]; private _text = format ["[FORGE] %1", _msg];
[_text] call CFUNC(log); [_text] call CFUNC(log);

View File

@ -22,31 +22,52 @@ addMissionEventHandler ["HandleDisconnect", {
private _unit = _this select 0; private _unit = _this select 0;
private _uid = _this select 2; private _uid = _this select 2;
private _default_armory_unlocks = [[],[],[],[]];
private _default_garage_unlocks = [[],[],[],[],[],[]];
private _data = [ private _data = [
_uid, _uid,
"armory_unlocks", [_unit getVariable ["Armory_Unlocks", [[],[],[],[]]]], // "armory_unlocks", [_unit getVariable ["Armory_Unlocks", _default_armory_unlocks]],
"garage_unlocks", [_unit getVariable ["Garage_Unlocks", [[],[],[],[],[],[]]]], // "garage_unlocks", [_unit getVariable ["Garage_Unlocks", _default_garage_unlocks]],
"locker", [_unit getVariable ["FORGE_Locker", []]], "armory_unlocks", [GETVAR(_unit,Armory_Unlocks,_default_armory_unlocks)],
"garage", [_unit getVariable ["FORGE_Garage", []]], "garage_unlocks", [GETVAR(_unit,Garage_Unlocks,_default_garage_unlocks)],
"cash", [_unit getVariable ["FORGE_Cash", 0]], // "locker", [_unit getVariable ["FORGE_Locker", []]],
"bank", [_unit getVariable ["FORGE_Bank", 0]], // "garage", [_unit getVariable ["FORGE_Garage", []]],
"number", [_unit getVariable ["FORGE_Phone_Number", "unknown"]], "locker", [GETVAR(_unit,FORGE_Locker,[])],
"email", [_unit getVariable ["FORGE_Email", "unknown@spearnet.mil"]], "garage", [GETVAR(_unit,FORGE_Garage,[])],
"paygrade", [_unit getVariable ["Paygrade", "E1"]], // "cash", [_unit getVariable ["FORGE_Cash", 0]],
// "bank", [_unit getVariable ["FORGE_Bank", 0]],
"cash", [GETVAR(_unit,FORGE_Cash,0)],
"bank", [GETVAR(_unit,FORGE_Bank,0)],
// "number", [_unit getVariable ["FORGE_Phone_Number", "unknown"]],
// "email", [_unit getVariable ["FORGE_Email", "unknown@spearnet.mil"]],
"number", [GETVAR(_unit,FORGE_Phone_Number,"unknown")],
"email", [GETVAR(_unit,FORGE_Email,"unknown@spearnet.mil")],
// "paygrade", [_unit getVariable ["Paygrade", "E1"]],
"paygrade", [GETVAR(_unit,Paygrade,"E1")],
"reputation", [rating _unit], "reputation", [rating _unit],
"loadout", [getUnitLoadout _unit], "loadout", [getUnitLoadout _unit],
"holster", [_unit getVariable ["FORGE_Holster_Weapon", true]], // "holster", [_unit getVariable ["FORGE_Holster_Weapon", true]],
"holster", [GETVAR(_unit,FORGE_Holster_Weapon,true)],
"position", [getPosASLVisual _unit], "position", [getPosASLVisual _unit],
"direction", [getDirVisual _unit] "direction", [getDirVisual _unit]
]; ];
if (vehicle _unit == _unit) then { // if (vehicle _unit == _unit) then {
// _data pushBack "currentWeapon";
// _data pushBack [currentMuzzle _unit];
// _data pushBack "stance";
// _data pushBack [stance _unit];
// };
if (isNull objectParent _unit) then {
_data pushBack "currentWeapon"; _data pushBack "currentWeapon";
_data pushBack [currentMuzzle _unit]; _data pushBack [currentMuzzle _unit];
_data pushBack "stance"; _data pushBack "stance";
_data pushBack [stance _unit]; _data pushBack [stance _unit];
}; };
diag_log format ["Saving Player: %1", _data];
// ["hsetidbulk", "", "", -1, _data, "", false] call dragonfly_db_fnc_addTask; // ["hsetidbulk", "", "", -1, _data, "", false] call dragonfly_db_fnc_addTask;
["hsetidbulk", "", "", -1, _data, "", false] remoteExecCall ["dragonfly_db_fnc_addTask", 2, false]; ["hsetidbulk", "", "", -1, _data, "", false] remoteExecCall ["dragonfly_db_fnc_addTask", 2, false];

View File

@ -2683,7 +2683,7 @@ enum
#define IDC_MP_SCORE_TABLE_ORDER 106 #define IDC_MP_SCORE_TABLE_ORDER 106
#define IDC_MP_SCORE_TABLE_PLAYERSNAME 107 #define IDC_MP_SCORE_TABLE_PLAYERSNAME 107
#define IDC_MP_SCORE_TABLE_KILLS_INF 108 #define IDC_MP_SCORE_TABLE_KILLS_INF 108
#define IDC_MP_SCORE_TABLE_KILLS_SOFT 109 #define IDC_MP_SCORE_TABLE_KILLS_FORGET 109
#define IDC_MP_SCORE_TABLE_KILLS_ARMOR 110 #define IDC_MP_SCORE_TABLE_KILLS_ARMOR 110
#define IDC_MP_SCORE_TABLE_KILLS_AIR 111 #define IDC_MP_SCORE_TABLE_KILLS_AIR 111
#define IDC_MP_SCORE_TABLE_KILLED 112 #define IDC_MP_SCORE_TABLE_KILLED 112