This commit is contained in:
Daveo 2001-05-02 00:06:46 +00:00
parent ec4f5f9375
commit a8a436a7a0
6 changed files with 34 additions and 3 deletions

View File

@ -239,7 +239,7 @@ void CGameScene::think(int _frames)
else if(s_levelFinished)
{
s_globalLevelSelectThing++;
// s_globalLevelSelectThing&=3;
s_globalLevelSelectThing&=3; // Ch1 only Bodge
shutdownLevel();
initLevel();

View File

@ -315,6 +315,7 @@ void CLevel::initLayers()
trigger->init();
trigger->setPositionAndSize(TriggerList->Pos.X<<4,TriggerList->Pos.Y<<4,
TriggerList->Width<<4,TriggerList->Height<<4);
trigger->setTargetPos(TriggerList->TargetPos.X<<4,TriggerList->TargetPos.Y<<4);
TriggerList++;
}
}

View File

@ -165,6 +165,8 @@ void CNpcBranchPlatform::processMovement( int _frames )
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
int BX=-20;
int BY=-30;
void CNpcBranchPlatform::render()
{
if ( m_isActive )
@ -175,8 +177,8 @@ void CNpcBranchPlatform::render()
DVECTOR renderPos;
DVECTOR offset = CLevel::getCameraPos();
renderPos.vx = Pos.vx - offset.vx;
renderPos.vy = Pos.vy - offset.vy;
renderPos.vx = Pos.vx - offset.vx ;
renderPos.vy = Pos.vy - offset.vy ;
if ( renderPos.vx >= 0 && renderPos.vx <= VidGetScrW() )
{
@ -188,11 +190,15 @@ void CNpcBranchPlatform::render()
{
rotation.vy = 0;
rotation.vz = getCollisionAngle();
renderPos.vx-= BX;
renderPos.vy+= BY;
}
else
{
rotation.vy = 2048;
rotation.vz = -getCollisionAngle();
renderPos.vx+= BX;
renderPos.vy+= BY;
}
VECTOR scale;

View File

@ -875,5 +875,17 @@ void CTriggerThing::setPositionAndSize(int _x,int _y,int _w,int _h)
setCollisionSize(_w,_h);
}
/*----------------------------------------------------------------------
Function:
Purpose:
Params:
Returns:
---------------------------------------------------------------------- */
void CTriggerThing::setTargetPos(int _x,int _y)
{
TargetPos.vx=_x;
TargetPos.vy=_y;
}
/*===========================================================================
end */

View File

@ -216,6 +216,8 @@ class CTriggerThing : public CThing
public:
virtual TYPE getThingType() {return TYPE_TRIGGER;}
virtual void setPositionAndSize(int _x,int _y,int _w,int _h); // Wonder if this might be better in CThing? (pkg)
virtual void setTargetPos(int _x,int _y); // Wonder if this might be better in CThing? (pkg)
DVECTOR TargetPos;
};
class CHazardThing : public CThing
{

View File

@ -53,6 +53,16 @@
---------------------------------------------------------------------- */
void CTeleportTrigger::collidedWith(CThing *_thisThing)
{
CRECT collisionArea;
DVECTOR respawnPos;
ASSERT(_thisThing->getThingType()==TYPE_PLAYER);
collisionArea=getCollisionArea();
respawnPos.vx=collisionArea.x1+((collisionArea.x2-collisionArea.x1)/2);
respawnPos.vy=collisionArea.y2;
((CPlayer*)_thisThing)->setPos(TargetPos);
/*
CRECT collisionArea;
DVECTOR respawnPos;