97 {
98 float closestDist = float.MAX;
101
102 int excludeMask = 0;
104 {
105 if (indx > 32)
106 break;
107
109 vector crumbPosition = crumb.GetPosition();
113
114 switch (crumb.ExternalValueController.Type)
115 {
116 case "DoorState":
117 {
119 if (!ctrl || (ctrl && ctrl.SelectionName == ""))
120 break;
121
123 if (!building)
124 break;
125
126 float animPhase = building.GetAnimationPhase(ctrl.SelectionName);
130
131 return;
132 }
133 }
134
135 if (crumbRadius != -1)
136 maxRadiusAllowed = crumbRadius;
137 if (dist > maxRadiusAllowed)
138 excludeMask = (excludeMask | (1 << indx));
140 {
141 vector rayStart = MiscGameplayFunctions.GetPlayerHeadPosition(
m_Player);
142 vector rayEnd = crumbPosition;
146
148 {
149 excludeMask = (excludeMask | (1 << indx));
150 }
151 }
152
153 distances.Insert(dist);
154
155 #ifdef DIAG_DEVELOPER
158 #endif
159 }
160
161 float baseDst = distances[0];
162 float sum = 0;
163
164 foreach (float dst:distances)
165 {
166 if (dst == 0)
167 dst = 0.1;
168 float dstInv = (baseDst / dst) * baseDst;
169 sum += dstInv;
170 distancesInverted.Insert(dstInv);
171 }
172
173 float sumCheck = 0;
174 float eyeAcco = 0;
175 foreach (int i, float dstInvert:distancesInverted)
176 {
177 if ((1 << i) & excludeMask)
178 continue;
179
180 float ratio = dstInvert / sum;
183
185 {
186 #ifdef DIAG_DEVELOPER
188 {
189 float intensity = (1-ratio) * 255;
191 }
192 #endif
193
195 }
196 }
197
199 }
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)