This commit is contained in:
aozhiwei 2023-01-01 14:58:30 +08:00
parent 7e7e7b11da
commit c9deadfcec

View File

@ -3054,13 +3054,11 @@ void Human::DropWeapon(int weapon_idx, int num)
weapon_idx == GUN_SLOT0 || weapon_idx == GUN_SLOT0 ||
weapon_idx == GUN_SLOT1 || weapon_idx == GUN_SLOT1 ||
weapon_idx == GUN_SLOT2) { weapon_idx == GUN_SLOT2) {
a8::Vec2 dir = a8::Vec2::UP; glm::vec3 dir = GlmHelper::UP;
dir.Rotate(a8::RandAngle()); GlmHelper::RotateY(dir, a8::RandAngle());
// 999 Position pos = GetPos();
#if 1 pos.FromGlmVec3(GetPos().ToGlmVec3() + dir * (40.0f + rand() % 50));
#else room->CreateLoot(weapon_id, pos, 1, 1);
room->CreateLoot(weapon_id, GetPos() + dir * (40 + rand() % 50), 1, 1);
#endif
} }
MarkSyncActivePlayer(__FILE__, __LINE__, __func__); MarkSyncActivePlayer(__FILE__, __LINE__, __func__);
SyncAroundPlayers(__FILE__, __LINE__, __func__); SyncAroundPlayers(__FILE__, __LINE__, __func__);