mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-01-20 02:24:45 +00:00
corrections for the shared magazine fire modes of the Aurora; conditions for character rendering when in a vehicle; WeaponJammedMessage -> WeaponDryFireMessage
This commit is contained in:
parent
4059d50e72
commit
c2bcb63725
|
|
@ -1736,7 +1736,7 @@ object GlobalDefinitions {
|
|||
aurora_weapon_systema.FireModes.head.Magazine = 12
|
||||
aurora_weapon_systema.FireModes += new FireModeDefinition
|
||||
aurora_weapon_systema.FireModes(1).AmmoTypeIndices += 0
|
||||
aurora_weapon_systema.FireModes(1).AmmoSlotIndex = 1
|
||||
aurora_weapon_systema.FireModes(1).AmmoSlotIndex = 0
|
||||
aurora_weapon_systema.FireModes(1).Magazine = 12
|
||||
|
||||
aurora_weapon_systemb.Size = EquipmentSize.VehicleWeapon
|
||||
|
|
@ -1747,7 +1747,7 @@ object GlobalDefinitions {
|
|||
aurora_weapon_systemb.FireModes.head.Magazine = 12
|
||||
aurora_weapon_systemb.FireModes += new FireModeDefinition
|
||||
aurora_weapon_systemb.FireModes(1).AmmoTypeIndices += 0
|
||||
aurora_weapon_systemb.FireModes(1).AmmoSlotIndex = 1
|
||||
aurora_weapon_systemb.FireModes(1).AmmoSlotIndex = 0
|
||||
aurora_weapon_systemb.FireModes(1).Magazine = 12
|
||||
|
||||
apc_weapon_systema.Size = EquipmentSize.VehicleWeapon
|
||||
|
|
|
|||
|
|
@ -797,8 +797,8 @@ object ObjectClass {
|
|||
case ObjectClass.aphelion_starfire => ConstructorData.genericCodec(WeaponData.codec, "weapon")
|
||||
case ObjectClass.aphelion_starfire_left => ConstructorData.genericCodec(WeaponData.codec, "weapon")
|
||||
case ObjectClass.aphelion_starfire_right => ConstructorData.genericCodec(WeaponData.codec, "weapon")
|
||||
case ObjectClass.aurora_weapon_systema => ConstructorData.genericCodec(WeaponData.codec(2), "weapon")
|
||||
case ObjectClass.aurora_weapon_systemb => ConstructorData.genericCodec(WeaponData.codec(2), "weapon")
|
||||
case ObjectClass.aurora_weapon_systema => ConstructorData.genericCodec(WeaponData.codec, "weapon")
|
||||
case ObjectClass.aurora_weapon_systemb => ConstructorData.genericCodec(WeaponData.codec, "weapon")
|
||||
case ObjectClass.battlewagon_weapon_systema => ConstructorData.genericCodec(WeaponData.codec, "weapon")
|
||||
case ObjectClass.battlewagon_weapon_systemb => ConstructorData.genericCodec(WeaponData.codec, "weapon")
|
||||
case ObjectClass.battlewagon_weapon_systemc => ConstructorData.genericCodec(WeaponData.codec, "weapon")
|
||||
|
|
|
|||
|
|
@ -106,10 +106,10 @@ object Prefab {
|
|||
VehicleData(CommonFieldData(loc, faction, 0), 0, health, false, false, DriveState.State7, true, false, false, None,
|
||||
Some(InventoryData(
|
||||
InventoryItemData(ObjectClass.aurora_weapon_systema, weapon1_guid, 5,
|
||||
WeaponData(0x6, 0x8, 0, ObjectClass.fluxpod_ammo, ammo11_guid, 0, AmmoBoxData(0x8), ObjectClass.fluxpod_ammo, ammo12_guid, 1, AmmoBoxData(0x8))
|
||||
WeaponData(0x6, 0x8, 0, ObjectClass.fluxpod_ammo, ammo11_guid, 0, AmmoBoxData(0x8))
|
||||
) ::
|
||||
InventoryItemData(ObjectClass.aurora_weapon_systemb, weapon2_guid, 6,
|
||||
WeaponData(0x6, 0x8, 0, ObjectClass.fluxpod_ammo, ammo21_guid, 0, AmmoBoxData(0x8), ObjectClass.fluxpod_ammo, ammo22_guid, 1, AmmoBoxData(0x8))
|
||||
WeaponData(0x6, 0x8, 0, ObjectClass.fluxpod_ammo, ammo21_guid, 0, AmmoBoxData(0x8))
|
||||
) :: Nil
|
||||
))
|
||||
)(VehicleFormat.Normal)
|
||||
|
|
|
|||
|
|
@ -234,6 +234,7 @@ class WorldSessionActor extends Actor with MDCContextAware {
|
|||
case AvatarResponse.PlayerState(msg, spectating, weaponInHand) =>
|
||||
if(player.GUID != guid) {
|
||||
val now = System.currentTimeMillis()
|
||||
|
||||
val (location, time, distanceSq) : (Vector3, Long, Float) = if(spectating) {
|
||||
(Vector3(2, 2, 2), 0L, 0f)
|
||||
}
|
||||
|
|
@ -280,7 +281,7 @@ class WorldSessionActor extends Actor with MDCContextAware {
|
|||
|
||||
case AvatarResponse.WeaponDryFire(weapon_guid) =>
|
||||
if(player.GUID != guid) {
|
||||
sendResponse(PacketCoding.CreateGamePacket(0, WeaponJammedMessage(weapon_guid)))
|
||||
sendResponse(PacketCoding.CreateGamePacket(0, WeaponDryFireMessage(weapon_guid)))
|
||||
}
|
||||
|
||||
case _ => ;
|
||||
|
|
@ -387,6 +388,9 @@ class WorldSessionActor extends Actor with MDCContextAware {
|
|||
case VehicleResponse.VehicleState(vehicle_guid, unk1, pos, ang, vel, unk2, unk3, unk4, wheel_direction, unk5, unk6) =>
|
||||
if(player.GUID != guid) {
|
||||
sendResponse(PacketCoding.CreateGamePacket(0, VehicleStateMessage(vehicle_guid, unk1, pos, ang, vel, unk2, unk3, unk4, wheel_direction, unk5, unk6)))
|
||||
if(player.VehicleSeated.contains(vehicle_guid)) {
|
||||
player.Position = pos
|
||||
}
|
||||
}
|
||||
|
||||
case _ => ;
|
||||
|
|
@ -449,7 +453,7 @@ class WorldSessionActor extends Actor with MDCContextAware {
|
|||
//update mounted weapon belonging to seat
|
||||
weapon.AmmoSlots.foreach(slot => { //update the magazine(s) in the weapon, specifically
|
||||
val magazine = slot.Box
|
||||
sendResponse(PacketCoding.CreateGamePacket(0, InventoryStateMessage(magazine.GUID, 0, weapon.GUID, magazine.Capacity.toLong)))
|
||||
sendResponse(PacketCoding.CreateGamePacket(0, InventoryStateMessage(magazine.GUID, weapon.GUID, magazine.Capacity.toLong)))
|
||||
})
|
||||
case _ => ; //no weapons to update
|
||||
}
|
||||
|
|
@ -1295,6 +1299,7 @@ class WorldSessionActor extends Actor with MDCContextAware {
|
|||
case Some(tool) =>
|
||||
if(tool.GUID == object_guid) {
|
||||
//TODO set tool orientation?
|
||||
player.Orientation = Vector3(0f, pitch, yaw)
|
||||
vehicleService ! VehicleServiceMessage(continent.Id, VehicleAction.ChildObjectState(player.GUID, object_guid, pitch, yaw))
|
||||
}
|
||||
case None =>
|
||||
|
|
@ -1315,7 +1320,12 @@ class WorldSessionActor extends Actor with MDCContextAware {
|
|||
case msg @ VehicleStateMessage(vehicle_guid, unk1, pos, ang, vel, unk5, unk6, unk7, wheels, unk9, unkA) =>
|
||||
continent.GUID(vehicle_guid) match {
|
||||
case Some(obj : Vehicle) =>
|
||||
if(obj.Seat(0).get.Occupant.contains(player)) { //we're driving the vehicle
|
||||
val seat = obj.Seat(0).get
|
||||
if(seat.Occupant.contains(player)) { //we're driving the vehicle
|
||||
player.Position = pos //convenient
|
||||
if(seat.ControlledWeapon.isEmpty) {
|
||||
player.Orientation = Vector3(0f, 0f, ang.z) //convenient
|
||||
}
|
||||
obj.Position = pos
|
||||
obj.Orientation = ang
|
||||
obj.Velocity = vel
|
||||
|
|
|
|||
Loading…
Reference in a new issue