Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix double-chronoshift return location exploit. #14155

Merged
merged 1 commit into from Oct 8, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 8 additions & 2 deletions OpenRA.Mods.Cnc/Traits/Chronoshiftable.cs
Expand Up @@ -101,8 +101,14 @@ public virtual bool Teleport(Actor self, CPos targetLocation, int duration, bool
}

// Set up return-to-origin info
Origin = self.Location;
ReturnTicks = duration;
// If this actor is already counting down to return to
// an existing location then we shouldn't override it
if (ReturnTicks <= 0)
{
Origin = self.Location;
ReturnTicks = duration;
}

this.duration = duration;
this.chronosphere = chronosphere;
this.killCargo = killCargo;
Expand Down