mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-07-13 23:44:40 +00:00
Cloak Fix (#269)
* player maintains cloaked state during continent transfers; cloak state is properly communicated to any vehicle the player spawns that can cloak * cloaking/mounting excpetion for the Wraith
This commit is contained in:
parent
612bceb440
commit
4c77c2788b
4 changed files with 16 additions and 9 deletions
|
|
@ -341,7 +341,7 @@ class Player(private val core : Avatar) extends PlanetSideGameObject
|
|||
Jumping
|
||||
}
|
||||
|
||||
def Cloaked : Boolean = jumping
|
||||
def Cloaked : Boolean = cloaked
|
||||
|
||||
def Cloaked_=(isCloaked : Boolean) : Boolean = {
|
||||
cloaked = isCloaked
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ class VehicleSpawnControlLoadVehicle(pad : VehicleSpawnPad) extends VehicleSpawn
|
|||
//load the vehicle in the spawn pad trench, underground, initially
|
||||
vehicle.Position = vehicle.Position - Vector3(0, 0, if(GlobalDefinitions.isFlightVehicle(vehicle.Definition)) 9 else 5)
|
||||
}
|
||||
vehicle.Cloaked = vehicle.Definition.CanCloak && entry.driver.Cloaked
|
||||
Continent.VehicleEvents ! VehicleSpawnPad.LoadVehicle(vehicle, Continent)
|
||||
context.system.scheduler.scheduleOnce(100 milliseconds, railJack, VehicleSpawnControl.Process.RailJackAction(entry))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import scodec.codecs._
|
|||
* values in between are possible;
|
||||
* vehicles that hover also influence this field as expected
|
||||
* @param unk5 na - Possibly a flag to indicate the vehicle is attached to something else e.g. is in a galaxy/lodestar cargo bay
|
||||
* @param unk6 na
|
||||
* @param is_cloaked vehicle is cloaked
|
||||
* @see `PlacementData`
|
||||
*/
|
||||
|
||||
|
|
@ -54,7 +54,7 @@ final case class VehicleStateMessage(vehicle_guid : PlanetSideGUID,
|
|||
unk4 : Int,
|
||||
wheel_direction : Int,
|
||||
unk5 : Boolean,
|
||||
unk6 : Boolean
|
||||
is_cloaked : Boolean
|
||||
) extends PlanetSideGamePacket {
|
||||
type Packet = VehicleStateMessage
|
||||
def opcode = GamePacketOpcode.VehicleStateMessage
|
||||
|
|
@ -85,6 +85,6 @@ object VehicleStateMessage extends Marshallable[VehicleStateMessage] {
|
|||
("unk4" | uint4L) ::
|
||||
("wheel_direction" | uintL(5)) ::
|
||||
("int5" | bool) ::
|
||||
("int6" | bool)
|
||||
("is_cloaked" | bool)
|
||||
).as[VehicleStateMessage]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue