DayZ 1.24
Loading...
Searching...
No Matches
BodyStaging.c
Go to the documentation of this file.
1//-----------------------------
2// BODY STAGING
3//-----------------------------
4/*
5 Every dead body will have this component which will control its various states.
6 Read "Dead bodies staging" design on Confluence.
7*/
8
10{
12
14 {
15 m_IsSkinned = false;
16 }
17
19 {
20
21 }
22
24 {
25 m_IsSkinned = true;
26
27 // Temporal! Body is moved into ground so we can see if it was already skinned or not until necesarry assets are developed.
28 /*
29 if ( !m_ThisEntityAI.IsKindOf("Animal_GallusGallusDomesticus") && !m_ThisEntityAI.IsKindOf("Animal_GallusGallusDomesticusF") )
30 {
31 vector body_new_pos = m_ThisEntityAI.GetPosition() - "0 0.2 0";
32 m_ThisEntityAI.SetPosition(body_new_pos);
33 }
34 else
35 {
36 vector body_new_pos2 = m_ThisEntityAI.GetPosition() - "0 0.08 0";
37 m_ThisEntityAI.SetPosition(body_new_pos2);
38 }
39 */
40
42 }
43
44 bool IsSkinned()
45 {
46 return m_IsSkinned;
47 }
48
50 {
51 m_IsSkinned = true;
52 }
53
54 /*====================================
55 SERVER --> CLIENT SYNCHRONIZATION
56 ====================================*/
57
58 // Synchronizes properties
59 protected void SynchSkinnedState()
60 {
61 if (GetGame().IsServer())
62 {
64 GetGame().RPCSingleParam(m_ThisEntityAI, ERPCs.RPC_BS_SKINNED_STATE, p, true);
65 }
66 }
67}
ERPCs
Definition ERPCs.c:2
EntityAI m_ThisEntityAI
Definition Component.c:24
proto native CGame GetGame()