document player state flags in gamepad module

This commit is contained in:
FutureRave 2022-01-12 17:48:20 +00:00
parent 41874769aa
commit 2785343eac
No known key found for this signature in database
GPG Key ID: E883E2BC9657D955
2 changed files with 36 additions and 3 deletions

View File

@ -536,14 +536,13 @@ namespace Components
if (weaponDef->requireLockonToFire)
return false;
if (ps->linkFlags & 4)
if (ps->linkFlags & Game::PLF_WEAPONVIEW_ONLY)
return false;
if (ps->weaponState >= Game::WEAPON_STUNNED_START && ps->weaponState <= Game::WEAPON_STUNNED_END)
return false;
// The game checks for these flags. Their meaning is to be researched if necessary.
if (ps->eFlags & 0x100C00)
if (ps->eFlags & (Game::EF_VEHICLE_ACTIVE | Game::EF_TURRET_ACTIVE_DUCK | Game::EF_TURRET_ACTIVE_PRONE))
return false;
if (!ps->hasAmmo)

View File

@ -1110,6 +1110,40 @@ namespace Game
PM_DEAD_LINKED = 0x9,
};
enum playerEFlag
{
EF_NONSOLID_BMODEL = 0x1,
EF_TELEPORT_BIT = 0x2,
EF_CROUCHING = 0x4,
EF_PRONE = 0x8,
EF_NODRAW = 0x20,
EF_TIMED_OBJECT = 0x40,
EF_VOTED = 0x80,
EF_TALK = 0x100,
EF_FIRING = 0x200,
EF_TURRET_ACTIVE_PRONE = 0x400,
EF_TURRET_ACTIVE_DUCK = 0x800,
EF_LOCK_LIGHT_VIS = 0x1000,
EF_AIM_ASSIST = 0x2000,
EF_LOOP_RUMBLE = 0x4000,
EF_LASER_SIGHT = 0x8000,
EF_MANTLE = 0x10000,
EF_DEAD = 0x20000,
EF_ADS = 0x40000,
EF_NEW = 0x80000,
EF_VEHICLE_ACTIVE = 0x100000,
EF_JAMMING = 0x200000,
EF_COMPASS_PING = 0x400000,
EF_SOFT = 0x800000
};
enum playerLinkFlag
{
PLF_ANGLES_LOCKED = 0x1,
PLF_USES_OFFSET = 0x2,
PLF_WEAPONVIEW_ONLY = 0x4
};
struct playerState_s
{
int commandTime;