1
This commit is contained in:
parent
04b5183006
commit
db03d2a512
@ -176,6 +176,7 @@ const float FRAME_RATE_MS = 1000.0f / SERVER_FRAME_RATE;
|
||||
const int MAX_WEAPON_NUM = 5;
|
||||
const int MAX_SKIN_LV = 9;
|
||||
|
||||
const int GUN_SLOT0 = 0;
|
||||
const int GUN_SLOT1 = 1;
|
||||
const int GUN_SLOT2 = 2;
|
||||
|
||||
|
@ -68,13 +68,13 @@ Player* PlayerMgr::CreatePlayerByCMJoin(long ip_saddr, int socket, const cs::CMJ
|
||||
if (msg.weapon().weapon_id() != 0) {
|
||||
MetaData::Equip* weapon_meta = MetaMgr::Instance()->GetEquip(msg.weapon().weapon_id());
|
||||
if (weapon_meta) {
|
||||
hum->weapons[GUN_SLOT1].weapon_idx = GUN_SLOT1;
|
||||
hum->weapons[GUN_SLOT1].weapon_id = msg.weapon().weapon_id();
|
||||
hum->weapons[GUN_SLOT1].weapon_lv = msg.weapon().weapon_lv();
|
||||
hum->weapons[GUN_SLOT1].ammo = 0;
|
||||
hum->weapons[GUN_SLOT1].meta = weapon_meta;
|
||||
hum->weapons[GUN_SLOT1].Recalc();
|
||||
hum->curr_weapon = &hum->weapons[GUN_SLOT1];
|
||||
hum->weapons[GUN_SLOT0].weapon_idx = GUN_SLOT0;
|
||||
hum->weapons[GUN_SLOT0].weapon_id = msg.weapon().weapon_id();
|
||||
hum->weapons[GUN_SLOT0].weapon_lv = msg.weapon().weapon_lv();
|
||||
hum->weapons[GUN_SLOT0].ammo = 0;
|
||||
hum->weapons[GUN_SLOT0].meta = weapon_meta;
|
||||
hum->weapons[GUN_SLOT0].Recalc();
|
||||
hum->curr_weapon = &hum->weapons[GUN_SLOT0];
|
||||
}
|
||||
}
|
||||
hum->SetSkinInfo(msg.baseskin());
|
||||
|
Loading…
x
Reference in New Issue
Block a user