Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // DECORATE
- Actor NullWeapon : Weapon {
- Tag "Unarmed"
- +Inventory.Undroppable +Weapon.Wimpy_Weapon +Weapon.CheatNotWeapon +NoInteraction
- +Weapon.NoAlert
- Height 0
- Radius 0
- States {
- Spawn:
- TNT1 A 0
- Stop
- Select:
- TNT1 A 1 A_Raise
- TNT1 A 0 A_Raise
- Wait
- Deselect:
- TNT1 A 0 A_Lower
- Wait
- Ready:
- TNT1 A 1 A_WeaponReady (WRF_NOFIRE|WRF_NOBOB|WRF_NOSWITCH)
- Loop
- Fire:
- TNT1 A 1
- Goto Ready
- }
- }
- Actor FDSprinting : Boolean { }
- Actor SprintWeapon : NullWeapon {
- States {
- Ready:
- TNT1 A 1 A_WeaponReady (WRF_NOFIRE|WRF_NOBOB|WRF_NOSWITCH)
- TNT1 A 1 A_GiveInventory ("FDSprinting", 1)
- TNT1 A 1 A_WeaponReady (WRF_NOFIRE|WRF_NOBOB|WRF_NOSWITCH)
- Wait
- Deselect:
- TNT1 A 1 A_TakeInventory ("FDSprinting", 99999)
- TNT1 A 1 A_Lower
- TNT1 A 0 A_Lower
- Wait
- }
- }
- // ACS
- int FD_SS_OldSpeed [MAXPLAYERS];
- int FD_SS_Sprinting [MAXPLAYERS];
- int FD_SR_StaminaEmpty [MAXPLAYERS];
- script "FDSprintSystem" ENTER {
- if (GameType () == Game_Title_Map) Terminate;
- int tics = 0;
- While (TRUE) {
- if (CheckInventory ("SprintWeapon") && FD_SS_Sprinting [PlayerNumber ()] == 0) {
- SetActorProperty (0, APROP_Speed, FD_SS_OldSpeed [PlayerNumber ()]);
- DisableWeapon ("SprintWeapon");
- FD_SS_Sprinting [PlayerNumber ()] = 0;
- tics = 0;
- }
- if (keyDown (BT_USER1) && FD_SS_Sprinting [PlayerNumber ()] == 0 && CheckInventory ("FDStamina") >= 5 && !FD_SR_StaminaEmpty [PlayerNumber ()]) {
- DisableWeapon ("SprintWeapon");
- FD_SS_Sprinting [PlayerNumber ()] = 1;
- FD_SS_OldSpeed [PlayerNumber ()] = GetActorProperty (0, APROP_Speed);
- }
- if (keyUp (BT_USER1) && FD_SS_Sprinting [PlayerNumber ()] && !FD_SR_StaminaEmpty [PlayerNumber ()]) {
- SetActorProperty (0, APROP_Speed, FD_SS_OldSpeed [PlayerNumber ()]);
- DisableWeapon ("SprintWeapon");
- FD_SS_Sprinting [PlayerNumber ()] = 0;
- tics = 0;
- }
- if (CheckInventory ("FDSprinting") && FD_SS_Sprinting [PlayerNumber ()]) {
- if (CheckInventory ("FDStamina") >= 5)
- {
- if (CheckInventory ("FDSprinting") && tics >= 5) {
- tics = 0;
- if (!CheckInventory("PowerAgilityRune") && GetVelocity () > 0)
- TakeInventory ("FDStamina", 5);
- }
- if (CheckInventory ("FDStamina") < 5) {
- SetActorProperty (0, APROP_Speed, FD_SS_OldSpeed [PlayerNumber ()]);
- DisableWeapon ("SprintWeapon");
- FD_SS_Sprinting [PlayerNumber ()] = 0;
- FD_SR_StaminaEmpty [PlayerNumber ()] = 1;
- restart;
- }
- if (CheckInventory ("FDSprinting") && ((abs (GetPlayerInput (-1, INPUT_FORWARDMOVE)) > 6400) || (abs (GetPlayerInput(-1, INPUT_SIDEMOVE)) > 6400)))
- SetActorProperty (0, APROP_Speed, 1.6);
- else if (CheckInventory ("FDSprinting") && !((abs (GetPlayerInput (-1, INPUT_FORWARDMOVE)) > 6400) || (abs (GetPlayerInput(-1, INPUT_SIDEMOVE)) > 6400)))
- SetActorProperty (0, APROP_Speed, 2.6);
- else if (!CheckInventory ("FDSprinting"))
- SetActorProperty (0, APROP_Speed, FD_SS_OldSpeed [PlayerNumber ()]);
- }
- }
- Delay (1);
- if (FD_SS_Sprinting [PlayerNumber ()])
- tics++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement