Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_DestructionHeatmapRegion.c
Go to the documentation of this file.
2{
3 event override bool MergeHeatmapEntries(notnull DestructionHeatmapEntry mainEntry, notnull DestructionHeatmapEntry newEntry)
4 {
5 //too big already, we dont merge
6 if(mainEntry.GetWeight() > 50)
7 return false;
8
9 vector mins1 = mainEntry.GetMins();
10 vector maxs1 = mainEntry.GetMaxs();
11
12 vector mins2 = newEntry.GetMins();
13 vector maxs2 = newEntry.GetMaxs();
14
15 bool intersects = Math3D.IntersectionBoxBox(mins1, maxs1, mins2, maxs2);
16
17 if(!intersects)
18 return false;
19
20 vector newMins = SCR_Math3D.Min(mins1, mins2);
21 vector newMaxs = SCR_Math3D.Max(maxs1, maxs2);
22
23 int newWeight = mainEntry.GetWeight() + newEntry.GetWeight();
24
25 mainEntry.SetBoundingBox(newMins, newMaxs);
26 mainEntry.SetWeight(newWeight);
27
28 return true;
29 }
30}
31
Contains various scripted 3D math functions.
Definition SCR_Math3D.c:3