Hook when checking for enter cursor on vehicles
Bug #895735 reported by
Renegade
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ares |
Fix Released
|
Wishlist
|
DCoder DCoder |
Bug Description
For #bug:733, we need a hook to override when units get an enter cursor on vehicles.
Since the game should already perform the exact check needed when checking for VehicleThief-ness, a hook in that function would be best, to override the check from "Should this unit get an enter cursor on vehicles because it's a VehicleThief?" to "Should this unit get an enter cursor on vehicles because it's a VehicleThief or because the vehicle is driver-less?".
To post a comment you must log in.
DEFINE_HOOK(51E7BF, InfantryClass_ GetCursorOverOb ject_CanCapture , 6)
{
GET(InfantryClass *, pSelected, EDI);
GET(TechnoClass *, pTarget, ESI);
enum {
Capture = 0x51E7C5, // the game will return an Enter cursor no questions asked
DontCapture = 0x51E85A, // the game will assume this is not a VehicleThief and will check for other cursors normally
DontMindMe = 0, // the game will check if this is a VehicleThief
} DoWhat = DontMindMe;
return DoWhat;
}