mirror of
https://github.com/psforever/PSF-LoginServer.git
synced 2026-07-15 16:34:42 +00:00
pausing teleporting player rendering
This commit is contained in:
parent
4f74dbaf80
commit
e5d5e65c7f
4 changed files with 60 additions and 39 deletions
|
|
@ -574,7 +574,7 @@ class AvatarHandlerLogic(val ops: SessionAvatarHandlers, implicit val context: A
|
||||||
sessionLogic.actionsToCancel()
|
sessionLogic.actionsToCancel()
|
||||||
sessionLogic.terminals.CancelAllProximityUnits()
|
sessionLogic.terminals.CancelAllProximityUnits()
|
||||||
AvatarActor.savePlayerLocation(player)
|
AvatarActor.savePlayerLocation(player)
|
||||||
sessionLogic.zoning.spawn.shiftPosition = Some(player.Position)
|
sessionLogic.zoning.spawn.ShiftPosition = Some(player.Position)
|
||||||
|
|
||||||
//respawn
|
//respawn
|
||||||
val respawnTimer = 300000 //milliseconds
|
val respawnTimer = 300000 //milliseconds
|
||||||
|
|
|
||||||
|
|
@ -169,7 +169,16 @@ class GeneralLogic(val ops: GeneralOperations, implicit val context: ActorContex
|
||||||
//
|
//
|
||||||
val eagleEye: Boolean = ops.canSeeReallyFar
|
val eagleEye: Boolean = ops.canSeeReallyFar
|
||||||
val isNotVisible: Boolean = sessionLogic.zoning.zoningStatus == Zoning.Status.Deconstructing ||
|
val isNotVisible: Boolean = sessionLogic.zoning.zoningStatus == Zoning.Status.Deconstructing ||
|
||||||
(player.isAlive && sessionLogic.zoning.spawn.deadState == DeadState.RespawnTime)
|
(player.isAlive && sessionLogic.zoning.spawn.deadState == DeadState.RespawnTime) ||
|
||||||
|
(sessionLogic.zoning.spawn.ShiftPosition match {
|
||||||
|
case Some(position) if Vector3.DistanceSquared(position, pos) < 25f =>
|
||||||
|
sessionLogic.zoning.spawn.ShiftPosition = None
|
||||||
|
false
|
||||||
|
case Some(_) =>
|
||||||
|
true
|
||||||
|
case _ =>
|
||||||
|
false
|
||||||
|
})
|
||||||
continent.AvatarEvents ! AvatarServiceMessage(
|
continent.AvatarEvents ! AvatarServiceMessage(
|
||||||
continent.id,
|
continent.id,
|
||||||
AvatarAction.PlayerState(
|
AvatarAction.PlayerState(
|
||||||
|
|
|
||||||
|
|
@ -182,7 +182,7 @@ class GeneralOperations(
|
||||||
) extends CommonSessionInterfacingFunctionality {
|
) extends CommonSessionInterfacingFunctionality {
|
||||||
private[session] var progressBarValue: Option[Float] = None
|
private[session] var progressBarValue: Option[Float] = None
|
||||||
private[session] var accessedContainer: Option[PlanetSideGameObject with Container] = None
|
private[session] var accessedContainer: Option[PlanetSideGameObject with Container] = None
|
||||||
private[session] var recentTeleportAttempt: Long = 0
|
private[session] var recentTeleportAttemptTime: Long = 0
|
||||||
private[session] var kitToBeUsed: Option[PlanetSideGUID] = None
|
private[session] var kitToBeUsed: Option[PlanetSideGUID] = None
|
||||||
// If a special item (e.g. LLU) has been attached to the player the GUID should be stored here, or cleared when dropped, since the drop hotkey doesn't send the GUID of the object to be dropped.
|
// If a special item (e.g. LLU) has been attached to the player the GUID should be stored here, or cleared when dropped, since the drop hotkey doesn't send the GUID of the object to be dropped.
|
||||||
private[session] var specialItemSlotGuid: Option[PlanetSideGUID] = None
|
private[session] var specialItemSlotGuid: Option[PlanetSideGUID] = None
|
||||||
|
|
@ -1424,38 +1424,38 @@ class GeneralOperations(
|
||||||
dest: PlanetSideGameObject with TelepadLike
|
dest: PlanetSideGameObject with TelepadLike
|
||||||
): Unit = {
|
): Unit = {
|
||||||
val time = System.currentTimeMillis()
|
val time = System.currentTimeMillis()
|
||||||
if (
|
if (time - recentTeleportAttemptTime > 2000L) {
|
||||||
time - recentTeleportAttempt > 2000L && router.DeploymentState == DriveState.Deployed &&
|
if (router.DeploymentState == DriveState.Deployed && internalTelepad.Active && remoteTelepad.Active) {
|
||||||
internalTelepad.Active &&
|
val pguid = player.GUID
|
||||||
remoteTelepad.Active
|
val sguid = src.GUID
|
||||||
) {
|
val dguid = dest.GUID
|
||||||
val pguid = player.GUID
|
val events = continent.AvatarEvents
|
||||||
val sguid = src.GUID
|
val zoneid = continent.id
|
||||||
val dguid = dest.GUID
|
val destinationPosition = dest.Position
|
||||||
val events = continent.AvatarEvents
|
events ! AvatarServiceMessage(zoneid, AvatarAction.ObjectDelete(pguid, pguid))
|
||||||
val zoneid = continent.id
|
events ! AvatarServiceMessage(player.Name,
|
||||||
events ! AvatarServiceMessage(zoneid, AvatarAction.ObjectDelete(pguid, pguid))
|
AvatarAction.SendResponse(PlanetSideGUID(0), PlayerStateShiftMessage(ShiftState(0, destinationPosition, player.Orientation.z)))
|
||||||
events ! AvatarServiceMessage(player.Name,
|
)
|
||||||
AvatarAction.SendResponse(PlanetSideGUID(0), PlayerStateShiftMessage(ShiftState(0, dest.Position, player.Orientation.z)))
|
player.Position = destinationPosition
|
||||||
)
|
events ! AvatarServiceMessage(zoneid, AvatarAction.LoadPlayer(
|
||||||
player.Position = dest.Position
|
pguid,
|
||||||
events ! AvatarServiceMessage(zoneid, AvatarAction.LoadPlayer(
|
player.Definition.ObjectId,
|
||||||
pguid,
|
pguid,
|
||||||
player.Definition.ObjectId,
|
player.Definition.Packet.ConstructorData(player).get,
|
||||||
pguid,
|
None
|
||||||
player.Definition.Packet.ConstructorData(player).get,
|
))
|
||||||
None
|
useRouterTelepadEffect(pguid, sguid, dguid)
|
||||||
))
|
continent.LocalEvents ! LocalServiceMessage(
|
||||||
useRouterTelepadEffect(pguid, sguid, dguid)
|
continent.id,
|
||||||
continent.LocalEvents ! LocalServiceMessage(
|
LocalAction.RouterTelepadTransport(pguid, pguid, sguid, dguid)
|
||||||
zoneid,
|
)
|
||||||
LocalAction.RouterTelepadTransport(pguid, pguid, sguid, dguid)
|
sessionLogic.zoning.spawn.ShiftPosition = destinationPosition
|
||||||
)
|
player.LogActivity(TelepadUseActivity(VehicleSource(router), DeployableSource(remoteTelepad), PlayerSource(player)))
|
||||||
player.LogActivity(TelepadUseActivity(VehicleSource(router), DeployableSource(remoteTelepad), PlayerSource(player)))
|
} else {
|
||||||
} else {
|
log.warn(s"UseRouterTelepadSystem: ${player.Name} can not teleport")
|
||||||
log.warn(s"UseRouterTelepadSystem: ${player.Name} can not teleport")
|
}
|
||||||
}
|
}
|
||||||
recentTeleportAttempt = time
|
recentTeleportAttemptTime = time
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1475,7 +1475,7 @@ class GeneralOperations(
|
||||||
): Unit = {
|
): Unit = {
|
||||||
val time = System.currentTimeMillis()
|
val time = System.currentTimeMillis()
|
||||||
if (
|
if (
|
||||||
time - recentTeleportAttempt > 2000L && router.DeploymentState == DriveState.Deployed &&
|
time - recentTeleportAttemptTime > 2000L && router.DeploymentState == DriveState.Deployed &&
|
||||||
internalTelepad.Active &&
|
internalTelepad.Active &&
|
||||||
remoteTelepad.Active
|
remoteTelepad.Active
|
||||||
) {
|
) {
|
||||||
|
|
@ -1488,7 +1488,7 @@ class GeneralOperations(
|
||||||
} else {
|
} else {
|
||||||
log.warn(s"UseRouterTelepadSystem: ${player.Name} can not teleport")
|
log.warn(s"UseRouterTelepadSystem: ${player.Name} can not teleport")
|
||||||
}
|
}
|
||||||
recentTeleportAttempt = time
|
recentTeleportAttemptTime = time
|
||||||
}
|
}
|
||||||
|
|
||||||
def handleUseCaptureFlag(obj: CaptureFlag): Unit = {
|
def handleUseCaptureFlag(obj: CaptureFlag): Unit = {
|
||||||
|
|
|
||||||
|
|
@ -1998,7 +1998,7 @@ class ZoningOperations(
|
||||||
* As they should arrive roughly every 250 milliseconds this allows for a very crude method of scheduling tasks up to four times per second
|
* As they should arrive roughly every 250 milliseconds this allows for a very crude method of scheduling tasks up to four times per second
|
||||||
*/
|
*/
|
||||||
private[session] var upstreamMessageCount: Int = 0
|
private[session] var upstreamMessageCount: Int = 0
|
||||||
private[session] var shiftPosition: Option[Vector3] = None
|
private var shiftPosition: Option[Vector3] = None
|
||||||
private[session] var shiftOrientation: Option[Vector3] = None
|
private[session] var shiftOrientation: Option[Vector3] = None
|
||||||
private[session] var drawDeloyableIcon: PlanetSideGameObject with Deployable => Unit = RedrawDeployableIcons
|
private[session] var drawDeloyableIcon: PlanetSideGameObject with Deployable => Unit = RedrawDeployableIcons
|
||||||
private[session] var populateAvatarAwardRibbonsFunc: (Int, Long) => Unit = setupAvatarAwardMessageDelivery
|
private[session] var populateAvatarAwardRibbonsFunc: (Int, Long) => Unit = setupAvatarAwardMessageDelivery
|
||||||
|
|
@ -4120,6 +4120,18 @@ class ZoningOperations(
|
||||||
def clearAllQueuedActivity(): Unit = {
|
def clearAllQueuedActivity(): Unit = {
|
||||||
queuedActivities = Seq()
|
queuedActivities = Seq()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def ShiftPosition: Option[Vector3] = shiftPosition
|
||||||
|
|
||||||
|
def ShiftPosition_=(toPosition: Option[Vector3]): Option[Vector3] = {
|
||||||
|
shiftPosition = toPosition
|
||||||
|
ShiftPosition
|
||||||
|
}
|
||||||
|
|
||||||
|
def ShiftPosition_=(toPosition: Vector3): Option[Vector3] = {
|
||||||
|
shiftPosition = Some(toPosition)
|
||||||
|
ShiftPosition
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def doorsThatShouldBeClosedOrBeOpenedByRange(
|
def doorsThatShouldBeClosedOrBeOpenedByRange(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue