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

Function BodyRemovalPadTime

code/game/NPC.cpp:316–356  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

314*/
315
316int BodyRemovalPadTime( gentity_t *ent )
317{
318 int time;
319
320 if ( !ent || !ent->client )
321 return 0;
322
323 // team no longer indicates species/race, so in this case we'd use NPC_class, but
324 switch( ent->client->NPC_class )
325 {
326 case CLASS_MOUSE:
327 case CLASS_GONK:
328 case CLASS_R2D2:
329 case CLASS_R5D2:
330 //case CLASS_PROTOCOL:
331 case CLASS_MARK1:
332 case CLASS_MARK2:
333 case CLASS_PROBE:
334 case CLASS_SEEKER:
335 case CLASS_REMOTE:
336 case CLASS_SENTRY:
337 case CLASS_INTERROGATOR:
338 time = 0;
339 break;
340 default:
341 // never go away
342 if ( g_corpseRemovalTime->integer <= 0 )
343 {
344 time = Q3_INFINITE;
345 }
346 else
347 {
348 time = g_corpseRemovalTime->integer*1000;
349 }
350 break;
351
352 }
353
354
355 return time;
356}
357
358
359/*

Callers 1

DeadThinkFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected