StrataSource / Portal-2-Community-Edition

Task tracker for Portal 2: Community Edition
https://www.portal2communityedition.com
150 stars 3 forks source link

New gun not using when picking up if player use higher priority weapon #1370

Open MyGamepedia opened 1 year ago

MyGamepedia commented 1 year ago

Describe the bug

In Half Life 2 new weapons always using when picking up, it's very important because it's inform player that player picked up new weapon, otherwise - player can miss it and never use new weapon or discover it to late and not understand how and when it's happened. In Portal it's broken, still work if new weapon was higher priority then weapon that player use. However, if player use higher priority weapon - new weapon will not used. This is because of Portal is Half Life 2: Deathmatch mod technically. This problem also in P2CE.

Half Life 2.

https://github.com/StrataSource/Portal-2-Community-Edition/assets/103366204/5199b395-9674-4c8d-9b4b-930f55a73bf3

Portal.

https://github.com/StrataSource/Portal-2-Community-Edition/assets/103366204/8c3a8719-a0e3-4510-bc14-868676290044

P2CE.

https://github.com/StrataSource/Portal-2-Community-Edition/assets/103366204/60bd4fe6-60ef-4a48-b18b-4a3a891adc7a

Issue Map

Any.

To Reproduce

  1. Open any map.
  2. Enter in console give weapon_357; ent_create weapon_frag.
  3. Pick up frag.
  4. Pay attention that frag not using.

Operating System

Any.

MyGamepedia commented 1 year ago

I found that it's Half Life 2: Deathmatch thing.

https://github.com/StrataSource/Portal-2-Community-Edition/assets/103366204/e8b5d6f3-0de2-4815-b213-ea7dea24aa33

MyGamepedia commented 1 year ago

Now I think that P2CE should have some cvar that toggle dm and hl2 versions, for example sv_hl2dm_weapon_pickup_behavior 1 or 0 (0 - by default).

MyGamepedia commented 1 year ago

Found in hl2mp code hl2mp_gamerules.cpp, thought that P2CE may should have info_hl2mp_gamerules entity.