mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-07-14 07:55:07 +00:00
Override LLU position to match player position if carried
This commit is contained in:
parent
70d47c7731
commit
f7caf2f880
1 changed files with 8 additions and 3 deletions
|
|
@ -20,15 +20,20 @@ class CaptureFlag(tDef: CaptureFlagDefinition) extends Amenity {
|
||||||
target
|
target
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
// Since a LLU belongs to a base, but needs to be picked up by the enemy faction we need to be able to override the faction that owns the LLU to the hacker faction
|
||||||
* Since a LLU belongs to a base, but needs to be picked up by the enemy faction we need to be able to override the faction that owns the LLU to the hacker faction
|
|
||||||
*/
|
|
||||||
override def Faction: PlanetSideEmpire.Value = faction
|
override def Faction: PlanetSideEmpire.Value = faction
|
||||||
override def Faction_=(new_faction: PlanetSideEmpire.Value): PlanetSideEmpire.Value = {
|
override def Faction_=(new_faction: PlanetSideEmpire.Value): PlanetSideEmpire.Value = {
|
||||||
faction = new_faction
|
faction = new_faction
|
||||||
faction
|
faction
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// When the flag is carried by a player, the position returned should be that of the carrier not the flag
|
||||||
|
override def Position: Vector3 = if (Carrier.nonEmpty) {
|
||||||
|
carrier.get.Position
|
||||||
|
} else {
|
||||||
|
Entity.Position
|
||||||
|
}
|
||||||
|
|
||||||
def Carrier: Option[Player] = carrier
|
def Carrier: Option[Player] = carrier
|
||||||
def Carrier_=(new_carrier: Option[Player]) : Option[Player] = {
|
def Carrier_=(new_carrier: Option[Player]) : Option[Player] = {
|
||||||
carrier = new_carrier
|
carrier = new_carrier
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue