This commit is contained in:
Charles 2001-07-05 21:50:02 +00:00
parent dec3ff76ef
commit fd97883718
7 changed files with 145 additions and 12 deletions

View file

@ -66,6 +66,10 @@
#include "triggers\tgarygo.h"
#endif
#ifndef __PLATFORM_PFBLOCK_H__
#include "platform\pfblock.h"
#endif
/* Std Lib
------- */
@ -377,6 +381,52 @@ void CThingManager::matchGaryTriggers()
}
}
/*----------------------------------------------------------------------
Function:
Purpose:
Params:
Returns:
---------------------------------------------------------------------- */
void CThingManager::shakePlatformLoose()
{
CNpcPlatform *platform;
int platformCount = getRnd() % 30;
int platformTest = 0;
while( platformCount )
{
platform = (CNpcPlatform *) s_thingLists[CThing::TYPE_PLATFORM];
while( platform )
{
if ( platform->getThingSubType() == CNpcPlatform::NPC_FALLING_BLOCK_PLATFORM )
{
platformCount--;
platformTest++;
if ( !platformCount )
{
CNpcFallingBlockPlatform *block = (CNpcFallingBlockPlatform *) platform;
block->trigger();
return;
}
}
platform = (CNpcPlatform *) platform->m_nextListThing;
}
if ( !platformTest )
{
return;
}
}
}
/*----------------------------------------------------------------------
Function:
Purpose: