DayZ 1.27
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 строка 536

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

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