添加无敌状态
This commit is contained in:
parent
b046afe4b7
commit
d47fdbb9fb
@ -51,6 +51,9 @@ void Bullet::OnHit(std::set<Entity*>& objects)
|
||||
return;
|
||||
}
|
||||
Human* hum = (Human*)target;
|
||||
if (hum->HasBuffEffect(kBET_Invincible)) {
|
||||
continue;
|
||||
}
|
||||
#if 1
|
||||
if (!hum->dead && (IsBomb() || player->team_id != hum->team_id)) {
|
||||
#else
|
||||
|
@ -111,6 +111,7 @@ enum BuffEffectType_e
|
||||
kBET_ChgAttr = 1, //改变属性
|
||||
kBET_Jump = 2, //翻滚
|
||||
kBET_Car = 3, //骑乘
|
||||
kBET_Invincible = 4, //无敌
|
||||
kBET_OnceChgAttr = 11, //一次性buff
|
||||
kBET_End
|
||||
};
|
||||
|
@ -15,6 +15,8 @@
|
||||
#include "collider.h"
|
||||
#include "typeconvert.h"
|
||||
|
||||
const int kREVIVE_BUFF_ID = 1005;
|
||||
|
||||
Player::Player():Human()
|
||||
{
|
||||
entity_type = ET_Player;
|
||||
@ -1146,6 +1148,12 @@ void Player::_CMRevive(f8::MsgHdr& hdr, const cs::CMRevive& msg)
|
||||
ResetTankSkin();
|
||||
SyncAroundPlayers(__FILE__, __LINE__, __func__);
|
||||
FreeReviveTimer();
|
||||
{
|
||||
MetaData::Buff* buff_meta = MetaMgr::Instance()->GetBuff(kREVIVE_BUFF_ID);
|
||||
if (buff_meta) {
|
||||
AddBuff(buff_meta, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user