Skip to content

Commit

Permalink
Fixed issue with ball phasing through players shortly after deflecting
Browse files Browse the repository at this point in the history
  • Loading branch information
Mazawrath committed Feb 25, 2023
1 parent d9f8393 commit 48b4d38
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/Genji-Dodgeball.opy
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ subroutine DeflectFailed 2
subroutine ShortFun 3
subroutine LongFun 4
subroutine StartBreak 5
subroutine BallCurve 6


#Activated extensions
Expand Down Expand Up @@ -878,14 +879,7 @@ rule "Ball reaches player":
isPassingTeam1 = false
heal(previousTargetedPlayer, null, passingDamage)
targetedPlayer = ((sorted([player for player in getLivingPlayers(Team.ALL) if player != previousTargetedPlayer and player.getCurrentHero() != ballHero], lambda i: angleBetweenVectors(targetedPlayer.getFacingDirection(), directionTowards(targetedPlayer, i.getPosition()))))[0])
if rulesetMode == 0:
ballDirectionRate = 6
wait(0.05)
ballDirectionRate = 1.75
# pls Blizzard let me do if RULE_CONDITION and rulesetMode == 1:
elif rulesetMode == 1:
if RULE_CONDITION:
goto RULE_START
async(BallCurve(), AsyncBehavior.RESTART)


rule "Ball reaches player -TEAMS":
Expand Down Expand Up @@ -958,6 +952,10 @@ rule "Ball reaches player -TEAMS":
isPassingTeam1 = false
isPassingTeam2 = false
targetedPlayer = ((sorted([player for player in getLivingPlayers(getOppositeTeam(previousTargetedPlayer.getTeam())) if player != previousTargetedPlayer], lambda i: angleBetweenVectors(targetedPlayer.getFacingDirection(), directionTowards(targetedPlayer, i.getPosition()))))[0])
async(BallCurve(), AsyncBehavior.RESTART)


def BallCurve():
if rulesetMode == 0:
ballDirectionRate = 6
wait(0.05)
Expand Down

0 comments on commit 48b4d38

Please sign in to comment.