This commit is contained in:
parent
9a4cf78e97
commit
abd55dc69d
7 changed files with 46 additions and 5 deletions
|
@ -107,7 +107,8 @@ platform_src := platform \
|
|||
pbounce \
|
||||
pdual \
|
||||
pfgen \
|
||||
pfallnor
|
||||
pfallnor \
|
||||
praft
|
||||
|
||||
hazard_src := hazard \
|
||||
hfalling \
|
||||
|
|
|
@ -288,6 +288,20 @@ CNpcPlatform::NPC_PLATFORM_DATA CNpcPlatform::m_data[NPC_PLATFORM_TYPE_MAX] =
|
|||
NPC_PLATFORM_TIMER_NONE,
|
||||
},
|
||||
|
||||
{ // NPC_RAFT_PLATFORM
|
||||
ACTORS_CLAM_SBK,
|
||||
ANIM_CLAM_SIDESNAP,
|
||||
3,
|
||||
128,
|
||||
true,
|
||||
DAMAGE__NONE,
|
||||
0,
|
||||
4,
|
||||
NPC_PLATFORM_INFINITE_LIFE,
|
||||
2,
|
||||
NPC_PLATFORM_TIMER_NONE,
|
||||
},
|
||||
|
||||
{ // NPC_PLAYER_BUBBLE_PLATFORM
|
||||
ACTORS_CLAM_SBK,
|
||||
ANIM_CLAM_SIDESNAP,
|
||||
|
@ -324,5 +338,6 @@ CNpcPlatform::NPC_PLATFORM_UNIT_TYPE CNpcPlatform::mapEditConvertTable[NPC_PLATF
|
|||
NPC_DUAL_PLATFORM,
|
||||
NPC_OILDRUM_GENERATOR,
|
||||
NPC_CRATE_GENERATOR,
|
||||
NPC_RAFT_PLATFORM,
|
||||
NPC_PLAYER_BUBBLE_PLATFORM,
|
||||
};
|
||||
|
|
|
@ -111,6 +111,10 @@
|
|||
#include "platform\pfgen.h"
|
||||
#endif
|
||||
|
||||
#ifndef __PLATFORM_PRAFT_H__
|
||||
#include "platform\praft.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -245,6 +249,12 @@ CNpcPlatform *CNpcPlatform::Create(sThingPlatform *ThisPlatform)
|
|||
break;
|
||||
}
|
||||
|
||||
case NPC_RAFT_PLATFORM:
|
||||
{
|
||||
platform = new ("raft platform") CNpcRaftPlatform;
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
ASSERT( 0 );
|
||||
|
@ -352,8 +362,6 @@ void CNpcPlatform::init()
|
|||
|
||||
m_isShuttingDown = false;
|
||||
|
||||
m_platformWidth = PLATFORMWIDTH;
|
||||
|
||||
m_npcPath.initPath();
|
||||
}
|
||||
|
||||
|
@ -604,12 +612,16 @@ void CNpcPlatform::calculateBoundingBoxSize()
|
|||
centre=getCollisionCentre();
|
||||
halfLength=m_platformWidth/2;
|
||||
|
||||
x1=-halfLength*mcos(angle&4095)>>12;
|
||||
/*x1=-halfLength*mcos(angle&4095)>>12;
|
||||
y1=-halfLength*msin(angle&4095)>>12;
|
||||
x2=+halfLength*mcos(angle&4095)>>12;
|
||||
y2=+halfLength*msin(angle&4095)>>12;
|
||||
|
||||
setCollisionSize(abs(x2-x1),abs(y2-y1)+PLATFORMCOLLISIONHEIGHT);
|
||||
setCollisionSize(abs(x2-x1),abs(y2-y1)+PLATFORMCOLLISIONHEIGHT);*/
|
||||
|
||||
sBBox boundingBox = m_modelGfx->GetBBox();
|
||||
setCollisionSize( ( boundingBox.XMax - boundingBox.XMin ), ( boundingBox.YMax - boundingBox.YMin ) );
|
||||
setCollisionCentreOffset( ( boundingBox.XMax + boundingBox.XMin ) >> 1, ( boundingBox.YMax + boundingBox.YMin ) >> 1 );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -71,6 +71,7 @@ public:
|
|||
NPC_DUAL_PLATFORM,
|
||||
NPC_OILDRUM_GENERATOR,
|
||||
NPC_CRATE_GENERATOR,
|
||||
NPC_RAFT_PLATFORM,
|
||||
NPC_PLAYER_BUBBLE_PLATFORM,
|
||||
NPC_PLATFORM_TYPE_MAX,
|
||||
};
|
||||
|
|
|
@ -100,6 +100,7 @@ BouncyRing=15
|
|||
BouncyTyre=15
|
||||
DualPlatform=16
|
||||
Wooden=6
|
||||
Raft=19
|
||||
|
||||
################################################
|
||||
# Triggers
|
||||
|
|
|
@ -75,3 +75,6 @@ Param0=Sproing
|
|||
|
||||
[DualPlatform]
|
||||
Gfx=..\..\Graphics\platforms\wooden\wooden.gin
|
||||
|
||||
[Raft]
|
||||
Gfx=..\..\Graphics\platforms\raft\raft.gin
|
||||
|
|
|
@ -1217,6 +1217,14 @@ SOURCE=..\..\..\source\platform\pplayer.h
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\source\platform\praft.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\source\platform\praft.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\source\platform\pretract.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
|
Loading…
Add table
Reference in a new issue