From 4cc64adadc2a4bc7cc09e87a62d8154288a646d2 Mon Sep 17 00:00:00 2001 From: He-Man Date: Sun, 6 Oct 2019 02:52:02 +0200 Subject: [PATCH] Fast Swim --- @epochhive/addons/Ignatz_FastSwim.pbo | Bin 0 -> 1735 bytes @epochhive/addons/Ignatz_FastSwim/$PREFIX$ | 1 + @epochhive/addons/Ignatz_FastSwim/config.cpp | 20 ++++++++ .../addons/Ignatz_FastSwim/fn_postInit.sqf | 43 ++++++++++++++++++ README.md | 5 ++ 5 files changed, 69 insertions(+) create mode 100644 @epochhive/addons/Ignatz_FastSwim.pbo create mode 100644 @epochhive/addons/Ignatz_FastSwim/$PREFIX$ create mode 100644 @epochhive/addons/Ignatz_FastSwim/config.cpp create mode 100644 @epochhive/addons/Ignatz_FastSwim/fn_postInit.sqf diff --git a/@epochhive/addons/Ignatz_FastSwim.pbo b/@epochhive/addons/Ignatz_FastSwim.pbo new file mode 100644 index 0000000000000000000000000000000000000000..f9c8f5c5d2f3239adeb40324ee389cc47ac33bac GIT binary patch literal 1735 zcmah~&2G~`5DpR-Bk>Ao>q|i@QCkTRL`5oX)A|4^is+>ZtBpN&7TN3V?mBLXa^u7s z@KW4(gr0c;kk}vFbrOe0a%AuKeKX&zcg8&_;G(zk;{sxO-3t;%)K@$tQjJQQ^?G5> zVw&_r&aL3>1E>3YdpI`tF~dBUDqvLgKFaZS=H^m$5dKm^jfwv4hwqcKS(m`o+1s$hzyXs&KJV)#DH{w=lM8TM@RX{GcOMyzB;_ioD>Tg5&K~WuM@Rsf8`L$t zL0#9}R*RPN4r?vA4!%L%1*dnxYk2d1SJ^icI%=P+CurMi!Lp;c7F^qFtK*L1SKMLJ zDZF!4Z~5{Yv1e@j45=y9Q=vZc5|laPBMuN9e;;qqIp-n0`jRa)5f|F|qb$7lCMmT06mYkHj z&(QOI-KoK8^I@_58c~wqG*6oGcnp&wd4tT?2bnpB^i0sbKj@wDZ=V-WCbu8|6kjH< LzyF+(U)TQta6%cn literal 0 HcmV?d00001 diff --git a/@epochhive/addons/Ignatz_FastSwim/$PREFIX$ b/@epochhive/addons/Ignatz_FastSwim/$PREFIX$ new file mode 100644 index 0000000..4d3750d --- /dev/null +++ b/@epochhive/addons/Ignatz_FastSwim/$PREFIX$ @@ -0,0 +1 @@ +Ignatz_FastSwim \ No newline at end of file diff --git a/@epochhive/addons/Ignatz_FastSwim/config.cpp b/@epochhive/addons/Ignatz_FastSwim/config.cpp new file mode 100644 index 0000000..710961d --- /dev/null +++ b/@epochhive/addons/Ignatz_FastSwim/config.cpp @@ -0,0 +1,20 @@ +class CfgPatches { + class Ignatz_FastSwim { + units[] = {}; + weapons[] = {}; + version = 0.1; + requiredVersion = 1.76; + requiredAddons[] = {}; + }; +}; +class CfgFunctions { + class Ignatz_FastSwim + { + class main { + file = "Ignatz_FastSwim"; + class postInit { + postInit = 1; + }; + }; + }; +}; \ No newline at end of file diff --git a/@epochhive/addons/Ignatz_FastSwim/fn_postInit.sqf b/@epochhive/addons/Ignatz_FastSwim/fn_postInit.sqf new file mode 100644 index 0000000..fa95c8b --- /dev/null +++ b/@epochhive/addons/Ignatz_FastSwim/fn_postInit.sqf @@ -0,0 +1,43 @@ +_code = { + Ignatz_PlayerIsSwimming = false; + waituntil {typeof player in ['Epoch_Male_F','Epoch_Female_F']}; + waituntil {!isNil 'Epoch_my_GroupUID'}; + waituntil {uisleep 2; alive player}; + _eh = { + player addEventHandler ["AnimChanged", { + params ["_unit", "_anim"]; + if (_anim in [ + "asswpercmstpsnonwnondnon", + "asswpercmstpsnonwnondnon_asswpercmrunsnonwnondf", + "asswpercmrunsnonwnondf", + "aswmpercmrunsnonwnondf", + "aswmpercmsprsnonwnondf", + "abswpercmrunsnonwnondf", + "abswpercmsprsnonwnondf", + "asswpercmrunsnonwnondr", + "aswmpercmrunsnonwnondr", + "abswpercmrunsnonwnondr", + "abswpercmrunsnonwnondl", + "abswpercmstpsnonwnondnon", + "aswmpercmstpsnonwnondnon", + "asswpercmrunsnonwnondb", + "abswpercmrunsnonwnondb", + "aswmpercmrunsnonwnondb", + "abswpercmrunsnonwnondfr", + "abswpercmstpsnonwnondnon_abswpercmrunsnonwnondf", + "asswpercmsprsnonwnondf" + ]) then { + player setAnimSpeedCoef 2.5; + } + else { + player setAnimSpeedCoef 1; + }; + }]; + }; + call _eh; + waituntil {uisleep 2; !alive player}; + waituntil {uisleep 2; alive player}; + call _eh; +}; +_code remoteExec ["BIS_fnc_spawn", -2, "IG_FastSwim"]; +diag_log "Ignatz_Debug: Fast Swim added"; \ No newline at end of file diff --git a/README.md b/README.md index eac8487..e585d52 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ - Autorestart - Autmatic Door Opener - Craftable Bicycles +- Fast Swim - Install: - copy the files from epoch.mission into your mission file (if init.sqf already exist, paste the code into this file) - Add the lines from CfgActionMenu_self.hpp into this file: "epoch.mission\epoch_config\Configs\CfgActionMenu\CfgActionMenu_self.hpp" @@ -12,6 +13,10 @@ - All other Settings are in Epoch.Mission\ignatz_config.hpp +Changelog: +- 2019-10-06 + - Added fast Swim + Changelog: - 2019-09-04 - Tweaked RemoveTrees Scripts (better performance)