mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-03-04 12:40:20 +00:00
added a door in home3 HART C that I missed; modified AvatarConverter and VehicleConverter to correctly handle multiple players in vehicles at world join time; began implementation of this procedure in WSA, but independent creation of players in implant terminals is giving trouble; fixed a ludicrous oversight with the bitsize of players without outfits
This commit is contained in:
parent
389d0b4d82
commit
caf56c4e72
10 changed files with 267 additions and 91 deletions
|
|
@ -473,6 +473,7 @@ object Maps {
|
|||
LocalObject(396, Door.Constructor)
|
||||
LocalObject(397, Door.Constructor)
|
||||
LocalObject(398, Door.Constructor)
|
||||
LocalObject(399, Door.Constructor)
|
||||
LocalObject(462, Door.Constructor)
|
||||
LocalObject(463, Door.Constructor)
|
||||
LocalObject(522, ImplantTerminalMech.Constructor)
|
||||
|
|
@ -520,6 +521,7 @@ object Maps {
|
|||
ObjectToBuilding(396, 2)
|
||||
ObjectToBuilding(397, 2)
|
||||
ObjectToBuilding(398, 2)
|
||||
ObjectToBuilding(399, 2)
|
||||
ObjectToBuilding(462, 2)
|
||||
ObjectToBuilding(463, 2)
|
||||
ObjectToBuilding(522, 2)
|
||||
|
|
|
|||
|
|
@ -1649,30 +1649,23 @@ class WorldSessionActor extends Actor with MDCContextAware {
|
|||
)
|
||||
})
|
||||
//load active players in zone
|
||||
continent.LivePlayers.filterNot(_.GUID == player.GUID).foreach(char => {
|
||||
sendResponse(ObjectCreateMessage(ObjectClass.avatar, char.GUID, char.Definition.Packet.ConstructorData(char).get))
|
||||
if(char.UsingSpecial == SpecialExoSuitDefinition.Mode.Anchored) {
|
||||
sendResponse(PlanetsideAttributeMessage(char.GUID, 19, 1))
|
||||
}
|
||||
})
|
||||
continent.LivePlayers
|
||||
.filterNot(tplayer => { tplayer.GUID == player.GUID || tplayer.VehicleSeated.nonEmpty })
|
||||
.foreach(char => {
|
||||
sendResponse(ObjectCreateMessage(ObjectClass.avatar, char.GUID, char.Definition.Packet.ConstructorData(char).get))
|
||||
if(char.UsingSpecial == SpecialExoSuitDefinition.Mode.Anchored) {
|
||||
sendResponse(PlanetsideAttributeMessage(char.GUID, 19, 1))
|
||||
}
|
||||
})
|
||||
//load corpses in zone
|
||||
continent.Corpses.foreach {
|
||||
TurnPlayerIntoCorpse
|
||||
}
|
||||
var mountedPlayers : Set[Player] = Set.empty //players in vehicles
|
||||
//load active vehicles in zone
|
||||
continent.Vehicles.foreach(vehicle => {
|
||||
val definition = vehicle.Definition
|
||||
sendResponse(ObjectCreateMessage(definition.ObjectId, vehicle.GUID, definition.Packet.ConstructorData(vehicle).get))
|
||||
//seat vehicle occupants
|
||||
definition.MountPoints.values.foreach(seat_num => {
|
||||
vehicle.Seat(seat_num).get.Occupant match {
|
||||
case Some(tplayer) =>
|
||||
if(tplayer.HasGUID) {
|
||||
sendResponse(ObjectAttachMessage(vehicle.GUID, tplayer.GUID, seat_num))
|
||||
}
|
||||
case None => ;
|
||||
}
|
||||
})
|
||||
ReloadVehicleAccessPermissions(vehicle)
|
||||
})
|
||||
//implant terminals
|
||||
|
|
@ -1692,8 +1685,28 @@ class WorldSessionActor extends Actor with MDCContextAware {
|
|||
case _ => ;
|
||||
}
|
||||
//seat terminal occupants
|
||||
import net.psforever.objects.definition.converter.AvatarConverter
|
||||
continent.GUID(terminal_guid) match {
|
||||
case Some(obj : Mountable) =>
|
||||
obj.Seats
|
||||
.filter({ case(_, seat) => seat.isOccupied })
|
||||
.foreach({ case(index, seat) =>
|
||||
val tplayer = seat.Occupant.get
|
||||
val tdefintion = tplayer.Definition
|
||||
sendResponse(ObjectCreateMessage(
|
||||
tdefintion.ObjectId,
|
||||
tplayer.GUID,
|
||||
ObjectCreateMessageParent(parent_guid, index),
|
||||
PlayerData(
|
||||
AvatarConverter.MakeAppearanceData(tplayer),
|
||||
AvatarConverter.MakeCharacterData(tplayer),
|
||||
AvatarConverter.MakeInventoryData(tplayer),
|
||||
AvatarConverter.GetDrawnSlot(tplayer),
|
||||
0
|
||||
)
|
||||
))
|
||||
})
|
||||
|
||||
obj.MountPoints.foreach({ case ((_, seat_num)) =>
|
||||
obj.Seat(seat_num).get.Occupant match {
|
||||
case Some(tplayer) =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue