Skip to content

Commit

Permalink
Add some exclusions for flood effect. Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
theastropath committed Apr 23, 2024
1 parent f8cbf69 commit bcdc917
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Classes/HeadShotsOnlyRules.uc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function int NetDamage( int OriginalDamage, int Damage, pawn injured, pawn insti
return NextGameRules.NetDamage( OriginalDamage,Damage,injured,instigatedBy,HitLocation,Momentum,DamageType );

//Sneak these special Crowd Control damage types past the headshot restriction
if (DamageType==class'HotPotato' || DamageType==class'Thanos' || DamageType==class'Thorns'){
if (DamageType==class'HotPotato' || DamageType==class'ThanosSnapped' || DamageType==class'Thorns'){
return Damage;
}

Expand Down
33 changes: 29 additions & 4 deletions Classes/UT2k4CCEffects.uc
Original file line number Diff line number Diff line change
Expand Up @@ -1340,7 +1340,7 @@ function bool IsAdrenalineActive()
return c.bAdrenalineEnabled;
}

foreach AllActors(class'AdrenalinePickup'){
foreach AllActors(class'AdrenalinePickup',p){
return True;
}

Expand Down Expand Up @@ -1483,7 +1483,9 @@ function int GottaGoFast(String viewer, int duration)
if (speedTimer>0) {
return TempFail;
}
if (floodTimer>0) {
return TempFail;
}
SetAllPlayersGroundSpeed(class'Pawn'.Default.GroundSpeed * 3);
if (duration==0){
duration = SpeedTimerDefault;
Expand All @@ -1501,7 +1503,9 @@ function int GottaGoSlow(String viewer, int duration)
if (speedTimer>0) {
return TempFail;
}
if (floodTimer>0) {
return TempFail;
}
SetAllPlayersGroundSpeed(class'Pawn'.Default.GroundSpeed / 3);
if (duration==0){
Expand Down Expand Up @@ -2428,6 +2432,9 @@ function int EnableMoonPhysics(string viewer, int duration)
if (gravityTimer>0) {
return TempFail;
}
if (floodTimer>0) {
return TempFail;
}
if (duration==0){
duration = GravityTimerDefault;
}
Expand All @@ -2443,6 +2450,10 @@ function int EnableIcePhysics(string viewer, int duration)
if (iceTimer>0) {
return TempFail;
}

if (floodTimer>0) {
return TempFail;
}

if (duration==0){
duration = IceTimerDefault;
Expand All @@ -2460,6 +2471,18 @@ function int StartFlood(string viewer, int duration)
if (floodTimer>0) {
return TempFail;
}
if (iceTimer>0) {
return TempFail;
}
if (gravityTimer>0) {
return TempFail;
}
if (octoJumpTimer>0) {
return TempFail;
}
if (speedTimer>0) {
return TempFail;
}
Broadcast(viewer@"started a flood!");

SetFlood(True);
Expand Down Expand Up @@ -2755,7 +2778,9 @@ function int StartOctoJump(String viewer, int duration)
if (octoJumpTimer>0) {
return TempFail;
}

if (floodTimer>0) {
return TempFail;
}
foreach AllActors(class'xPawn',p){
origNumJumps=p.MaxMultiJump;
break;
Expand Down

0 comments on commit bcdc917

Please sign in to comment.