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

◆ TriggerPullPlayerOutOfVehicle()

void DayZPlayer::TriggerPullPlayerOutOfVehicle ( )
inlineprotected

we don't want the vehicle to be haunted, re-possess the dead player so other players can use the vehicle

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

545 {
546 if (!GetGame().IsServer())
547 {
548 return;
549 }
550
551 Transport transport;
552 if (!Class.CastTo(transport, GetParent()))
553 {
554 return;
555 }
556
557 int crewIdx = -1;
558 for (int i = 0; i < transport.CrewSize(); ++i)
559 {
560 if (transport.CrewMember(i) == this)
561 {
562 crewIdx = i;
563 break;
564 }
565 }
566
567 if (crewIdx == -1)
568 {
569 return;
570 }
571
572 transport.CrewGetOut(crewIdx);
574
575 if (crewIdx == DayZPlayerConstants.VEHICLESEAT_DRIVER)
576 {
578
579#ifdef FEATURE_NETWORK_RECONCILIATION
580 PlayerIdentity identity = GetIdentity();
581
582 if (identity)
583 {
585 identity.Possess(this);
586 }
587#endif
588 }
589
590 SetSynchDirty();
591 }
void TriggerPullPlayerOutOfVehicleImpl()
Определения DayZPlayerImplement.c:593
DayZPlayerConstants
defined in C++
Определения dayzplayer.c:602
proto native CGame GetGame()
proto native Widget GetParent()
Get parent of the Effect.
Определения Effect.c:422

Перекрестные ссылки Class::CastTo(), GetGame(), GetParent() и TriggerPullPlayerOutOfVehicleImpl().