-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAsFloor.vsl
29 lines (24 loc) · 923 Bytes
/
AsFloor.vsl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
////////////////////////
// Description : Edit by ghomist
extern bool isInShadow;
extern bool asWoodenFloor;
void main()
{
Group G_floor = Group.Cast(ac.GetObjectByName("Phys_Floors", NULL));
Group G_shadow = Group.Cast(ac.GetObjectByName("Shadow", NULL));
Group G_soundHit = Group.Cast(ac.GetObjectByName("Sound_HitID_01", NULL));
Group G_soundRoll = Group.Cast(ac.GetObjectByName("Sound_RollID_01",NULL));
if (asWoodenFloor) {
G_soundHit = Group.Cast(ac.GetObjectByName("Sound_HitID_02", NULL));
G_soundRoll = Group.Cast(ac.GetObjectByName("Sound_RollID_02",NULL));
}
int count = ac.selection.Size();
for (int i=0; i<count; ++i) {
Entity3D ent = Entity3D.Cast(ac.selection[i]);
if (!ent) continue;
if (G_floor) G_floor.AddObject(ent);
if (G_shadow && isInShadow) G_shadow.AddObject(ent);
if (G_soundHit) G_soundHit.AddObject(ent);
if (G_soundRoll) G_soundRoll.AddObject(ent);
}
}