MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / cExecTimerEvent

Function cExecTimerEvent

scripts/Merc7.cpp:1260–1284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1258*/
1259
1260void cExecTimerEvent(int timerid) {
1261 if (timerid < SPECIAL_TIMER_ID_BASE || timerid > SPECIAL_TIMER_ID_LIMIT) {
1262 return;
1263 }
1264
1265 int index = (timerid - SPECIAL_TIMER_ID_BASE);
1266 int timer_class = index / SPECIAL_TIMER_MAX;
1267 index = index % SPECIAL_TIMER_MAX;
1268
1269 switch (timer_class) {
1270 case 0: // break glass!
1271 if (index < 8 && index >= 0) {
1272 aPortalRenderSet(ff_enable_data[index].state, ff_enable_data[index].portal_num, ff_enable_data[index].room_number,
1273 ff_enable_data[index].double_sided);
1274 }
1275 break;
1276
1277 case 1: // timed wind delay
1278 if (index < 8 && index >= 0) {
1279 aRoomSetWind(wind_fx_data[index].room_number, wind_fx_data[index].x, wind_fx_data[index].y, wind_fx_data[index].z,
1280 wind_fx_data[index].speed);
1281 }
1282 break;
1283 }
1284}
1285
1286// DROID CENTRAL AI
1287// Essentially, lifters will be scurrying around droid central exiting, forming, etc.

Callers

nothing calls this directly

Calls 2

aPortalRenderSetFunction · 0.85
aRoomSetWindFunction · 0.85

Tested by

no test coverage detected