From c716046995f056aa71efe6f2f7594862134f2ae6 Mon Sep 17 00:00:00 2001 From: Paul Date: Thu, 14 Jun 2001 21:12:48 +0000 Subject: [PATCH] --- source/player/player.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/source/player/player.cpp b/source/player/player.cpp index 0c222b2d8..3782c0c9b 100644 --- a/source/player/player.cpp +++ b/source/player/player.cpp @@ -2376,6 +2376,21 @@ int CPlayer::moveVertical(int _moveDistance) else if((CGameScene::getCollision()->getCollisionBlock(pos.vx,pos.vy+_moveDistance-HEIGHT_FOR_HEAD_COLLISION)&COLLISION_TYPE_MASK)!=COLLISION_TYPE_FLAG_NORMAL&& getHeightFromGround(pos.vx,pos.vy+_moveDistance-HEIGHT_FOR_HEAD_COLLISION)<=0) { + switch(CGameScene::getCollision()->getCollisionBlock(pos.vx,pos.vy+_moveDistance-HEIGHT_FOR_HEAD_COLLISION)&COLLISION_TYPE_MASK) + { + case COLLISION_TYPE_FLAG_DAMAGE: + takeDamage(DAMAGE__COLLISION_DAMAGE); + break; + + case COLLISION_TYPE_FLAG_ELECTRIC: + if(!isWearingBoots()) + { + takeDamage(DAMAGE__COLLISION_DAMAGE); + } + break; + default: + break; + } pos.vy=((pos.vy+_moveDistance)&0xfff0); _moveDistance=0; hitGround=true;