This commit is contained in:
parent
ac64f2bf92
commit
b727520831
@ -421,6 +421,7 @@ void CLevel::initThings(int _respawningLevel)
|
|||||||
trigger->setPositionAndSize(TriggerList->Pos.X<<4,TriggerList->Pos.Y<<4,
|
trigger->setPositionAndSize(TriggerList->Pos.X<<4,TriggerList->Pos.Y<<4,
|
||||||
TriggerList->Width<<4,TriggerList->Height<<4);
|
TriggerList->Width<<4,TriggerList->Height<<4);
|
||||||
trigger->setTargetBox(TriggerList->TargetPos.X<<4,TriggerList->TargetPos.Y<<4,TriggerList->TargetSize.X<<4,TriggerList->TargetSize.Y<<4);
|
trigger->setTargetBox(TriggerList->TargetPos.X<<4,TriggerList->TargetPos.Y<<4,TriggerList->TargetSize.X<<4,TriggerList->TargetSize.Y<<4);
|
||||||
|
trigger->updateCollisionArea();
|
||||||
}
|
}
|
||||||
TriggerList++;
|
TriggerList++;
|
||||||
}
|
}
|
||||||
@ -443,6 +444,7 @@ void CLevel::initThings(int _respawningLevel)
|
|||||||
pos.vx=ItemList->Pos.X<<4;
|
pos.vx=ItemList->Pos.X<<4;
|
||||||
pos.vy=ItemList->Pos.Y<<4;
|
pos.vy=ItemList->Pos.Y<<4;
|
||||||
newPickup=createPickup((PICKUP_TYPE)ItemList->Type,&pos);
|
newPickup=createPickup((PICKUP_TYPE)ItemList->Type,&pos);
|
||||||
|
newPickup->updateCollisionArea();
|
||||||
if(isSpat)
|
if(isSpat)
|
||||||
{
|
{
|
||||||
((CSpatulaPickup*)newPickup)->setSpatulaNumber(spatNumber);
|
((CSpatulaPickup*)newPickup)->setSpatulaNumber(spatNumber);
|
||||||
@ -477,6 +479,7 @@ void CLevel::initThings(int _respawningLevel)
|
|||||||
enemy->setLayerCollision( getCollisionLayer() );
|
enemy->setLayerCollision( getCollisionLayer() );
|
||||||
enemy->setupWaypoints( ThisActor );
|
enemy->setupWaypoints( ThisActor );
|
||||||
enemy->postInit();
|
enemy->postInit();
|
||||||
|
enemy->updateCollisionArea();
|
||||||
|
|
||||||
if ( ThisActor->Speed )
|
if ( ThisActor->Speed )
|
||||||
{
|
{
|
||||||
@ -491,6 +494,7 @@ void CLevel::initThings(int _respawningLevel)
|
|||||||
friendNpc=CNpcFriend::Create(ThisActor);
|
friendNpc=CNpcFriend::Create(ThisActor);
|
||||||
friendNpc->setLayerCollision( getCollisionLayer() );
|
friendNpc->setLayerCollision( getCollisionLayer() );
|
||||||
friendNpc->postInit();
|
friendNpc->postInit();
|
||||||
|
friendNpc->updateCollisionArea();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -510,6 +514,7 @@ void CLevel::initThings(int _respawningLevel)
|
|||||||
platform = CNpcPlatform::Create( ThisPlatform );
|
platform = CNpcPlatform::Create( ThisPlatform );
|
||||||
platform->setLayerCollision( getCollisionLayer() );
|
platform->setLayerCollision( getCollisionLayer() );
|
||||||
platform->postInit();
|
platform->postInit();
|
||||||
|
platform->updateCollisionArea();
|
||||||
|
|
||||||
if ( ThisPlatform->Speed )
|
if ( ThisPlatform->Speed )
|
||||||
{
|
{
|
||||||
@ -527,7 +532,7 @@ void CLevel::initThings(int _respawningLevel)
|
|||||||
CNpcHazard *hazard;
|
CNpcHazard *hazard;
|
||||||
hazard = CNpcHazard::Create( ThisHazard );
|
hazard = CNpcHazard::Create( ThisHazard );
|
||||||
hazard->setLayerCollision( getCollisionLayer() );
|
hazard->setLayerCollision( getCollisionLayer() );
|
||||||
|
hazard->updateCollisionArea();
|
||||||
if ( ThisHazard->Respawn )
|
if ( ThisHazard->Respawn )
|
||||||
{
|
{
|
||||||
hazard->setRespawnRate( ThisHazard->Respawn );
|
hazard->setRespawnRate( ThisHazard->Respawn );
|
||||||
|
@ -1377,6 +1377,7 @@ void CPlayer::respawn()
|
|||||||
clearPlatform();
|
clearPlatform();
|
||||||
|
|
||||||
GameScene.respawnLevel();
|
GameScene.respawnLevel();
|
||||||
|
updateCollisionArea();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user