1
This commit is contained in:
parent
74bb99fccc
commit
9672339b44
@ -1189,6 +1189,11 @@ void Creature::Shot(a8::Vec2& target_dir, bool& shot_ok, float fly_distance)
|
|||||||
--curr_weapon->ammo;
|
--curr_weapon->ammo;
|
||||||
}
|
}
|
||||||
int slot_id = curr_weapon->meta->i->_inventory_slot();
|
int slot_id = curr_weapon->meta->i->_inventory_slot();
|
||||||
|
#ifdef DEBUG
|
||||||
|
if (IsPlayer()) {
|
||||||
|
SendDebugMsg(a8::Format("使用武器 %s slot:%d", {curr_weapon->meta->i->name(), slot_id}));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
switch (slot_id) {
|
switch (slot_id) {
|
||||||
case IS_FRAG: //手雷
|
case IS_FRAG: //手雷
|
||||||
case IS_SMOKE: //烟雾弹
|
case IS_SMOKE: //烟雾弹
|
||||||
|
@ -126,7 +126,7 @@ class Creature : public MoveableEntity
|
|||||||
int GetInventory(int slot_id);
|
int GetInventory(int slot_id);
|
||||||
void AddInventory(int slot_id, int num);
|
void AddInventory(int slot_id, int num);
|
||||||
void DecInventory(int slot_id, int num);
|
void DecInventory(int slot_id, int num);
|
||||||
std::array<int, IS_END - 1>& GetInventoryData() { return inventory_; };
|
std::array<int, IS_END>& GetInventoryData() { return inventory_; };
|
||||||
virtual void _UpdateMove(int speed) {};
|
virtual void _UpdateMove(int speed) {};
|
||||||
|
|
||||||
void CheckSpecObject();
|
void CheckSpecObject();
|
||||||
@ -181,7 +181,7 @@ private:
|
|||||||
float skill_distance_ = 0.0f;
|
float skill_distance_ = 0.0f;
|
||||||
std::map<int, Skill*> skill_hash_;
|
std::map<int, Skill*> skill_hash_;
|
||||||
std::map<int, Skill*> passive_skill_hash_;
|
std::map<int, Skill*> passive_skill_hash_;
|
||||||
std::array<int, IS_END - 1> inventory_ = {};
|
std::array<int, IS_END> inventory_ = {};
|
||||||
friend class Skill;
|
friend class Skill;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user