This commit is contained in:
Charles 2001-05-04 14:49:15 +00:00
parent 9a4cf78e97
commit abd55dc69d
7 changed files with 46 additions and 5 deletions

View file

@ -107,7 +107,8 @@ platform_src := platform \
pbounce \ pbounce \
pdual \ pdual \
pfgen \ pfgen \
pfallnor pfallnor \
praft
hazard_src := hazard \ hazard_src := hazard \
hfalling \ hfalling \

View file

@ -288,6 +288,20 @@ CNpcPlatform::NPC_PLATFORM_DATA CNpcPlatform::m_data[NPC_PLATFORM_TYPE_MAX] =
NPC_PLATFORM_TIMER_NONE, 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 { // NPC_PLAYER_BUBBLE_PLATFORM
ACTORS_CLAM_SBK, ACTORS_CLAM_SBK,
ANIM_CLAM_SIDESNAP, ANIM_CLAM_SIDESNAP,
@ -324,5 +338,6 @@ CNpcPlatform::NPC_PLATFORM_UNIT_TYPE CNpcPlatform::mapEditConvertTable[NPC_PLATF
NPC_DUAL_PLATFORM, NPC_DUAL_PLATFORM,
NPC_OILDRUM_GENERATOR, NPC_OILDRUM_GENERATOR,
NPC_CRATE_GENERATOR, NPC_CRATE_GENERATOR,
NPC_RAFT_PLATFORM,
NPC_PLAYER_BUBBLE_PLATFORM, NPC_PLAYER_BUBBLE_PLATFORM,
}; };

View file

@ -111,6 +111,10 @@
#include "platform\pfgen.h" #include "platform\pfgen.h"
#endif #endif
#ifndef __PLATFORM_PRAFT_H__
#include "platform\praft.h"
#endif
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -245,6 +249,12 @@ CNpcPlatform *CNpcPlatform::Create(sThingPlatform *ThisPlatform)
break; break;
} }
case NPC_RAFT_PLATFORM:
{
platform = new ("raft platform") CNpcRaftPlatform;
break;
}
default: default:
{ {
ASSERT( 0 ); ASSERT( 0 );
@ -352,8 +362,6 @@ void CNpcPlatform::init()
m_isShuttingDown = false; m_isShuttingDown = false;
m_platformWidth = PLATFORMWIDTH;
m_npcPath.initPath(); m_npcPath.initPath();
} }
@ -604,12 +612,16 @@ void CNpcPlatform::calculateBoundingBoxSize()
centre=getCollisionCentre(); centre=getCollisionCentre();
halfLength=m_platformWidth/2; halfLength=m_platformWidth/2;
x1=-halfLength*mcos(angle&4095)>>12; /*x1=-halfLength*mcos(angle&4095)>>12;
y1=-halfLength*msin(angle&4095)>>12; y1=-halfLength*msin(angle&4095)>>12;
x2=+halfLength*mcos(angle&4095)>>12; x2=+halfLength*mcos(angle&4095)>>12;
y2=+halfLength*msin(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 );
} }

View file

@ -71,6 +71,7 @@ public:
NPC_DUAL_PLATFORM, NPC_DUAL_PLATFORM,
NPC_OILDRUM_GENERATOR, NPC_OILDRUM_GENERATOR,
NPC_CRATE_GENERATOR, NPC_CRATE_GENERATOR,
NPC_RAFT_PLATFORM,
NPC_PLAYER_BUBBLE_PLATFORM, NPC_PLAYER_BUBBLE_PLATFORM,
NPC_PLATFORM_TYPE_MAX, NPC_PLATFORM_TYPE_MAX,
}; };

View file

@ -100,6 +100,7 @@ BouncyRing=15
BouncyTyre=15 BouncyTyre=15
DualPlatform=16 DualPlatform=16
Wooden=6 Wooden=6
Raft=19
################################################ ################################################
# Triggers # Triggers

View file

@ -75,3 +75,6 @@ Param0=Sproing
[DualPlatform] [DualPlatform]
Gfx=..\..\Graphics\platforms\wooden\wooden.gin Gfx=..\..\Graphics\platforms\wooden\wooden.gin
[Raft]
Gfx=..\..\Graphics\platforms\raft\raft.gin

View file

@ -1217,6 +1217,14 @@ SOURCE=..\..\..\source\platform\pplayer.h
# End Source File # End Source File
# Begin 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 SOURCE=..\..\..\source\platform\pretract.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File