commit ba953320e584a9a6873f52ace06fdaba9e6a4cc5 Author: cclecle Date: Mon Nov 28 01:02:02 2022 +0000 first commit diff --git a/Readme.txt b/Readme.txt new file mode 100644 index 0000000..5c8927d --- /dev/null +++ b/Readme.txt @@ -0,0 +1,29 @@ +ChaChaFastWeaponSwitch - ChaCha (2022) + +== A FastWeaponSwitch mutator for UT2004 ! == + + +Behavior: +-> All weapon should switch in 0.1s + +Single player on your computer: +=> Install package (sources not needed) +=> Enable the mutator in UT menu + + +Multiplayer: +=> Install package (sources not needed) +=> Install redirect +=> Add ChaChaFastWeaponSwitch to ServerPackages +=> Add ChaChaFastWeaponSwitch.MutChaChaFastWeaponSwitch to Mutator list + +Both: +=> It is possible to change defaut switch time in UT2004.ini: + +[ChaChaFastWeaponSwitch.MutChaChaFastWeaponSwitch] +PutDownTime=0.1 +BringUpTime=0.1 + + +Version History: +v1a (11/22): Initial release diff --git a/Redirect/ChaChaFastWeaponSwitchv1a.u.uz2 b/Redirect/ChaChaFastWeaponSwitchv1a.u.uz2 new file mode 100644 index 0000000..7effadc Binary files /dev/null and b/Redirect/ChaChaFastWeaponSwitchv1a.u.uz2 differ diff --git a/Sources/Classes/MutChaChaFastWeaponSwitch.uc b/Sources/Classes/MutChaChaFastWeaponSwitch.uc new file mode 100644 index 0000000..69e8413 --- /dev/null +++ b/Sources/Classes/MutChaChaFastWeaponSwitch.uc @@ -0,0 +1,42 @@ +class MutChaChaFastWeaponSwitch extends Mutator; + +var config float PutDownTime; +var config float BringUpTime; + +function bool CheckReplacement( Actor Other, out byte bSuperRelevant ) +{ + bSuperRelevant = 0; + + if ( Weapon(Other) != None ) + { + Weapon(Other).PutDownTime=PutDownTime; + Weapon(Other).BringUpTime=BringUpTime; + } + + + return true; +} + +auto state Startup +{ + function bool CheckReplacement( Actor Other, out byte bSuperRelevant ) + { + bSuperRelevant = 0; + + if ( GameReplicationInfo(Other) != None ) + { + GameReplicationInfo(Other).bFastWeaponSwitching = true; + GotoState(''); + } + return true; + } +} + +defaultproperties +{ + GroupName="MutFastWeapSwitch" + FriendlyName="Very Fast Weapons Switch" + Description="Very Fast Weapon Switching" + PutDownTime=0.1 + BringUpTime=0.1 +} diff --git a/Sources/build.bat b/Sources/build.bat new file mode 100644 index 0000000..56c555b --- /dev/null +++ b/Sources/build.bat @@ -0,0 +1,48 @@ +@echo off +setlocal enabledelayedexpansion enableextensions +set BUILD_DIR=%~dp0 + +pushd "%BUILD_DIR%" + +for /f "delims=" %%X IN ('dir /B /A /S *') DO ( + for %%D in ("%%~dpX\.") do ( + set PACKAGE_NAME=%%~nxD + goto FoundPkgName + ) +) + +:FoundPkgName +pushd ..\System + +:: make sure to always rebuild the package +:: New package GUID, No doubts about staleness +del %PACKAGE_NAME%.u +del %PACKAGE_NAME%.ucl + +ucc make -ini="%BUILD_DIR%make.ini" + +popd +:: dont do the post-process steps if compilation failed +if ERRORLEVEL 1 goto cleanup +pushd ..\System + +:: Generate compressed file for redirects +ucc compress %PACKAGE_NAME%.u + +:: Dump i18n strings +del %PACKAGE_NAME%.int +ucc dumpint %PACKAGE_NAME%.u + +:: copy to release location +copy %PACKAGE_NAME%.u "%BUILD_DIR%System" >NUL +copy %PACKAGE_NAME%.ucl "%BUILD_DIR%System" >NUL +copy %PACKAGE_NAME%.int "%BUILD_DIR%System" >NUL +copy %PACKAGE_NAME%.u.uz2 "%BUILD_DIR%System" >NUL + +popd + +if exist "PostBuildHook.bat" call "PostBuildHook.bat" + +:cleanup +popd +endlocal diff --git a/Sources/make.ini b/Sources/make.ini new file mode 100644 index 0000000..1c73f11 --- /dev/null +++ b/Sources/make.ini @@ -0,0 +1,56 @@ +[Engine.Engine] +EditorEngine=Editor.EditorEngine + +[Editor.EditorEngine] +CacheSizeMegs=32 +EditPackages=Core +EditPackages=Engine +EditPackages=Fire +EditPackages=Editor +EditPackages=UnrealEd +EditPackages=IpDrv +EditPackages=UWeb +EditPackages=GamePlay +EditPackages=UnrealGame +EditPackages=XGame_rc +EditPackages=XEffects +EditPackages=XWeapons_rc +EditPackages=XPickups_rc +EditPackages=XPickups +EditPackages=XGame +EditPackages=XWeapons +EditPackages=XInterface +EditPackages=XAdmin +EditPackages=XWebAdmin +EditPackages=Vehicles +EditPackages=BonusPack +EditPackages=SkaarjPack_rc +EditPackages=SkaarjPack +EditPackages=UTClassic +EditPackages=UT2k4Assault +EditPackages=Onslaught +EditPackages=GUI2K4 +EditPackages=UT2k4AssaultFull +EditPackages=OnslaughtFull +EditPackages=xVoting +EditPackages=StreamlineFX +EditPackages=UTV2004c +EditPackages=UTV2004s +EditPackages=ChaChaFastWeaponSwitchv1a + +[Core.System] +SavePath=../Save +CachePath=../Cache +CacheExt=.uxx +CacheRecordPath=../System/*.ucl +MusicPath=../Music +SpeechPath=../Speech +Paths=../System/*.u +Paths=../Maps/*.ut2 +Paths=../Textures/*.utx +Paths=../Sounds/*.uax +Paths=Sounds/*.uax +Paths=../Music/*.umx +Paths=../StaticMeshes/*.usx +Paths=../Animations/*.ukx +Paths=../Saves/*.uvx diff --git a/System/ChaChaFastWeaponSwitchv1a.int b/System/ChaChaFastWeaponSwitchv1a.int new file mode 100644 index 0000000..c298e9c --- /dev/null +++ b/System/ChaChaFastWeaponSwitchv1a.int @@ -0,0 +1,4 @@ +[MutChaChaFastWeaponSwitch] +FriendlyName="Very Fast Weapons Switch" +Description="Very Fast Weapon Switching" + diff --git a/System/ChaChaFastWeaponSwitchv1a.u b/System/ChaChaFastWeaponSwitchv1a.u new file mode 100644 index 0000000..7c65587 Binary files /dev/null and b/System/ChaChaFastWeaponSwitchv1a.u differ diff --git a/System/ChaChaFastWeaponSwitchv1a.ucl b/System/ChaChaFastWeaponSwitchv1a.ucl new file mode 100644 index 0000000..b728b60 --- /dev/null +++ b/System/ChaChaFastWeaponSwitchv1a.ucl @@ -0,0 +1 @@ +Mutator=(ClassName=ChaChaFastWeaponSwitchv1a.MutChaChaFastWeaponSwitch,GroupName=MutFastWeapSwitch,IconMaterialName=MutatorArt.nosym,FriendlyName=ChaChaFastWeaponSwitchv1a.MutChaChaFastWeaponSwitch.FriendlyName,Description=ChaChaFastWeaponSwitchv1a.MutChaChaFastWeaponSwitch.Description,FriendlyName=ChaChaFastWeaponSwitchv1a.MutChaChaFastWeaponSwitch.FriendlyName,FallbackName="Very Fast Weapons Switch",FallbackDesc="Very Fast Weapon Switching") \ No newline at end of file