97 {
98 float closestDist = float.MAX;
101
102 int excludeMask = 0;
104 {
105 if (indx > 32)
106 break;
107
111
112 switch (crumb.ExternalValueController.Type)
113 {
114 case "DoorState":
115 {
117 if (!ctrl || (ctrl && ctrl.SelectionName == ""))
118 break;
119
121 if (!building)
122 break;
123
124 float animPhase = building.GetAnimationPhase(ctrl.SelectionName);
128
129 return;
130 }
131 }
132
133 if (crumbRadius != -1)
134 maxRadiusAllowed = crumbRadius;
135 if (dist > maxRadiusAllowed)
136 excludeMask = (excludeMask | (1 << indx));
138 {
140 MiscGameplayFunctions.GetHeadBonePos(
m_Player, rayStart);
141 vector rayEnd = crumb.GetPosition();
143 float hitFraction;
145
147 {
148 excludeMask = (excludeMask | (1 << indx));
149 }
150 }
151
152 distances.Insert(dist);
153
154 #ifdef DIAG_DEVELOPER
157 #endif
158 }
159
160 float baseDst = distances[0];
161 float sum = 0;
162
163 foreach (float dst:distances)
164 {
165 if (dst == 0)
166 dst = 0.1;
167 float dstInv = (baseDst / dst) * baseDst;
168 sum += dstInv;
169 distancesInverted.Insert(dstInv);
170 }
171
172 float sumCheck = 0;
173 float eyeAcco = 0;
174 foreach (int i, float dstInvert:distancesInverted)
175 {
176 if ((1 << i) & excludeMask)
177 continue;
178
179 float ratio = dstInvert / sum;
182
184 {
185 #ifdef DIAG_DEVELOPER
187 {
188 float intensity = (1-ratio) * 255;
190 }
191 #endif
192
194 }
195 }
196
198 }
void BreadcrumbDoorStateController(TStringArray params)
const float DISTANCE_CUTOFF
UndergroundTrigger m_TransitionalTrigger
const float ACCO_MODIFIER
float m_LightingLerpTarget
static proto bool RayCastBullet(vector begPos, vector endPos, PhxInteractionLayers layerMask, Object ignoreObj, out Object hitObject, out vector hitPosition, out vector hitNormal, out float hitFraction)
static Shape DrawSphere(vector pos, float size=1, int color=0x1fff7f7f, ShapeFlags flags=ShapeFlags.TRANSP|ShapeFlags.NOOUTLINE)
static Shape DrawLine(vector from, vector to, int color=0xFFFFFFFF, int flags=0)
static float EaseInQuint(float t)
static float EaseInOutQuint(float t)
Input value between 0 and 1, returns value adjusted by easing, no automatic clamping of input(do your...
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
static proto native float Distance(vector v1, vector v2)
Returns the distance between tips of two 3D vectors.
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.
static float Remap(float inputMin, float inputMax, float outputMin, float outputMax, float inputValue, bool clampedOutput=true)
Returns given value remaped from input range into output range.
int ARGB(int a, int r, int g, int b)