-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from dklollol/dev
Update 3.0.5
- Loading branch information
Showing
56 changed files
with
217 additions
and
3,971 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
["JIP Manager", "Handles JIPs in different ways depending on the module's settings.", "Olsen & Starfox64"] call FNC_RegisterModule; | ||
|
||
#include "settings.sqf" | ||
|
||
if (isServer) then { | ||
[] spawn { | ||
|
||
waitUntil {time > FW_JIPDENYTIME}; | ||
|
||
missionNamespace setVariable ["FW_JIPDenied", true]; | ||
publicVariable "FW_JIPDenied"; | ||
|
||
}; | ||
}; | ||
|
||
if (!isDedicated) then { | ||
|
||
if (FW_JIPTYPE == "DENY" && missionNamespace getVariable ["FW_JIPDenied", false]) exitWith { | ||
|
||
[] spawn { | ||
sleep 5; | ||
player setDamage 1; | ||
|
||
sleep 8; | ||
cutText ["This mission does not support JIP.", "PLAIN DOWN"]; | ||
}; | ||
|
||
}; | ||
|
||
_target = leader player; | ||
|
||
if (player == _target || !(_target call FNC_Alive)) then { | ||
|
||
_rank = -1; | ||
|
||
{ | ||
|
||
if (rankId _x > _rank && (_target call FNC_Alive)) then { | ||
_rank = rankId _x; | ||
_target = _x; | ||
}; | ||
|
||
} forEach ((units group player) - [player]); | ||
}; | ||
|
||
if ((_target distance player) > FW_JIPDISTANCE) then { | ||
|
||
switch (FW_JIPTYPE) do { | ||
|
||
case "TELEPORT": { | ||
|
||
_teleportAction = player addAction ["Teleport to Squad", "modules\jip\teleportAction.sqf", _target]; | ||
|
||
[_teleportAction] spawn { //Spawns code running in parallel | ||
|
||
_spawnPos = getPosATL player; | ||
|
||
while {true} do { | ||
|
||
if (player distance _spawnPos > FW_SPAWNDISTANCE) exitWith { //Exitwith ends the loop | ||
|
||
player removeAction (_this select 0); | ||
cutText [format ["JIP teleport option lost, you went beyond %1 meters from your spawn location", FW_SPAWNDISTANCE], 'PLAIN DOWN']; | ||
|
||
}; | ||
|
||
sleep (60); //Runs every min | ||
|
||
}; | ||
}; | ||
|
||
}; | ||
|
||
case "TRANSPORT": { | ||
|
||
_transportAction = player addAction ["Request Transport", "modules\jip\transportAction.sqf"]; | ||
|
||
[_transportAction] spawn { //Spawns code running in parallel | ||
|
||
_spawnPos = getPosATL player; | ||
|
||
while {true} do { | ||
|
||
if (player distance _spawnPos > FW_SPAWNDISTANCE) exitWith { //Exitwith ends the loop | ||
|
||
player removeAction (_this select 0); | ||
cutText [format ["JIP transport request option lost, you went beyond %1 meters from your spawn location", FW_SPAWNDISTANCE], 'PLAIN DOWN']; | ||
|
||
}; | ||
|
||
sleep (60); //Runs every min | ||
|
||
}; | ||
}; | ||
|
||
}; | ||
|
||
}; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#ifdef framework | ||
|
||
#include "init.sqf" | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
//This module allows people who join in progress to teleport to their squad members. | ||
|
||
//JIPDENYTIME | ||
//After how many seconds should a player be considered JIP (this only applies if you are using JIPTYPE "DENY"). | ||
FW_JIPDENYTIME = 300; | ||
|
||
switch (side player) do { | ||
|
||
case west: { | ||
//JIPTYPE | ||
//How should JIPs be handled, options are: DENY: Player is killed and put in spectator. TELEPORT: Player can teleport to his squad. TRANSPORT: Player can send a hint to all group leaders requesting transport. | ||
FW_JIPTYPE = "TELEPORT"; | ||
|
||
//JIPDISTANCE | ||
//When you spawn, if your squad members are more then JIPDISTANCE away, you get the option to teleport or request transport. | ||
FW_JIPDISTANCE = 50; | ||
|
||
//SPAWNDISTANCE | ||
//If you move SPAWNDISTANCE away from your spawn position you loose the option to teleport or request transport. | ||
FW_SPAWNDISTANCE = 200; | ||
}; | ||
|
||
case east: { | ||
//JIPTYPE | ||
//How should JIPs be handled, options are: DENY: Player is killed and put in spectator. TELEPORT: Player can teleport to his squad. TRANSPORT: Player can send a hint to all group leaders requesting transport. | ||
FW_JIPTYPE = "TRANSPORT"; | ||
|
||
//JIPDISTANCE | ||
//When you spawn, if your squad members are more then JIPDISTANCE away, you get the option to teleport or request transport. | ||
FW_JIPDISTANCE = 50; | ||
|
||
//SPAWNDISTANCE | ||
//If you move SPAWNDISTANCE away from your spawn position you loose the option to teleport or request transport. | ||
FW_SPAWNDISTANCE = 200; | ||
}; | ||
|
||
case independent: { | ||
//JIPTYPE | ||
//How should JIPs be handled, options are: DENY: Player is killed and put in spectator. TELEPORT: Player can teleport to his squad. TRANSPORT: Player can send a hint to all group leaders requesting transport. | ||
FW_JIPTYPE = "DENY"; | ||
|
||
//JIPDISTANCE | ||
//When you spawn, if your squad members are more then JIPDISTANCE away, you get the option to teleport or request transport. | ||
FW_JIPDISTANCE = 0; | ||
|
||
//SPAWNDISTANCE | ||
//If you move SPAWNDISTANCE away from your spawn position you loose the option to teleport or request transport. | ||
FW_SPAWNDISTANCE = 0; | ||
}; | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
_id = _this select 2; | ||
_targets = []; | ||
|
||
{ | ||
|
||
if ((side player) == (side _x) && (leader _x == _x)) then { | ||
|
||
_targets set [count _targets, _x]; | ||
|
||
}; | ||
|
||
} forEach playableUnits; | ||
|
||
[format ["%1 joined the mission and is requesting transport.", name player], "hint", _targets] call BIS_fnc_MP; | ||
|
||
player removeAction _id; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.