1
This commit is contained in:
parent
db7ec3edef
commit
6139504fb2
@ -39,6 +39,7 @@ void Android::Initialize()
|
|||||||
RandSkin();
|
RandSkin();
|
||||||
GiveEquip();
|
GiveEquip();
|
||||||
RecalcBaseAttr();
|
RecalcBaseAttr();
|
||||||
|
SetInfiniteBulletMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Android::Update(int delta_time)
|
void Android::Update(int delta_time)
|
||||||
|
@ -115,14 +115,6 @@ Creature::Creature():MoveableEntity()
|
|||||||
|
|
||||||
weak_ptr_chunk_.Set(this);
|
weak_ptr_chunk_.Set(this);
|
||||||
inventory_[IS_1XSCOPE].num = 1;
|
inventory_[IS_1XSCOPE].num = 1;
|
||||||
|
|
||||||
if (MetaMgr::Instance()->fighting_mode) {
|
|
||||||
inventory_[IS_9MM].num = FIGHTING_MODE_BULLET_NUM;
|
|
||||||
inventory_[IS_556MM].num = FIGHTING_MODE_BULLET_NUM;
|
|
||||||
inventory_[IS_762MM].num = FIGHTING_MODE_BULLET_NUM;
|
|
||||||
inventory_[IS_12GAUGE].num = FIGHTING_MODE_BULLET_NUM;
|
|
||||||
inventory_[IS_RPG].num = FIGHTING_MODE_BULLET_NUM;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Creature::~Creature()
|
Creature::~Creature()
|
||||||
@ -1844,3 +1836,12 @@ bool Creature::TryMove(const a8::Vec2& target_pos, a8::Vec2& out_pos)
|
|||||||
}
|
}
|
||||||
return move_ok;
|
return move_ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Creature::SetInfiniteBulletMode()
|
||||||
|
{
|
||||||
|
inventory_[IS_9MM].num = FIGHTING_MODE_BULLET_NUM;
|
||||||
|
inventory_[IS_556MM].num = FIGHTING_MODE_BULLET_NUM;
|
||||||
|
inventory_[IS_762MM].num = FIGHTING_MODE_BULLET_NUM;
|
||||||
|
inventory_[IS_12GAUGE].num = FIGHTING_MODE_BULLET_NUM;
|
||||||
|
inventory_[IS_RPG].num = FIGHTING_MODE_BULLET_NUM;
|
||||||
|
}
|
||||||
|
@ -177,6 +177,7 @@ class Creature : public MoveableEntity
|
|||||||
float GetMaxHP();
|
float GetMaxHP();
|
||||||
void GetHitEnemys(std::set<Creature*>& enemys);
|
void GetHitEnemys(std::set<Creature*>& enemys);
|
||||||
bool TryMove(const a8::Vec2& target_pos, a8::Vec2& out_pos);
|
bool TryMove(const a8::Vec2& target_pos, a8::Vec2& out_pos);
|
||||||
|
void SetInfiniteBulletMode();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -43,6 +43,7 @@ void Hero::Initialize()
|
|||||||
weapons[GUN_SLOT1].Recalc();
|
weapons[GUN_SLOT1].Recalc();
|
||||||
SetCurrWeapon(&weapons[GUN_SLOT1]);
|
SetCurrWeapon(&weapons[GUN_SLOT1]);
|
||||||
}
|
}
|
||||||
|
SetInfiniteBulletMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hero::FillMFObjectPart(Room* room, Human* hum, cs::MFObjectPart* part_data)
|
void Hero::FillMFObjectPart(Room* room, Human* hum, cs::MFObjectPart* part_data)
|
||||||
|
@ -38,6 +38,9 @@ void Player::Initialize()
|
|||||||
Human::Initialize();
|
Human::Initialize();
|
||||||
max_energy_shield = energy_shield;
|
max_energy_shield = energy_shield;
|
||||||
RecalcBaseAttr();
|
RecalcBaseAttr();
|
||||||
|
if (room->IsInfiniteBulletMode()) {
|
||||||
|
SetInfiniteBulletMode();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player::Update(int delta_time)
|
void Player::Update(int delta_time)
|
||||||
@ -1160,6 +1163,8 @@ void Player::_CMExecCommand(f8::MsgHdr& hdr, const cs::CMExecCommand& msg)
|
|||||||
int item_id = a8::XValue(cmds[1]);
|
int item_id = a8::XValue(cmds[1]);
|
||||||
int item_num = a8::XValue(cmds[2]);
|
int item_num = a8::XValue(cmds[2]);
|
||||||
GMAddItem(item_id, item_num);
|
GMAddItem(item_id, item_num);
|
||||||
|
} else if (cmd == "infinite_bullet_mode") {
|
||||||
|
room->SetInfiniteBulletMode();
|
||||||
} else if (cmd == "shuaguai" && cmds.size() >= 3) {
|
} else if (cmd == "shuaguai" && cmds.size() >= 3) {
|
||||||
int hero_id = a8::XValue(cmds[1]);
|
int hero_id = a8::XValue(cmds[1]);
|
||||||
int hero_num = a8::XValue(cmds[2]);
|
int hero_num = a8::XValue(cmds[2]);
|
||||||
|
@ -3872,3 +3872,11 @@ void Room::GetPartObjectWatchList(Entity* entity, std::vector<Human*>& watch_lis
|
|||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Room::SetInfiniteBulletMode()
|
||||||
|
{
|
||||||
|
infinite_bullet_mode_ = true;
|
||||||
|
for (auto& pair : accountid_hash_) {
|
||||||
|
pair.second->SetInfiniteBulletMode();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -182,6 +182,8 @@ public:
|
|||||||
Incubator* GetIncubator() { return incubator_;};
|
Incubator* GetIncubator() { return incubator_;};
|
||||||
void ShuaMon(const a8::Vec2& center, std::vector<int>& airdrop_mon_list, float radius);
|
void ShuaMon(const a8::Vec2& center, std::vector<int>& airdrop_mon_list, float radius);
|
||||||
void GetPartObjectWatchList(Entity* entity, std::vector<Human*>& watch_list);
|
void GetPartObjectWatchList(Entity* entity, std::vector<Human*>& watch_list);
|
||||||
|
void SetInfiniteBulletMode();
|
||||||
|
bool IsInfiniteBulletMode() { return infinite_bullet_mode_; };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void ShuaAndroid();
|
void ShuaAndroid();
|
||||||
@ -336,6 +338,8 @@ private:
|
|||||||
|
|
||||||
Incubator* incubator_ = nullptr;
|
Incubator* incubator_ = nullptr;
|
||||||
|
|
||||||
|
bool infinite_bullet_mode_ = false;
|
||||||
|
|
||||||
friend class Incubator;
|
friend class Incubator;
|
||||||
friend class Team;
|
friend class Team;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user