MCPcopy Create free account
hub / github.com/JACoders/OpenJK / AS_GetTimeBetweenWaves

Function AS_GetTimeBetweenWaves

code/client/snd_ambient.cpp:281–305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

279*/
280
281static void AS_GetTimeBetweenWaves( ambientSet_t &set )
282{
283 int startTime, endTime;
284
285 //Get the data
286 sscanf( parseBuffer+parsePos, "%s %d %d", tempBuffer, &startTime, &endTime );
287
288 //Check for swapped start / end
289 if ( startTime > endTime )
290 {
291 #ifndef FINAL_BUILD
292 Com_Printf(S_COLOR_YELLOW"WARNING: Corrected swapped start / end times in a \"timeBetweenWaves\" keyword\n");
293 #endif
294
295 int swap = startTime;
296 startTime = endTime;
297 endTime = swap;
298 }
299
300 //Store it
301 set.time_start = startTime;
302 set.time_end = endTime;
303
304 AS_SkipLine();
305}
306
307/*
308-------------------------

Callers 2

AS_GetGeneralSetFunction · 0.70
AS_GetLocalSetFunction · 0.70

Calls 3

sscanfFunction · 0.85
AS_SkipLineFunction · 0.70
Com_PrintfFunction · 0.50

Tested by

no test coverage detected