DayZ 1.29
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ OnPlacementComplete() [4/4]

override void ItemBase::OnPlacementComplete ( Man player,
vector position = "0 0 0",
vector orientation = "0 0 0" )
inlineprotected

См. определение в файле TrapSpawnBase.c строка 802

803 {
804 super.OnPlacementComplete(player, position, orientation);
805
806 if (g_Game.IsServer())
807 {
808 vector rotation_matrix[3];
809 float direction[4];
810 Math3D.YawPitchRollMatrix(orientation, rotation_matrix);
811 Math3D.MatrixToQuat(rotation_matrix, direction);
812 InventoryLocation source = new InventoryLocation;
813 InventoryLocation destination = new InventoryLocation;
814
815 if (GetInventory().GetCurrentInventoryLocation(source))
816 {
817 destination.SetGroundEx(this, position, direction);
818 if (g_Game.IsMultiplayer())
819 {
820 player.ServerTakeToDst(source, destination);
821 SetupTrapPlayer(PlayerBase.Cast(player), false);
822 }
823 else // singleplayer
824 {
825 PlayerBase.Cast(player).GetDayZPlayerInventory().RedirectToHandEvent(InventoryMode.LOCAL, source, destination);
826 g_Game.GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(SetupTrapPlayer, 100, false, PlayerBase.Cast(player), false);
827 }
828 }
829
832 SetActive();
833 }
834 }
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
DayZGame g_Game
Определения DayZGame.c:3942
proto native void SetGroundEx(EntityAI e, vector pos, float dir[4])
sets current inventory location type to Ground with transformation mat
void InitCatchingComponent()
void SetupTrapPlayer(PlayerBase player, bool set_position=true)
Определения TrapSpawnBase.c:225
void UpdateTrapEnviroMask()
Определения TrapSpawnBase.c:762
void SetActive()
Определения TrapSpawnBase.c:338
const int CALL_CATEGORY_SYSTEM
Определения 3_Game/DayZ/tools/tools.c:8

Перекрестные ссылки CALL_CATEGORY_SYSTEM, g_Game, TrapSpawnBase::InitCatchingComponent(), Math3D::MatrixToQuat(), SetActive(), InventoryLocation::SetGroundEx(), SetupTrapPlayer(), SetupTrapPlayer(), UpdateTrapEnviroMask() и Math3D::YawPitchRollMatrix().