Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
surrenderdummyitem.c
Go to the documentation of this file.
1 class SurrenderDummyItem extends DummyItem
2 {
3  protected PlayerBase m_player;
4 
5  void ~SurrenderDummyItem()
6  {
7  /*m_player = PlayerBase.Cast(GetHierarchyRootPlayer());
8  if (m_player && m_player.m_EmoteManager)
9  PlayerBase.Cast(m_player).m_EmoteManager.PlaySurrenderInOut(false); //has to be triggered separately in order to avoid locomotion state conflict ("playerballing")
10  else
11  Print("Error, no player owns SurrenderDummyItem");*/
12  }
13 
14  override void OnItemLocationChanged(EntityAI old_owner, EntityAI new_owner)
15  {
16  super.OnItemLocationChanged(old_owner,new_owner);
17 
18  //Player somehow got a hold of the item (can be done by quickly pressing tab after F5), item should not exist outside of surrender
19  if (old_owner)
20  Delete();
21 
22  /*
23  //enters player's inventory
24  if (new_owner)
25  {
26  //m_player = PlayerBase.Cast(new_owner);
27  //PlayerBase.Cast(new_owner).m_EmoteManager.PlaySurrenderInOut(true);
28  }
29  // may not work on item destroy?
30  else
31  {
32  Delete();
33  //PlayerBase.Cast(old_owner).m_EmoteManager.PlaySurrenderInOut(false);
34  }
35  */
36  }
37 }
m_player
DayZPlayer m_player
Definition: randomgeneratorsyncmanager.c:15
PlayerBase
Definition: playerbaseclient.c:1
DummyItem
Definition: magnum.c:404
OnItemLocationChanged
override void OnItemLocationChanged(EntityAI old_owner, EntityAI new_owner)
Definition: combinationlock.c:75
EntityAI
Definition: building.c:5