2019 {
2020 if (!IsAlive())
2021 {
2023 {
2025 }
2026 return;
2027 }
2028
2029 HumanInputController hic = GetInputController();
2030
2032 int thirdPersonViewMode =
g_Game.GetWorld().GetThirdPersonViewMode();
2033
2035 {
2037 {
2038 camChange = false;
2039 }
2040 }
2041
2044 {
2046 }
2047 else if (camChange)
2048 {
2050 }
2051
2052
2055
2057 {
2060 }
2062 {
2065 }
2066
2068 {
2071 {
2073 }
2075 {
2076 float pSpeed;
2077 vector pLocalDirection;
2079
2081 {
2083 }
2084 }
2085 }
2086 else
2087 {
2089 }
2090
2092 {
2093 float headingAngle = MiscGameplayFunctions.GetHeadingAngle(this);
2096 float headingAngleDiff = 0.0;
2097
2099 {
2101 }
2102 else
2103 {
2105 }
2106
2107 if (headingAngleDiff > 0.2)
2108 {
2109 int time =
g_Game.GetTime();
2110
2111 float timefilterconstant = 400 - (headingAngleDiff * 100);
2112
2114 {
2115 float volume = headingAngleDiff / 0.5;
2116 if (volume > 1)
2117 {
2118 volume = 1;
2119 }
2120 if (volume < 0.25)
2121 {
2122 volume = 0.25;
2123 }
2124
2127 {
2129 }
2130
2131 string soundSetName = "Cloth_Body_longmove_TShirt_Soundset";
2132
2133 string bodyClothName = "";
2134 EntityAI attachment = GetInventory().FindAttachment(InventorySlots.BODY);
2135 if (attachment)
2136 {
2137 bodyClothName = attachment.GetAttachmentSoundType();
2138 }
2139
2140 if (bodyClothName != "")
2141 {
2142 string path =
"CfgSoundTables CfgAttachmentSoundTables Cloth_Body_Longmove_LookupTable";
2143 int soundCount =
g_Game.ConfigGetChildrenCount(
path);
2144
2145 for (int i = 0; i < soundCount; i++)
2146 {
2149
2150 if (
name == bodyClothName)
2151 {
2153 g_Game.ConfigGetTextArray(
path +
" " +
name +
" soundSets", stringArray);
2154 soundSetName = stringArray.
Get(0);
2155
2156 delete stringArray;
2157 }
2158 }
2159 }
2160
2163
2164 if (soundObjectBuilder != NULL)
2165 {
2166 SoundObject soundObject = soundObjectBuilder.BuildSoundObject();
2167
2168 if (soundObject != NULL)
2169 {
2171
2174 wave.SetVolumeRelative(volume);
2175
2178 }
2179 }
2180 }
2181
2183 {
2184 float volume2 = headingAngleDiff * 2;
2185 if (volume2 > 1)
2186 {
2187 volume2 = 1;
2188 }
2189
2192 {
2194 }
2196 {
2198 }
2199
2200 string soundSetName2 = "walkProne_noHS_asphalt_ext_Char_SoundSet";
2202
2203 if (surfaceType != "")
2204 {
2205 string movementSurfaceType = "walkProne_" + surfaceType;
2206
2207 string path2 = "CfgSoundTables CfgStepSoundTables walkProne_noHS_Char_LookupTable";
2208 int soundCount2 =
g_Game.ConfigGetChildrenCount(path2);
2209
2210 for (int i2 = 0; i2 < soundCount2; i2++)
2211 {
2212 string name2 = "";
2213 g_Game.ConfigGetChildName(path2, i2, name2);
2214
2215 if (name2 == movementSurfaceType)
2216 {
2218 g_Game.ConfigGetTextArray(path2 +
" " + name2 +
" soundSets", stringArray2);
2219 soundSetName2 = stringArray2.
Get(0);
2220
2221 delete stringArray2;
2222 }
2223 }
2224 }
2225
2228
2229 if (soundObjectBuilder2 != NULL)
2230 {
2231 SoundObject soundObject2 = soundObjectBuilder2.BuildSoundObject();
2232
2233 if (soundObject2 != NULL)
2234 {
2236
2237 AbstractWave wave2 =
g_Game.GetSoundScene().Play3D(soundObject2, soundObjectBuilder2);
2239 wave2.SetVolumeRelative(volume2);
2240
2243 }
2244 }
2245 }
2246
2248 }
2249 }
2250 }
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
bool m_CameraOpticsAimOverride
bool IsWeaponObstructionBlockingADS()
string GetSurfaceType(SurfaceAnimationBone limbType)
float m_LastHeadingAngleBlock
float m_LastHeadingAngleBlock2
ref HumanMovementState m_MovementState
time step for gradual update of dead screen visibilibty up to full visbility [s]
ECameraZoomType m_CameraEyeZoomLevel
proto native void SetVerticalMinimumAimLimit(float value)
sets vertical minimum aim limit for a player
DayZPlayerConstants
defined in C++
proto native bool IsPlayerInStance(int pStanceMask)
-------------— camera additiona functions ----------------------—
class array< Class T > TStringArray
class AbstractSoundScene SoundObjectBuilder(SoundParams soundParams)
void SoundObject(SoundParams soundParams)
vector GetPosition()
Get the world position of the Effect.
class SoundObject SoundParams(string name)
proto native void SetPosition(vector position)
Note: Sets the position locally if parented, retrieves globally with the sound offset.
proto string Get(int index)
Gets n-th character from string.