Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Shtoyan committed Apr 16, 2021
1 parent 6245555 commit ab3d990
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 1 deletion.
23 changes: 23 additions & 0 deletions Classes/FPSpinMut.uc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
class FPSpinMut extends Mutator;


function bool CheckReplacement(Actor Other, out byte bSuperRelevant)
{
// FP is spawned at this moment, we catch
// the bugged Avoid Marker it spawns later
if (Other.Class.Name == 'FleshpoundAvoidArea')
{
// and replace it with out fixed Marker
ReplaceWith(Other,"FPSpinMut.NewAvoidMarker");
return false;
}
return super.CheckReplacement(Other,bSuperRelevant);
}


defaultproperties
{
GroupName="KF-QOLMutators"
FriendlyName="FPSpinMut"
Description="Removes fucking FP spins when they start to rage while touching each other."
}
44 changes: 44 additions & 0 deletions Classes/NewAvoidMarker.uc
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
class NewAvoidMarker extends FleshPoundAvoidArea;


// set KFMonst to owner
function PreBeginPlay()
{
super.PreBeginPlay();
InitFor(KFMonster(owner));
SetTimer(5.0,true);
}


// set a timer to destroy our actor after zed death
function Timer()
{
super.Timer();
if (KFMonst == none)
Destroy();
}


// added KFMonsterController check
function Touch(actor Other)
{
if ((Pawn(Other) != none) && KFMonsterController(Pawn(Other).Controller) != none && RelevantTo(Pawn(Other)))
KFMonsterController(Pawn(Other).Controller).AvoidThisMonster(KFMonst);
}


// added health check, 1500 is FP's base health
function bool RelevantTo(Pawn P)
{
local KFMonster M;

M = KFMonster(p);
if (M != none && M.default.Health >= 1500)
return false;

return ( KFMonst != none && VSizeSquared(KFMonst.Velocity) >= 75 && Super.RelevantTo(P)
&& KFMonst.Velocity dot (P.Location - KFMonst.Location) > 0 );
}


defaultproperties{}
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,23 @@
# FPSpinMut
# FP Spin Fix

![GitHub all releases](https://img.shields.io/github/downloads/InsultingPros/FPSpinMut/total)

Server side mutator, fixes Fleshpound spinning on another Fleshpound, and all issues comming from that.

## Installation

```cpp
FPSpinMut.FPSpinMut
```

## Building and Dependancies

At the moment of 2021.03.27 there are no dependencies.

```cpp
EditPackages=FPSpinMut
```

## Steam workshop

<https://steamcommunity.com/sharedfiles/filedetails/?id=2046199794>

0 comments on commit ab3d990

Please sign in to comment.