56DirectionalIndicator::DirectionalIndicator(
Object *parent,
int elevator,
int car,
int floor,
bool active_direction,
bool single,
bool vertical,
const std::string &BackTexture,
const std::string &uptexture,
const std::string &uptexture_lit,
const std::string &downtexture,
const std::string &downtexture_lit,
Real CenterX,
Real CenterZ,
Real voffset,
const std::string &direction,
Real BackWidth,
Real BackHeight,
bool ShowBack,
Real tw,
Real th) :
Object(parent)
61 SetValues(
"DirectionalIndicator",
"",
false);
98 bool in_elevator =
false;
99 if (parent->
GetType() ==
"ElevatorCar")
110 Move(CenterX, voffset, CenterZ);
130 if (ShowBack ==
true)
136 sbs->
DrawWalls(
true,
false,
false,
false,
false,
false);
138 sbs->
DrawWalls(
false,
true,
false,
false,
false,
false);
139 sbs->
AddWallMain(wall,
"Panel", BackTexture, 0, -BackWidth / 2, 0, BackWidth / 2, 0, BackHeight, BackHeight, 0, 0, tw, th,
false);
146 sbs->
DrawWalls(
true,
false,
false,
false,
false,
false);
148 sbs->
DrawWalls(
false,
true,
false,
false,
false,
false);
149 sbs->
AddWallMain(wall,
"Panel", BackTexture, 0, 0, BackWidth / 2, 0, -BackWidth / 2, BackHeight, BackHeight, 0, 0, tw, th,
false);
160 Real x1 = -BackWidth / 4;
161 Real x2 = BackWidth / 4;
166 sbs->
DrawWalls(
true,
false,
false,
false,
false,
false);
171 sbs->
DrawWalls(
false,
true,
false,
false,
false,
false);
179 Real height = (BackHeight / 7) * 2;
180 Real altitude = (BackHeight / 7) * 4;
181 Real altitude2 = BackHeight / 7;
184 sbs->
AddWallMain(wall,
"DirectionalUp",
UpTextureUnlit, 0, x1, offset, x2, offset, height, height, altitude, altitude, 1, 1,
false);
186 sbs->
AddWallMain(wall,
"DirectionalDown",
DownTextureUnlit, 0, x1, offset, x2, offset, height, height, altitude2, altitude2, 1, 1,
false);
190 Real height = (BackHeight / 7) * 2;
191 Real altitude = (BackHeight / 7) * 2.5;
192 if (
floor < topfloor)
195 sbs->
AddWallMain(wall,
"DirectionalUp",
UpTextureUnlit, 0, x1, offset, x2, offset, height, height, altitude, altitude, 1, 1,
false);
197 if (
floor > bottomfloor)
200 sbs->
AddWallMain(wall,
"DirectionalDown",
DownTextureUnlit, 0, x1, offset, x2, offset, height, height, altitude, altitude, 1, 1,
false);
209 x1 = (-BackWidth / 2) + ((BackWidth / 7) * 4);
210 x2 = (-BackWidth / 2) + ((BackWidth / 7) * 6);
211 Real x3 = (-BackWidth / 2) + (BackWidth / 7);
212 Real x4 = (-BackWidth / 2) + ((BackWidth / 7) * 3);
213 Real height = (BackHeight / 6) * 4;
214 Real altitude = BackHeight / 6;
217 sbs->
AddWallMain(wall,
"DirectionalUp",
UpTextureUnlit, 0, x1, offset, x2, offset, height, height, altitude, altitude, 1, 1,
false);
219 sbs->
AddWallMain(wall,
"DirectionalDown",
DownTextureUnlit, 0, x3, offset, x4, offset, height, height, altitude, altitude, 1, 1,
false);
223 Real height = (BackHeight / 7) * 2;
224 Real altitude = (BackHeight / 7) * 2.5;
225 if (
floor < topfloor)
228 sbs->
AddWallMain(wall,
"DirectionalUp",
UpTextureUnlit, 0, x1, offset, x2, offset, height, height, altitude, altitude, 1, 1,
false);
230 if (
floor > bottomfloor)
233 sbs->
AddWallMain(wall,
"DirectionalDown",
DownTextureUnlit, 0, x1, offset, x2, offset, height, height, altitude, altitude, 1, 1,
false);
240 Real height = (BackHeight / 6) * 4;
241 Real altitude = BackHeight / 6;
243 sbs->
AddWallMain(wall,
"Directional",
UpTextureUnlit, 0, x1, offset, x2, offset, height, height, altitude, altitude, 1, 1,
false);
249 Real z1 = -BackWidth / 4;
250 Real z2 = BackWidth / 4;
255 sbs->
DrawWalls(
true,
false,
false,
false,
false,
false);
261 sbs->
DrawWalls(
false,
true,
false,
false,
false,
false);
269 Real height = (BackHeight / 7) * 2;
270 Real altitude = (BackHeight / 7) * 4;
271 Real altitude2 = BackHeight / 7;
273 sbs->
AddWallMain(wall,
"DirectionalUp",
UpTextureUnlit, 0, offset, z1, offset, z2, height, height, altitude, altitude, 1, 1,
false);
275 sbs->
AddWallMain(wall,
"DirectionalDown",
DownTextureUnlit, 0, offset, z1, offset, z2, height, height, altitude2, altitude2, 1, 1,
false);
279 Real height = (BackHeight / 7) * 2;
280 Real altitude = (BackHeight / 7) * 2.5;
281 if (
floor < topfloor)
284 sbs->
AddWallMain(wall,
"DirectionalUp",
UpTextureUnlit, 0, offset, z1, offset, z2, height, height, altitude, altitude, 1, 1,
false);
287 if (
floor > bottomfloor)
290 sbs->
AddWallMain(wall,
"DirectionalDown",
DownTextureUnlit, 0, offset, z1, offset, z2, height, height, altitude, altitude, 1, 1,
false);
300 z1 = (-BackWidth / 2) + ((BackWidth / 7) * 4);
301 z2 = (-BackWidth / 2) + ((BackWidth / 7) * 6);
302 Real z3 = (-BackWidth / 2) + (BackWidth / 7);
303 Real z4 = (-BackWidth / 2) + ((BackWidth / 7) * 3);
304 Real height = (BackHeight / 6) * 4;
305 Real altitude = BackHeight / 6;
307 sbs->
AddWallMain(wall,
"DirectionalUp",
UpTextureUnlit, 0, offset, z1, offset, z2, height, height, altitude, altitude, 1, 1,
false);
309 sbs->
AddWallMain(wall,
"DirectionalDown",
DownTextureUnlit, 0, offset, z3, offset, z4, height, height, altitude, altitude, 1, 1,
false);
313 Real height = (BackHeight / 7) * 2;
314 Real altitude = (BackHeight / 7) * 2.5;
315 if (
floor < topfloor)
318 sbs->
AddWallMain(wall,
"DirectionalUp",
UpTextureUnlit, 0, offset, z1, offset, z2, height, height, altitude, altitude, 1, 1,
false);
320 if (
floor > bottomfloor)
323 sbs->
AddWallMain(wall,
"DirectionalDown",
DownTextureUnlit, 0, offset, z1, offset, z2, height, height, altitude, altitude, 1, 1,
false);
330 Real height = (BackHeight / 6) * 4;
331 Real altitude = BackHeight / 6;
333 sbs->
AddWallMain(wall,
"Directional",
UpTextureUnlit, 0, offset, z1, offset, z2, height, height, altitude, altitude, 1, 1,
false);