ValveSoftware / halflife

Half-Life 1 engine based games
Other
3.68k stars 625 forks source link

[Half-Life] Missiles fired by enemy tanks follow RPG laserspot. #3361

Open malortie opened 1 year ago

malortie commented 1 year ago

Description

In map c2a5b, the player goes through a narrow pathway where a beige tank shoots fast rocket missiles.

Toggling the RPG laserspot causes the missiles fired by the tank to follow the laser spot.

Steps to reproduce

  1. Open the console and type the following:
    sv_cheats 1
    map c2a5b
    impulse 101
    god
  2. Enable the RPG laserspot
  3. Go to the beige tank
  4. Have the tank fire at the player

Missiles are expected to follow the place where you aim with the RPG.

Screenshot c2a5b_tank_missile

Possible cause

In CRpgRocket::FollowThink() the AI searches for all laser spot entities. It does not appear to take into account whether or not it was fired by a player.

https://github.com/ValveSoftware/halflife/blob/c7240b965743a53a29491dd49320c88eecf6257b/dlls/rpg.cpp#L221-L238

In-game version

Betas:

Protocol version 48
Exe version 1.1.2.2/Stdio (valve)
Exe build: 19:53:27 Aug  3 2020 (8684)
System information ``` Computer Information: Manufacturer: Micro-Star International Co., Ltd. Model: GP75 Leopard 10SFK Form Factor: Laptop No Touch Input Detected Processor Information: CPU Vendor: GenuineIntel CPU Brand: Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz CPU Family: 0x6 CPU Model: 0xa5 CPU Stepping: 0x2 CPU Type: 0x0 Speed: 2592 MHz 12 logical processors 6 physical processors Hyper-threading: Supported FCMOV: Supported SSE2: Supported SSE3: Supported SSSE3: Supported SSE4a: Unsupported SSE41: Supported SSE42: Supported AES: Supported AVX: Supported AVX2: Supported AVX512F: Unsupported AVX512PF: Unsupported AVX512ER: Unsupported AVX512CD: Unsupported AVX512VNNI: Unsupported SHA: Unsupported CMPXCHG16B: Supported LAHF/SAHF: Supported PrefetchW: Unsupported Operating System Version: Windows 10 (64 bit) NTFS: Supported Crypto Provider Codes: Supported 311 0x0 0x0 0x0 Video Card: Driver: NVIDIA GeForce RTX 2070 DirectX Driver Name: nvldumd.dll Driver Version: 27.21.14.5751 DirectX Driver Version: 27.21.14.5751 Driver Date: 11 22 2020 Desktop Color Depth: 32 bits per pixel Monitor Refresh Rate: 144 Hz DirectX Card: NVIDIA GeForce RTX 2070 VendorID: 0x10de DeviceID: 0x1f14 Revision: 0xa1 Number of Monitors: 1 Number of Logical Video Cards: 1 No SLI or Crossfire Detected Primary Display Resolution: 1920 x 1080 Desktop Resolution: 1920 x 1080 Primary Display Size: 15.00" x 8.43" (17.17" diag), 38.1cm x 21.4cm (43.6cm diag) Primary Bus: PCI Express 16x Primary VRAM: 8191 MB Supported MSAA Modes: 2x 4x 8x Sound card: Audio device: Realtek HD Audio 2nd output (Re Memory: RAM: 16204 Mb VR Hardware: VR Headset: None detected Miscellaneous: UI Language: English Media Type: Undetermined Total Hard Disk Space Available: 1442103 MB Largest Free Hard Disk Block: 288248 MB OS Install Date: Sep 06 2020 Game Controller: None detected MAC Address hash: 34a8b86f199bf4d3500eca704982759bd8d2545a Storage: Disk serial number hash: 3850db9b Number of SSDs: 0 Number of HDDs: 0 Number of removable drives: 0 ```
TheStormN commented 10 months ago

This is happening in multiplayer too, where other players can steal your rocket and you can steal theirs in the very same way.