mirror of
https://github.com/halpz/re3.git
synced 2024-12-24 17:55:29 +00:00
Merge remote-tracking branch 'upstream/master' into script_dev
This commit is contained in:
commit
6224060627
File diff suppressed because it is too large
Load diff
|
@ -214,7 +214,7 @@ public:
|
|||
int16 m_awAudioEvent[4];
|
||||
uint8 gap_18[2];
|
||||
float m_afVolume[4];
|
||||
uint8 m_Loops;
|
||||
uint8 m_AudioEvents;
|
||||
uint8 field_25[3];
|
||||
|
||||
// no methods
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -112,8 +112,8 @@ CGameLogic::Update()
|
|||
CCarCtrl::ClearInterestingVehicleList();
|
||||
CWorld::ClearExcitingStuffFromArea(pPlayerInfo.GetPos(), 4000.0f, 1);
|
||||
CRestart::FindClosestHospitalRestartPoint(pPlayerInfo.GetPos(), &vecRestartPos, &fRestartFloat);
|
||||
CRestart::OverrideHospitalLevel = false;
|
||||
CRestart::OverridePoliceStationLevel = false;
|
||||
CRestart::OverrideHospitalLevel = LEVEL_NONE;
|
||||
CRestart::OverridePoliceStationLevel = LEVEL_NONE;
|
||||
PassTime(720);
|
||||
RestorePlayerStuffDuringResurrection(pPlayerInfo.m_pPed, vecRestartPos, fRestartFloat);
|
||||
SortOutStreamingAndMemory(pPlayerInfo.GetPos());
|
||||
|
@ -183,8 +183,8 @@ CGameLogic::Update()
|
|||
CCarCtrl::ClearInterestingVehicleList();
|
||||
CWorld::ClearExcitingStuffFromArea(pPlayerInfo.GetPos(), 4000.0f, 1);
|
||||
CRestart::FindClosestPoliceRestartPoint(pPlayerInfo.GetPos(), &vecRestartPos, &fRestartFloat);
|
||||
CRestart::OverrideHospitalLevel = false;
|
||||
CRestart::OverridePoliceStationLevel = false;
|
||||
CRestart::OverrideHospitalLevel = LEVEL_NONE;
|
||||
CRestart::OverridePoliceStationLevel = LEVEL_NONE;
|
||||
PassTime(720);
|
||||
RestorePlayerStuffDuringResurrection(pPlayerInfo.m_pPed, vecRestartPos, fRestartFloat);
|
||||
pPlayerInfo.m_pPed->ClearWeapons();
|
||||
|
@ -224,8 +224,8 @@ CGameLogic::Update()
|
|||
CCarCtrl::ClearInterestingVehicleList();
|
||||
CWorld::ClearExcitingStuffFromArea(pPlayerInfo.GetPos(), 4000.0f, 1);
|
||||
CRestart::FindClosestPoliceRestartPoint(pPlayerInfo.GetPos(), &vecRestartPos, &fRestartFloat);
|
||||
CRestart::OverridePoliceStationLevel = false;
|
||||
CRestart::OverrideHospitalLevel = false;
|
||||
CRestart::OverridePoliceStationLevel = LEVEL_NONE;
|
||||
CRestart::OverrideHospitalLevel = LEVEL_NONE;
|
||||
RestorePlayerStuffDuringResurrection(pPlayerInfo.m_pPed, vecRestartPos, fRestartFloat);
|
||||
SortOutStreamingAndMemory(pPlayerInfo.GetPos());
|
||||
TheCamera.m_fCamShakeForce = 0.0f;
|
||||
|
|
|
@ -102,8 +102,8 @@ CCamera::IsBoxVisible(RwV3d *box, const CMatrix *mat)
|
|||
int
|
||||
CCamera::GetLookDirection(void)
|
||||
{
|
||||
if(Cams[ActiveCam].Mode == CCam::MODE_CAMONASTRING ||
|
||||
Cams[ActiveCam].Mode == CCam::MODE_FIRSTPERSON ||
|
||||
if(Cams[ActiveCam].Mode == CCam::MODE_CAM_ON_A_STRING ||
|
||||
Cams[ActiveCam].Mode == CCam::MODE_1STPERSON ||
|
||||
Cams[ActiveCam].Mode == CCam::MODE_BEHINDBOAT ||
|
||||
Cams[ActiveCam].Mode == CCam::MODE_FOLLOWPED)
|
||||
return Cams[ActiveCam].DirectionWasLooking;
|
||||
|
@ -113,7 +113,7 @@ CCamera::GetLookDirection(void)
|
|||
bool
|
||||
CCamera::GetLookingForwardFirstPerson()
|
||||
{
|
||||
return Cams[ActiveCam].Mode == CCam::MODE_FIRSTPERSON &&
|
||||
return Cams[ActiveCam].Mode == CCam::MODE_1STPERSON &&
|
||||
Cams[ActiveCam].DirectionWasLooking == LOOKING_FORWARD;
|
||||
}
|
||||
|
||||
|
@ -1145,7 +1145,7 @@ CCam::FixCamIfObscured(CVector &TargetCoors, float TargetHeight, float TargetOri
|
|||
|
||||
if(Mode == MODE_BEHINDCAR)
|
||||
Target.z += TargetHeight/2.0f;
|
||||
if(Mode == MODE_CAMONASTRING){
|
||||
if(Mode == MODE_CAM_ON_A_STRING){
|
||||
UseEntityPos = true;
|
||||
Target.z += TargetHeight/2.0f;
|
||||
EntityPos = CamTargetEntity->GetPosition();
|
||||
|
@ -1306,7 +1306,7 @@ CCam::Using3rdPersonMouseCam()
|
|||
(Mode == MODE_FOLLOWPED ||
|
||||
TheCamera.m_bPlayerIsInGarage &&
|
||||
FindPlayerPed() && FindPlayerPed()->m_nPedState != PED_DRIVING &&
|
||||
Mode != MODE_TOPDOWN1 && this->CamTargetEntity == FindPlayerPed());
|
||||
Mode != MODE_TOPDOWN && this->CamTargetEntity == FindPlayerPed());
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
@ -11,14 +11,15 @@ struct CCam
|
|||
{
|
||||
enum
|
||||
{
|
||||
MODE_TOPDOWN1 = 1,
|
||||
MODE_TOPDOWN2,
|
||||
MODE_NONE = 0,
|
||||
MODE_TOPDOWN,
|
||||
MODE_GTACLASSIC,
|
||||
MODE_BEHINDCAR,
|
||||
MODE_FOLLOWPED,
|
||||
MODE_AIMING,
|
||||
MODE_DEBUG,
|
||||
MODE_SNIPER,
|
||||
MODE_ROCKET,
|
||||
MODE_ROCKETLAUNCHER,
|
||||
MODE_MODELVIEW,
|
||||
MODE_BILL,
|
||||
MODE_SYPHON,
|
||||
|
@ -26,35 +27,35 @@ struct CCam
|
|||
MODE_CHEESYZOOM,
|
||||
MODE_WHEELCAM,
|
||||
MODE_FIXED,
|
||||
MODE_FIRSTPERSON,
|
||||
MODE_1STPERSON,
|
||||
MODE_FLYBY,
|
||||
MODE_CAMONASTRING,
|
||||
MODE_REACTIONCAM,
|
||||
MODE_FOLLOWPEDWITHBINDING,
|
||||
MODE_CHRISWITHBINDINGPLUSROTATION,
|
||||
MODE_CAM_ON_A_STRING,
|
||||
MODE_REACTION,
|
||||
MODE_FOLLOW_PED_WITH_BIND,
|
||||
MODE_CHRIS,
|
||||
MODE_BEHINDBOAT,
|
||||
MODE_PLAYERFALLENWATER,
|
||||
MODE_CAMONTRAINROOF,
|
||||
MODE_CAMRUNNINGSIDETRAIN,
|
||||
MODE_BLOODONTHETRACKS,
|
||||
MODE_IMTHEPASSENGERWOOWOO,
|
||||
MODE_SYPHONCRIMINFRONT,
|
||||
MODE_PEDSDEADBABY,
|
||||
MODE_CUSHYPILLOWSARSE,
|
||||
MODE_LOOKATCARS,
|
||||
MODE_ARRESTCAMONE,
|
||||
MODE_ARRESTCAMTWO,
|
||||
MODE_M16FIRSTPERSON_34,
|
||||
MODE_SPECIALFIXEDFORSYPHON,
|
||||
MODE_FIGHT,
|
||||
MODE_TOPDOWNPED,
|
||||
MODE_SNIPER_RUN_AROUND,
|
||||
MODE_ROCKET_RUN_AROUND,
|
||||
MODE_FIRSTPERSONPEDONPC_40,
|
||||
MODE_FIRSTPERSONPEDONPC_41,
|
||||
MODE_FIRSTPERSONPEDONPC_42,
|
||||
MODE_PLAYER_FALLEN_WATER,
|
||||
MODE_CAM_ON_TRAIN_ROOF,
|
||||
MODE_CAM_RUNNING_SIDE_TRAIN,
|
||||
MODE_BLOOD_ON_THE_TRACKS,
|
||||
MODE_IM_THE_PASSENGER_WOOWOO,
|
||||
MODE_SYPHON_CRIM_IN_FRONT,
|
||||
MODE_PED_DEAD_BABY,
|
||||
MODE_PILLOWS_PAPS,
|
||||
MODE_LOOK_AT_CARS,
|
||||
MODE_ARRESTCAM_ONE,
|
||||
MODE_ARRESTCAM_TWO,
|
||||
MODE_M16_1STPERSON,
|
||||
MODE_SPECIAL_FIXED_FOR_SYPHON,
|
||||
MODE_FIGHT_CAM,
|
||||
MODE_TOP_DOWN_PED,
|
||||
MODE_SNIPER_RUNABOUT,
|
||||
MODE_ROCKETLAUNCHER_RUNABOUT,
|
||||
MODE_1STPERSON_RUNABOUT,
|
||||
MODE_M16_1STPERSON_RUNABOUT,
|
||||
MODE_FIGHT_CAM_RUNABOUT,
|
||||
MODE_EDITOR,
|
||||
MODE_M16FIRSTPERSON_44
|
||||
MODE_HELICANNON_1STPERSON, // vice city leftover
|
||||
};
|
||||
|
||||
bool bBelowMinDist; //used for follow ped mode
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -5,11 +5,11 @@
|
|||
|
||||
enum eControllerType
|
||||
{
|
||||
KEYBOARD,
|
||||
KEYBOARD = 0,
|
||||
OPTIONAL_EXTRA,
|
||||
MOUSE,
|
||||
JOYSTICK,
|
||||
TOTAL_CONTROLLER_TYPES
|
||||
MAX_CONTROLLERTYPES,
|
||||
};
|
||||
|
||||
enum e_ControllerAction
|
||||
|
@ -28,8 +28,6 @@ enum e_ControllerAction
|
|||
PED_JUMPING,
|
||||
PED_SPRINT,
|
||||
PED_LOOKBEHIND,
|
||||
//PED_DUCK, // VC
|
||||
//PED_ANSWER_PHONE, // VC
|
||||
VEHICLE_ACCELERATE,
|
||||
VEHICLE_BRAKE,
|
||||
VEHICLE_CHANGE_RADIO_STATION,
|
||||
|
@ -52,18 +50,49 @@ enum e_ControllerAction
|
|||
NETWORK_TALK,
|
||||
PED_1RST_PERSON_LOOK_UP,
|
||||
PED_1RST_PERSON_LOOK_DOWN,
|
||||
|
||||
CONTROLLERACTION_36, // unk, unused?
|
||||
|
||||
_CONTROLLERACTION_36, // Unused
|
||||
TOGGLE_DPAD,
|
||||
SWITCH_DEBUG_CAM_ON,
|
||||
TAKE_SCREEN_SHOT,
|
||||
SHOW_MOUSE_POINTER_TOGGLE,
|
||||
MAX_CONTROLLERACTIONS,
|
||||
};
|
||||
|
||||
TOTAL_CONTROL_ACTIONS
|
||||
enum e_ControllerActionType
|
||||
{
|
||||
ACTIONTYPE_1RSTPERSON = 0,
|
||||
ACTIONTYPE_3RDPERSON,
|
||||
ACTIONTYPE_VEHICLE,
|
||||
ACTIONTYPE_VEHICLE_3RDPERSON,
|
||||
ACTIONTYPE_COMMON,
|
||||
ACTIONTYPE_1RST3RDPERSON,
|
||||
ACTIONTYPE_NONE,
|
||||
};
|
||||
|
||||
enum eContSetOrder
|
||||
{
|
||||
SETORDER_NONE = 0,
|
||||
SETORDER_1,
|
||||
SETORDER_2,
|
||||
SETORDER_3,
|
||||
SETORDER_4,
|
||||
MAX_SETORDERS,
|
||||
};
|
||||
|
||||
enum eSimCheckers
|
||||
{
|
||||
SIM_X1 = 0, SIM_Y1, // DPad
|
||||
SIM_X2, SIM_Y2, // LeftStick
|
||||
|
||||
MAX_SIMS
|
||||
};
|
||||
|
||||
class CMouseControllerState;
|
||||
class CControllerState;
|
||||
|
||||
|
||||
#define JOY_BUTTONS 16
|
||||
#define MAX_BUTTONS (JOY_BUTTONS+1)
|
||||
|
||||
#define ACTIONNAME_LENGTH 40
|
||||
|
||||
|
@ -72,38 +101,97 @@ class CControllerConfigManager
|
|||
public:
|
||||
struct tControllerConfigBind
|
||||
{
|
||||
RsKeyCodes m_Key;
|
||||
int32 m_Key;
|
||||
int32 m_ContSetOrder;
|
||||
|
||||
tControllerConfigBind()
|
||||
{
|
||||
m_Key = 0;
|
||||
m_ContSetOrder = 0;
|
||||
}
|
||||
};
|
||||
|
||||
bool firstCapture;
|
||||
bool m_bFirstCapture;
|
||||
char _pad0[3];
|
||||
#ifdef __DINPUT_INCLUDED__
|
||||
DIJOYSTATE2 m_OldState;
|
||||
DIJOYSTATE2 m_NewState;
|
||||
wchar m_aActionNames[TOTAL_CONTROL_ACTIONS][ACTIONNAME_LENGTH];
|
||||
bool m_aButtonStates[17];
|
||||
tControllerConfigBind m_aSettings[TOTAL_CONTROL_ACTIONS][TOTAL_CONTROLLER_TYPES];
|
||||
uint8 m_aSimCheckers[4][4];
|
||||
#endif
|
||||
wchar m_aActionNames[MAX_CONTROLLERACTIONS][40];
|
||||
bool m_aButtonStates[MAX_BUTTONS];
|
||||
char _pad1[3];
|
||||
tControllerConfigBind m_aSettings[MAX_CONTROLLERACTIONS][MAX_CONTROLLERTYPES];
|
||||
bool m_aSimCheckers[MAX_SIMS][MAX_CONTROLLERTYPES];
|
||||
bool m_bMouseAssociated;
|
||||
char _pad2[3];
|
||||
|
||||
void UpdateJoyButtonState(int padnumber);
|
||||
void UpdateJoyInConfigMenus_ButtonDown(int button, int padnumber);
|
||||
void AffectControllerStateOn_ButtonDown(int button, eControllerType type);
|
||||
void UpdateJoyInConfigMenus_ButtonUp(int button, int padnumber);
|
||||
void AffectControllerStateOn_ButtonUp(int button, int padnumber);
|
||||
CControllerConfigManager();
|
||||
|
||||
void MakeControllerActionsBlank();
|
||||
|
||||
int32 GetJoyButtonJustDown();
|
||||
void LoadSettings(int32 file);
|
||||
|
||||
void SaveSettings(int32 file);
|
||||
void MakeControllerActionsBlank();
|
||||
void LoadSettings(int32 file);
|
||||
|
||||
void InitDefaultControlConfiguration();
|
||||
void InitDefaultControlConfigMouse(CMouseControllerState const &mousestate);
|
||||
void InitDefaultControlConfigJoyPad(unsigned int buttons);
|
||||
void ClearSimButtonPressCheckers();
|
||||
void InitDefaultControlConfigMouse(CMouseControllerState const &availableButtons);
|
||||
void InitDefaultControlConfigJoyPad(uint32 buttons);
|
||||
void InitialiseControllerActionNameArray();
|
||||
|
||||
void UpdateJoyInConfigMenus_ButtonDown (int32 button, int32 padnumber);
|
||||
void AffectControllerStateOn_ButtonDown (int32 button, eControllerType type);
|
||||
void AffectControllerStateOn_ButtonDown_Driving (int32 button, eControllerType type, CControllerState &state);
|
||||
void AffectControllerStateOn_ButtonDown_FirstPersonOnly (int32 button, eControllerType type, CControllerState &state);
|
||||
void AffectControllerStateOn_ButtonDown_ThirdPersonOnly (int32 button, eControllerType type, CControllerState &state);
|
||||
void AffectControllerStateOn_ButtonDown_FirstAndThirdPersonOnly (int32 button, eControllerType type, CControllerState &state);
|
||||
void AffectControllerStateOn_ButtonDown_AllStates (int32 button, eControllerType type, CControllerState &state);
|
||||
void AffectControllerStateOn_ButtonDown_VehicleAndThirdPersonOnly(int32 button, eControllerType type, CControllerState &state);
|
||||
|
||||
void UpdateJoyInConfigMenus_ButtonUp(int32 button, int32 padnumber);
|
||||
void AffectControllerStateOn_ButtonUp(int32 button, eControllerType type);
|
||||
void AffectControllerStateOn_ButtonUp_All_Player_States(int32 button, eControllerType type, CControllerState &state);
|
||||
|
||||
void AffectPadFromKeyBoard();
|
||||
void AffectPadFromMouse();
|
||||
void ClearSettingsAssociatedWithAction(int, int);
|
||||
|
||||
void GetWideStringOfCommandKeys(uint16, wchar*, uint16);
|
||||
void ClearSimButtonPressCheckers();
|
||||
|
||||
bool GetIsKeyboardKeyDown (RsKeyCodes keycode);
|
||||
bool GetIsKeyboardKeyJustDown(RsKeyCodes keycode);
|
||||
bool GetIsMouseButtonDown (RsKeyCodes keycode);
|
||||
bool GetIsMouseButtonUp (RsKeyCodes keycode);
|
||||
|
||||
|
||||
void DeleteMatchingCommonControls (e_ControllerAction action, int32 key, eControllerType type);
|
||||
void DeleteMatching3rdPersonControls (e_ControllerAction action, int32 key, eControllerType type);
|
||||
void DeleteMatching1rst3rdPersonControls (e_ControllerAction action, int32 key, eControllerType type);
|
||||
void DeleteMatchingVehicleControls (e_ControllerAction action, int32 key, eControllerType type);
|
||||
void DeleteMatchingVehicle_3rdPersonControls(e_ControllerAction action, int32 key, eControllerType type);
|
||||
void DeleteMatching1rstPersonControls (e_ControllerAction action, int32 key, eControllerType type);
|
||||
void DeleteMatchingActionInitiators (e_ControllerAction action, int32 key, eControllerType type);
|
||||
|
||||
bool GetIsKeyBlank(int32 key, eControllerType type);
|
||||
e_ControllerActionType GetActionType(e_ControllerAction action);
|
||||
|
||||
void ClearSettingsAssociatedWithAction (e_ControllerAction action, eControllerType type);
|
||||
wchar *GetControllerSettingTextWithOrderNumber(e_ControllerAction action, eContSetOrder setorder);
|
||||
wchar *GetControllerSettingTextKeyBoard (e_ControllerAction action, eControllerType type);
|
||||
wchar *GetControllerSettingTextMouse (e_ControllerAction action);
|
||||
wchar *GetControllerSettingTextJoystick (e_ControllerAction action);
|
||||
|
||||
int32 GetNumOfSettingsForAction(e_ControllerAction action);
|
||||
void GetWideStringOfCommandKeys(uint16 action, wchar *text, uint16 leight);
|
||||
int32 GetControllerKeyAssociatedWithAction(e_ControllerAction action, eControllerType type);
|
||||
|
||||
void UpdateJoyButtonState(int32 padnumber);
|
||||
|
||||
bool GetIsActionAButtonCombo (e_ControllerAction action);
|
||||
wchar *GetButtonComboText (e_ControllerAction action);
|
||||
void SetControllerKeyAssociatedWithAction(e_ControllerAction action, int32 key, eControllerType type);
|
||||
int32 GetMouseButtonAssociatedWithAction (e_ControllerAction action);
|
||||
void SetMouseButtonAssociatedWithAction (e_ControllerAction action, int32 button);
|
||||
void ResetSettingOrder (e_ControllerAction action);
|
||||
};
|
||||
|
||||
VALIDATE_SIZE(CControllerConfigManager, 0x143C);
|
||||
|
|
|
@ -1466,7 +1466,7 @@ void CMenuManager::Process(void)
|
|||
else {
|
||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0);
|
||||
for (int i = 0; i < 4; i++)
|
||||
ControlsManager.ClearSettingsAssociatedWithAction(m_CurrCntrlAction, i);
|
||||
ControlsManager.ClearSettingsAssociatedWithAction((e_ControllerAction)m_CurrCntrlAction, (eControllerType)i);
|
||||
field_534 = false;
|
||||
m_bKeyChangeNotProcessed = false;
|
||||
pControlEdit = nil;
|
||||
|
|
|
@ -342,6 +342,12 @@ enum
|
|||
NUM_MENUROWS = 18,
|
||||
};
|
||||
|
||||
enum eControlMethod
|
||||
{
|
||||
CONTROL_STANDART = 0,
|
||||
CONTROL_CLASSIC,
|
||||
};
|
||||
|
||||
struct tSkinInfo
|
||||
{
|
||||
int field_0;
|
||||
|
@ -431,6 +437,9 @@ public:
|
|||
int m_nCurrSaveSlot;
|
||||
int m_nScreenChangeDelayTimer;
|
||||
|
||||
public:
|
||||
bool GetIsMenuActive() {return !!m_bMenuActive;}
|
||||
|
||||
public:
|
||||
static int32 &OS_Language;
|
||||
static int8 &m_PrefsUseVibration;
|
||||
|
|
131
src/core/Pad.h
131
src/core/Pad.h
|
@ -1,56 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
// same as RW skeleton
|
||||
/*
|
||||
enum Key
|
||||
{
|
||||
// ascii...
|
||||
|
||||
KEY_ESC = 128,
|
||||
|
||||
KEY_F1 = 129,
|
||||
KEY_F2 = 130,
|
||||
KEY_F3 = 131,
|
||||
KEY_F4 = 132,
|
||||
KEY_F5 = 133,
|
||||
KEY_F6 = 134,
|
||||
KEY_F7 = 135,
|
||||
KEY_F8 = 136,
|
||||
KEY_F9 = 137,
|
||||
KEY_F10 = 138,
|
||||
KEY_F11 = 139,
|
||||
KEY_F12 = 140,
|
||||
|
||||
KEY_INS = 141,
|
||||
KEY_DEL = 142,
|
||||
KEY_HOME = 143,
|
||||
KEY_END = 144,
|
||||
KEY_PGUP = 145,
|
||||
KEY_PGDN = 146,
|
||||
|
||||
KEY_UP = 147,
|
||||
KEY_DOWN = 148,
|
||||
KEY_LEFT = 149,
|
||||
KEY_RIGHT = 150,
|
||||
|
||||
// some stuff ommitted
|
||||
|
||||
KEY_BACKSP = 168,
|
||||
KEY_TAB = 169,
|
||||
KEY_CAPSLK = 170,
|
||||
KEY_ENTER = 171,
|
||||
KEY_LSHIFT = 172,
|
||||
KEY_RSHIFT = 173,
|
||||
KEY_LCTRL = 174,
|
||||
KEY_RCTRL = 175,
|
||||
KEY_LALT = 176,
|
||||
KEY_RALT = 177,
|
||||
|
||||
KEY_NULL, // unused
|
||||
KEY_NUMKEYS
|
||||
};
|
||||
*/
|
||||
|
||||
enum {
|
||||
PLAYERCONTROL_ENABLED = 0,
|
||||
PLAYERCONTROL_DISABLED_1 = 1,
|
||||
|
@ -302,6 +251,29 @@ public:
|
|||
bool GetLeftMouseJustDown() { return !!(NewMouseControllerState.LMB && !OldMouseControllerState.LMB); }
|
||||
bool GetRightMouseJustDown() { return !!(NewMouseControllerState.RMB && !OldMouseControllerState.RMB); }
|
||||
bool GetMiddleMouseJustDown() { return !!(NewMouseControllerState.MMB && !OldMouseControllerState.MMB); }
|
||||
bool GetMouseWheelUpJustDown() { return !!(NewMouseControllerState.WHEELUP && !OldMouseControllerState.WHEELUP); }
|
||||
bool GetMouseWheelDownJustDown() { return !!(NewMouseControllerState.WHEELDN && !OldMouseControllerState.WHEELDN);}
|
||||
bool GetMouseX1JustDown() { return !!(NewMouseControllerState.MXB1 && !OldMouseControllerState.MXB1); }
|
||||
bool GetMouseX2JustDown() { return !!(NewMouseControllerState.MXB2 && !OldMouseControllerState.MXB2); }
|
||||
|
||||
|
||||
bool GetLeftMouse() { return NewMouseControllerState.LMB; }
|
||||
bool GetRightMouse() { return NewMouseControllerState.RMB; }
|
||||
bool GetMiddleMouse() { return NewMouseControllerState.MMB; }
|
||||
bool GetMouseWheelUp() { return NewMouseControllerState.WHEELUP; }
|
||||
bool GetMouseWheelDown() { return NewMouseControllerState.WHEELDN; }
|
||||
bool GetMouseX1() { return NewMouseControllerState.MXB1; }
|
||||
bool GetMouseX2() { return NewMouseControllerState.MXB2; }
|
||||
|
||||
bool GetLeftMouseUp() { return !OldMouseControllerState.LMB; }
|
||||
bool GetRightMouseUp() { return !OldMouseControllerState.RMB; }
|
||||
bool GetMiddleMouseUp() { return !OldMouseControllerState.MMB; }
|
||||
bool GetMouseWheelUpUp() { return !OldMouseControllerState.WHEELUP; }
|
||||
bool GetMouseWheelDownUp() { return !OldMouseControllerState.WHEELDN; }
|
||||
bool GetMouseX1Up() { return !OldMouseControllerState.MXB1; }
|
||||
bool GetMouseX2Up() { return !OldMouseControllerState.MXB2; }
|
||||
|
||||
|
||||
float GetMouseX() { return NewMouseControllerState.x; }
|
||||
float GetMouseY() { return NewMouseControllerState.y; }
|
||||
|
||||
|
@ -354,6 +326,52 @@ public:
|
|||
bool GetRightWinJustDown() { return !!(NewKeyState.RWIN && !OldKeyState.RWIN); }
|
||||
bool GetAppsJustDown() { return !!(NewKeyState.APPS && !OldKeyState.APPS); }
|
||||
|
||||
bool GetChar(int32 c) { return NewKeyState.VK_KEYS[c]; }
|
||||
bool GetF(int32 n) { return NewKeyState.F[n]; }
|
||||
bool GetEscape() { return NewKeyState.ESC; }
|
||||
bool GetInsert() { return NewKeyState.INS; }
|
||||
bool GetDelete() { return NewKeyState.DEL; }
|
||||
bool GetHome() { return NewKeyState.HOME; }
|
||||
bool GetEnd() { return NewKeyState.END; }
|
||||
bool GetPageUp() { return NewKeyState.PGUP; }
|
||||
bool GetPageDown() { return NewKeyState.PGDN; }
|
||||
bool GetUp() { return NewKeyState.UP; }
|
||||
bool GetDown() { return NewKeyState.DOWN; }
|
||||
bool GetLeft() { return NewKeyState.LEFT; }
|
||||
bool GetRight() { return NewKeyState.RIGHT; }
|
||||
bool GetScrollLock() { return NewKeyState.SCROLLLOCK; }
|
||||
bool GetPause() { return NewKeyState.PAUSE; }
|
||||
bool GetNumLock() { return NewKeyState.NUMLOCK; }
|
||||
bool GetDivide() { return NewKeyState.DIV; }
|
||||
bool GetTimes() { return NewKeyState.MUL; }
|
||||
bool GetMinus() { return NewKeyState.SUB; }
|
||||
bool GetPlus() { return NewKeyState.ADD; }
|
||||
bool GetPadEnter() { return NewKeyState.ENTER; } // GetEnterJustDown
|
||||
bool GetPadDel() { return NewKeyState.DECIMAL; }
|
||||
bool GetPad1() { return NewKeyState.NUM1; }
|
||||
bool GetPad2() { return NewKeyState.NUM2; }
|
||||
bool GetPad3() { return NewKeyState.NUM3; }
|
||||
bool GetPad4() { return NewKeyState.NUM4; }
|
||||
bool GetPad5() { return NewKeyState.NUM5; }
|
||||
bool GetPad6() { return NewKeyState.NUM6; }
|
||||
bool GetPad7() { return NewKeyState.NUM7; }
|
||||
bool GetPad8() { return NewKeyState.NUM8; }
|
||||
bool GetPad9() { return NewKeyState.NUM9; }
|
||||
bool GetPad0() { return NewKeyState.NUM0; }
|
||||
bool GetBackspace() { return NewKeyState.BACKSP; }
|
||||
bool GetTab() { return NewKeyState.TAB; }
|
||||
bool GetCapsLock() { return NewKeyState.CAPSLOCK; }
|
||||
bool GetEnter() { return NewKeyState.EXTENTER; }
|
||||
bool GetLeftShift() { return NewKeyState.LSHIFT; }
|
||||
bool GetShift() { return NewKeyState.SHIFT; }
|
||||
bool GetRightShift() { return NewKeyState.RSHIFT; }
|
||||
bool GetLeftCtrl() { return NewKeyState.LCTRL; }
|
||||
bool GetRightCtrl() { return NewKeyState.RCTRL; }
|
||||
bool GetLeftAlt() { return NewKeyState.LALT; }
|
||||
bool GetRightAlt() { return NewKeyState.RALT; }
|
||||
bool GetLeftWin() { return NewKeyState.LWIN; }
|
||||
bool GetRightWin() { return NewKeyState.RWIN; }
|
||||
bool GetApps() { return NewKeyState.APPS; }
|
||||
// pad
|
||||
|
||||
bool GetTriangleJustDown() { return !!(NewState.Triangle && !OldState.Triangle); }
|
||||
|
@ -370,13 +388,6 @@ public:
|
|||
bool GetRightShoulder2JustDown() { return !!(NewState.RightShoulder2 && !OldState.RightShoulder2); }
|
||||
bool GetStartJustDown() { return !!(NewState.Start && !OldState.Start); }
|
||||
|
||||
/*
|
||||
int32 GetLeftShoulder1(void) { return NewState.LeftShoulder1; }
|
||||
int32 GetLeftShoulder2(void) { return NewState.LeftShoulder2; }
|
||||
int32 GetRightShoulder1(void) { return NewState.RightShoulder1; }
|
||||
int32 GetRightShoulder2(void) { return NewState.RightShoulder2; }
|
||||
*/
|
||||
|
||||
bool GetTriangle() { return !!NewState.Triangle; }
|
||||
bool GetCircle() { return !!NewState.Circle; }
|
||||
bool GetCross() { return !!NewState.Cross; }
|
||||
|
@ -392,8 +403,6 @@ public:
|
|||
|
||||
bool ArePlayerControlsDisabled(void) { return DisablePlayerControls != PLAYERCONTROL_ENABLED; }
|
||||
};
|
||||
|
||||
VALIDATE_SIZE(CPad, 0xFC);
|
||||
extern CPad *Pads; //[2]
|
||||
|
||||
#define IsButtonJustDown(pad, btn) \
|
||||
(!(pad)->OldState.btn && (pad)->NewState.btn)
|
||||
|
|
|
@ -275,7 +275,7 @@ void CRadar::DrawBlips()
|
|||
TransformRadarPointToScreenSpace(out, in);
|
||||
|
||||
float angle;
|
||||
if (TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOPDOWN1)
|
||||
if (TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOPDOWN)
|
||||
angle = PI + FindPlayerHeading();
|
||||
#ifdef FIX_BUGS
|
||||
else if (TheCamera.GetLookDirection() != LOOKING_FORWARD)
|
||||
|
@ -1081,14 +1081,14 @@ void CRadar::TransformRadarPointToRealWorldSpace(CVector2D &out, const CVector2D
|
|||
s = -Sin(TheCamera.GetForward().Heading());
|
||||
c = Cos(TheCamera.GetForward().Heading());
|
||||
|
||||
if (TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOPDOWN1 || TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOPDOWNPED) {
|
||||
if (TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOPDOWN || TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOP_DOWN_PED) {
|
||||
s = 0.0f;
|
||||
c = 1.0f;
|
||||
}
|
||||
else if (TheCamera.GetLookDirection() != LOOKING_FORWARD) {
|
||||
CVector forward;
|
||||
|
||||
if (TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_FIRSTPERSON) {
|
||||
if (TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_1STPERSON) {
|
||||
forward = TheCamera.Cams[TheCamera.ActiveCam].CamTargetEntity->GetForward();
|
||||
forward.Normalise(); // a bit useless...
|
||||
}
|
||||
|
@ -1120,7 +1120,7 @@ WRAPPER void CRadar::TransformRealWorldPointToRadarSpace(CVector2D &out, const C
|
|||
void CRadar::TransformRealWorldPointToRadarSpace(CVector2D &out, const CVector2D &in)
|
||||
{
|
||||
float s, c;
|
||||
if (TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOPDOWN1 || TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOPDOWNPED) {
|
||||
if (TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOPDOWN || TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOP_DOWN_PED) {
|
||||
s = 0.0f;
|
||||
c = 1.0f;
|
||||
}
|
||||
|
@ -1131,7 +1131,7 @@ void CRadar::TransformRealWorldPointToRadarSpace(CVector2D &out, const CVector2D
|
|||
else {
|
||||
CVector forward;
|
||||
|
||||
if (TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_FIRSTPERSON) {
|
||||
if (TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_1STPERSON) {
|
||||
forward = TheCamera.Cams[TheCamera.ActiveCam].CamTargetEntity->GetForward();
|
||||
forward.Normalise(); // a bit useless...
|
||||
}
|
||||
|
|
|
@ -379,9 +379,9 @@ Render2dStuff(void)
|
|||
bool firstPersonWeapon = false;
|
||||
int cammode = TheCamera.Cams[TheCamera.ActiveCam].Mode;
|
||||
if(cammode == CCam::MODE_SNIPER ||
|
||||
cammode == CCam::MODE_SNIPER_RUN_AROUND ||
|
||||
cammode == CCam::MODE_ROCKET ||
|
||||
cammode == CCam::MODE_ROCKET_RUN_AROUND)
|
||||
cammode == CCam::MODE_SNIPER_RUNABOUT ||
|
||||
cammode == CCam::MODE_ROCKETLAUNCHER ||
|
||||
cammode == CCam::MODE_ROCKETLAUNCHER_RUNABOUT)
|
||||
firstPersonWeapon = true;
|
||||
|
||||
// Draw black border for sniper and rocket launcher
|
||||
|
|
|
@ -249,7 +249,15 @@ public:
|
|||
CMatrix &Invert(const CMatrix &src, CMatrix &dst);
|
||||
CVector operator*(const CMatrix &mat, const CVector &vec);
|
||||
CMatrix operator*(const CMatrix &m1, const CMatrix &m2);
|
||||
CVector MultiplyInverse(const CMatrix &mat, const CVector &vec);
|
||||
inline CVector MultiplyInverse(const CMatrix &mat, const CVector &vec)
|
||||
{
|
||||
CVector v(vec.x - mat.m_matrix.pos.x, vec.y - mat.m_matrix.pos.y, vec.z - mat.m_matrix.pos.z);
|
||||
return CVector(
|
||||
mat.m_matrix.right.x * v.x + mat.m_matrix.right.y * v.y + mat.m_matrix.right.z * v.z,
|
||||
mat.m_matrix.up.x * v.x + mat.m_matrix.up.y * v.y + mat.m_matrix.up.z * v.z,
|
||||
mat.m_matrix.at.x * v.x + mat.m_matrix.at.y * v.y + mat.m_matrix.at.z * v.z);
|
||||
}
|
||||
|
||||
const CVector Multiply3x3(const CMatrix &mat, const CVector &vec);
|
||||
const CVector Multiply3x3(const CVector &vec, const CMatrix &mat);
|
||||
|
||||
|
|
|
@ -126,16 +126,6 @@ operator*(const CMatrix &m1, const CMatrix &m2)
|
|||
return out;
|
||||
}
|
||||
|
||||
CVector
|
||||
MultiplyInverse(const CMatrix &mat, const CVector &vec)
|
||||
{
|
||||
CVector v(vec.x - mat.m_matrix.pos.x, vec.y - mat.m_matrix.pos.y, vec.z - mat.m_matrix.pos.z);
|
||||
return CVector(
|
||||
mat.m_matrix.right.x * v.x + mat.m_matrix.right.y * v.y + mat.m_matrix.right.z * v.z,
|
||||
mat.m_matrix.up.x * v.x + mat.m_matrix.up.y * v.y + mat.m_matrix.up.z * v.z,
|
||||
mat.m_matrix.at.x * v.x + mat.m_matrix.at.y * v.y + mat.m_matrix.at.z * v.z);
|
||||
}
|
||||
|
||||
const CVector
|
||||
Multiply3x3(const CMatrix &mat, const CVector &vec)
|
||||
{
|
||||
|
|
|
@ -26,6 +26,12 @@ MatchModelString(const char *modelname, int16 id)
|
|||
#undef X
|
||||
}
|
||||
|
||||
void
|
||||
TestModelIndices(void)
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
STARTPATCHES
|
||||
InjectHook(0x48EB60, InitModelIndices, PATCH_JUMP);
|
||||
InjectHook(0x48F030, MatchModelString, PATCH_JUMP);
|
||||
|
|
|
@ -365,6 +365,7 @@ enum{
|
|||
|
||||
void InitModelIndices(void);
|
||||
void MatchModelString(const char *name, int16 id);
|
||||
void TestModelIndices(void);
|
||||
|
||||
inline bool
|
||||
IsGlass(int16 id)
|
||||
|
@ -462,7 +463,6 @@ IsPickupModel(int16 id)
|
|||
id == MI_UZI ||
|
||||
id == MI_M16 ||
|
||||
id == MI_FLAMETHROWER ||
|
||||
id >= MI_M16 && id <= MI_FLAMETHROWER ||
|
||||
id == MI_PICKUP_ADRENALINE ||
|
||||
id == MI_PICKUP_BODYARMOUR ||
|
||||
id == MI_PICKUP_INFO ||
|
||||
|
|
201
src/peds/Ped.cpp
201
src/peds/Ped.cpp
|
@ -56,12 +56,13 @@ WRAPPER void CPed::StartFightDefend(uint8, uint8, uint8) { EAXJMP(0x4E7780); }
|
|||
WRAPPER void CPed::ServiceTalking(void) { EAXJMP(0x4E5870); }
|
||||
WRAPPER void CPed::UpdatePosition(void) { EAXJMP(0x4C7A00); }
|
||||
WRAPPER void CPed::WanderPath(void) { EAXJMP(0x4D28D0); }
|
||||
WRAPPER void CPed::SeekCar(void) { EAXJMP(0x4D3F90); }
|
||||
WRAPPER void CPed::UpdateFromLeader(void) { EAXJMP(0x4D8F30); }
|
||||
WRAPPER void CPed::SetEnterCar_AllClear(CVehicle*, uint32, uint32) { EAXJMP(0x4E0A40); }
|
||||
WRAPPER bool CPed::WarpPedToNearEntityOffScreen(CEntity*) { EAXJMP(0x4E5570); }
|
||||
WRAPPER void CPed::SetObjective(eObjective, CVector) { EAXJMP(0x4D8A90); }
|
||||
WRAPPER void CPed::SetObjective(eObjective, CVector, float) { EAXJMP(0x4D8770); }
|
||||
WRAPPER void CPed::WarpPedIntoCar(CVehicle*) { EAXJMP(0x4D7D20); }
|
||||
WRAPPER void CPed::SetCarJack(CVehicle*) { EAXJMP(0x4E0220); }
|
||||
|
||||
#define FEET_OFFSET 1.04f
|
||||
|
||||
|
@ -469,9 +470,9 @@ CPed::CPed(uint32 pedType) : m_pedIK(this)
|
|||
bIsLanding = false;
|
||||
bIsRunning = false;
|
||||
bHitSomethingLastFrame = false;
|
||||
m_ped_flagB80 = false;
|
||||
bVehEnterDoorIsBlocked = false;
|
||||
|
||||
m_ped_flagC1 = false;
|
||||
bCanPedEnterSeekedCar = false;
|
||||
bRespondsToThreats = true;
|
||||
bRenderPedInCar = true;
|
||||
bChangedSeat = false;
|
||||
|
@ -4645,10 +4646,10 @@ CPed::SetAttack(CEntity *victim)
|
|||
CPad::GetPad(0)->ResetAverageWeapon();
|
||||
|
||||
if ((curWeapon->m_eWeaponFire == WEAPON_FIRE_INSTANT_HIT || GetWeapon()->m_eWeaponType == WEAPONTYPE_FLAMETHROWER)
|
||||
&& TheCamera.PlayerWeaponMode.Mode != CCam::MODE_M16FIRSTPERSON_34
|
||||
&& TheCamera.PlayerWeaponMode.Mode != CCam::MODE_FIRSTPERSONPEDONPC_41
|
||||
&& TheCamera.PlayerWeaponMode.Mode != CCam::MODE_M16_1STPERSON
|
||||
&& TheCamera.PlayerWeaponMode.Mode != CCam::MODE_M16_1STPERSON_RUNABOUT
|
||||
&& TheCamera.PlayerWeaponMode.Mode != CCam::MODE_SNIPER
|
||||
&& TheCamera.PlayerWeaponMode.Mode != CCam::MODE_SNIPER_RUN_AROUND
|
||||
&& TheCamera.PlayerWeaponMode.Mode != CCam::MODE_SNIPER_RUNABOUT
|
||||
&& CheckForPointBlankPeds(victimPed) != 0) {
|
||||
ClearAimFlag();
|
||||
|
||||
|
@ -8569,11 +8570,15 @@ CPed::KillPedWithCar(CVehicle *car, float impulse)
|
|||
Say(SOUND_PED_DEFEND);
|
||||
}
|
||||
|
||||
#if defined FIX_BUGS || defined VC_PED_PORTS
|
||||
#ifdef VC_PED_PORTS
|
||||
// Killing gang members with car wasn't triggering a fight, until now... Taken from VC.
|
||||
if (IsGangMember()) {
|
||||
CPed *driver = car->pDriver;
|
||||
if (driver && driver->IsPlayer()) {
|
||||
if (driver && driver->IsPlayer()
|
||||
#ifdef FIX_BUGS
|
||||
&& (CharCreatedBy != MISSION_CHAR || bRespondsToThreats) && (!m_leader || m_leader != driver)
|
||||
#endif
|
||||
) {
|
||||
RegisterThreatWithGangPeds(driver);
|
||||
}
|
||||
}
|
||||
|
@ -9186,10 +9191,10 @@ CPed::ProcessControl(void)
|
|||
if (!nearPed->bIsLooking && nearPed->m_nPedState != PED_ATTACK) {
|
||||
int16 camMode = TheCamera.Cams[TheCamera.ActiveCam].Mode;
|
||||
if (camMode != CCam::MODE_SNIPER
|
||||
&& camMode != CCam::MODE_ROCKET
|
||||
&& camMode != CCam::MODE_M16FIRSTPERSON_34
|
||||
&& camMode != CCam::MODE_FIRSTPERSON
|
||||
&& camMode != CCam::MODE_M16FIRSTPERSON_44
|
||||
&& camMode != CCam::MODE_ROCKETLAUNCHER
|
||||
&& camMode != CCam::MODE_M16_1STPERSON
|
||||
&& camMode != CCam::MODE_1STPERSON
|
||||
&& camMode != CCam::MODE_HELICANNON_1STPERSON
|
||||
&& !TheCamera.Cams[TheCamera.ActiveCam].GetWeaponFirstPersonOn()) {
|
||||
|
||||
nearPed->SetLookFlag(this, true);
|
||||
|
@ -9509,7 +9514,7 @@ CPed::ProcessControl(void)
|
|||
|| m_objective == OBJECTIVE_ENTER_CAR_AS_DRIVER)) {
|
||||
|
||||
if (collidingVeh != m_pCurrentPhysSurface || IsPlayer()) {
|
||||
if (!m_ped_flagB80) {
|
||||
if (!bVehEnterDoorIsBlocked) {
|
||||
if (collidingVeh->m_status != STATUS_PLAYER || CharCreatedBy == MISSION_CHAR) {
|
||||
|
||||
// VC calls SetDirectionToWalkAroundVehicle instead if ped is in PED_SEEK_CAR.
|
||||
|
@ -9695,7 +9700,7 @@ CPed::ProcessControl(void)
|
|||
}
|
||||
}
|
||||
|
||||
} else if (!m_ped_flagB80) {
|
||||
} else if (!bVehEnterDoorIsBlocked) {
|
||||
if (collidingVeh->m_status != STATUS_PLAYER || CharCreatedBy == MISSION_CHAR) {
|
||||
|
||||
SetDirectionToWalkAroundObject(collidingVeh);
|
||||
|
@ -10328,7 +10333,7 @@ CPed::ProcessControl(void)
|
|||
lbAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_CAR_LB);
|
||||
|
||||
if (lbAssoc &&
|
||||
TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_FIRSTPERSON
|
||||
TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_1STPERSON
|
||||
&& TheCamera.Cams[TheCamera.ActiveCam].DirectionWasLooking == LOOKING_LEFT) {
|
||||
lbAssoc->blendDelta = -1000.0f;
|
||||
}
|
||||
|
@ -10373,7 +10378,7 @@ CPed::ProcessControl(void)
|
|||
lbAssoc->blendDelta = -4.0f;
|
||||
} else {
|
||||
|
||||
if ((TheCamera.Cams[TheCamera.ActiveCam].Mode != CCam::MODE_FIRSTPERSON
|
||||
if ((TheCamera.Cams[TheCamera.ActiveCam].Mode != CCam::MODE_1STPERSON
|
||||
|| TheCamera.Cams[TheCamera.ActiveCam].DirectionWasLooking != LOOKING_LEFT)
|
||||
&& (!lbAssoc || lbAssoc->blendAmount < 1.0f)) {
|
||||
CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_LB, 4.0f);
|
||||
|
@ -12161,7 +12166,7 @@ CPed::PossiblyFindBetterPosToSeekCar(CVector *pos, CVehicle *veh)
|
|||
|
||||
// ?!? I think it's absurd to use this unless another function like SeekCar finds next pos. with it and we're trying to simulate it's behaviour.
|
||||
// On every run it returns another pos. for ped, with same distance to the veh.
|
||||
// Sequence of positions are not guarenteed, it depends on global pos. (So sometimes it returns positions to make ped draw circle, sometimes don't)
|
||||
// Sequence of positions are not guaranteed, it depends on global pos. (So sometimes it returns positions to make ped draw circle, sometimes don't)
|
||||
helperPos = veh->GetMatrix() * helperPos;
|
||||
|
||||
float vehForwardHeading = veh->GetForward().Heading();
|
||||
|
@ -13027,7 +13032,7 @@ CPed::ProcessObjective(void)
|
|||
} else {
|
||||
SetSeekBoatPosition(m_carInObjective);
|
||||
}
|
||||
if (m_nMoveState == PEDMOVE_STILL && !m_ped_flagB80)
|
||||
if (m_nMoveState == PEDMOVE_STILL && !bVehEnterDoorIsBlocked)
|
||||
SetMoveState(PEDMOVE_RUN);
|
||||
|
||||
if (m_carInObjective && m_carInObjective->m_fHealth > 0.0f) {
|
||||
|
@ -15574,6 +15579,165 @@ CPed::ScanForThreats(void)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
CPed::SeekCar(void)
|
||||
{
|
||||
CVehicle *vehToSeek = m_carInObjective;
|
||||
CVector dest(0.0f, 0.0f, 0.0f);
|
||||
if (!vehToSeek) {
|
||||
RestorePreviousState();
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_objective != OBJECTIVE_ENTER_CAR_AS_PASSENGER) {
|
||||
if (m_vehEnterType && m_objective != OBJECTIVE_ENTER_CAR_AS_DRIVER) {
|
||||
if (IsRoomToBeCarJacked()) {
|
||||
dest = GetPositionToOpenCarDoor(vehToSeek, m_vehEnterType);
|
||||
} else if (m_nPedType == PEDTYPE_COP) {
|
||||
dest = GetPositionToOpenCarDoor(vehToSeek, CAR_DOOR_RF);
|
||||
} else {
|
||||
SetMoveState(PEDMOVE_STILL);
|
||||
}
|
||||
} else
|
||||
GetNearestDoor(vehToSeek, dest);
|
||||
} else {
|
||||
if (m_hitRecoverTimer > CTimer::GetTimeInMilliseconds()) {
|
||||
SetMoveState(PEDMOVE_STILL);
|
||||
return;
|
||||
}
|
||||
if (vehToSeek->m_modelIndex == MI_COACH) {
|
||||
GetNearestDoor(vehToSeek, dest);
|
||||
} else {
|
||||
if (vehToSeek->IsTrain()) {
|
||||
if (vehToSeek->m_status != STATUS_TRAIN_NOT_MOVING) {
|
||||
RestorePreviousObjective();
|
||||
RestorePreviousState();
|
||||
return;
|
||||
}
|
||||
if (!GetNearestTrainDoor(vehToSeek, dest)) {
|
||||
RestorePreviousObjective();
|
||||
RestorePreviousState();
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (!GetNearestPassengerDoor(vehToSeek, dest)) {
|
||||
if (vehToSeek->m_nNumPassengers == vehToSeek->m_nNumMaxPassengers) {
|
||||
RestorePreviousObjective();
|
||||
RestorePreviousState();
|
||||
} else {
|
||||
SetMoveState(PEDMOVE_STILL);
|
||||
}
|
||||
bVehEnterDoorIsBlocked = true;
|
||||
return;
|
||||
}
|
||||
bVehEnterDoorIsBlocked = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (dest.x == 0.0f && dest.y == 0.0f) {
|
||||
if ((!IsPlayer() && CharCreatedBy != MISSION_CHAR) || vehToSeek->VehicleCreatedBy != MISSION_VEHICLE || vehToSeek->pDriver) {
|
||||
RestorePreviousState();
|
||||
if (IsPlayer()) {
|
||||
ClearObjective();
|
||||
} else if (CharCreatedBy == RANDOM_CHAR) {
|
||||
m_hitRecoverTimer = CTimer::GetTimeInMilliseconds() + 30000;
|
||||
}
|
||||
SetMoveState(PEDMOVE_STILL);
|
||||
TheCamera.ClearPlayerWeaponMode();
|
||||
CCarCtrl::RemoveFromInterestingVehicleList(vehToSeek);
|
||||
return;
|
||||
}
|
||||
dest = vehToSeek->GetPosition();
|
||||
if (bCollidedWithMyVehicle) {
|
||||
WarpPedIntoCar(m_pMyVehicle);
|
||||
return;
|
||||
}
|
||||
}
|
||||
bool foundBetterPosToSeek = PossiblyFindBetterPosToSeekCar(&dest, vehToSeek);
|
||||
m_vecSeekPos = dest;
|
||||
float distToDest = (m_vecSeekPos - GetPosition()).MagnitudeSqr();
|
||||
#ifndef VC_PED_PORTS
|
||||
if (bIsRunning)
|
||||
SetMoveState(PEDMOVE_RUN);
|
||||
#else
|
||||
if (bIsRunning ||
|
||||
vehToSeek->pDriver && distToDest > 4.0f && (Abs(vehToSeek->m_vecMoveSpeed.x) > 0.01f || Abs(vehToSeek->m_vecMoveSpeed.y) > 0.01f))
|
||||
SetMoveState(PEDMOVE_RUN);
|
||||
#endif
|
||||
else if (distToDest < 4.0f)
|
||||
SetMoveState(PEDMOVE_WALK);
|
||||
|
||||
if (distToDest >= 1.0f)
|
||||
bCanPedEnterSeekedCar = false;
|
||||
else if (2.0f * vehToSeek->GetColModel()->boundingBox.max.x > distToDest)
|
||||
bCanPedEnterSeekedCar = true;
|
||||
|
||||
if (vehToSeek->m_nGettingInFlags & GetCarDoorFlag(m_vehEnterType))
|
||||
bVehEnterDoorIsBlocked = true;
|
||||
else
|
||||
bVehEnterDoorIsBlocked = false;
|
||||
|
||||
if (Seek()) {
|
||||
if (!foundBetterPosToSeek) {
|
||||
if (1.5f + GetPosition().z > dest.z && GetPosition().z - 0.5f < dest.z) {
|
||||
if (vehToSeek->IsTrain()) {
|
||||
SetEnterTrain(vehToSeek, m_vehEnterType);
|
||||
} else {
|
||||
m_fRotationCur = m_fRotationDest;
|
||||
if (!bVehEnterDoorIsBlocked) {
|
||||
vehToSeek->bIsStatic = false;
|
||||
if (m_objective == OBJECTIVE_SOLICIT) {
|
||||
SetSolicit(1000);
|
||||
} else if (m_objective == OBJECTIVE_BUY_ICE_CREAM) {
|
||||
SetBuyIceCream();
|
||||
} else if (vehToSeek->m_nNumGettingIn < vehToSeek->m_nNumMaxPassengers + 1
|
||||
&& vehToSeek->CanPedEnterCar()) {
|
||||
|
||||
switch (vehToSeek->m_status) {
|
||||
case STATUS_PLAYER:
|
||||
case STATUS_SIMPLE:
|
||||
case STATUS_PHYSICS:
|
||||
case STATUS_PLAYER_DISABLED:
|
||||
if (!vehToSeek->bIsBus && (!m_leader || m_leader != vehToSeek->pDriver) &&
|
||||
(m_vehEnterType == CAR_DOOR_LF && vehToSeek->pDriver || m_vehEnterType == CAR_DOOR_RF && vehToSeek->pPassengers[0] || m_vehEnterType == CAR_DOOR_LR && vehToSeek->pPassengers[1] || m_vehEnterType == CAR_DOOR_RR && vehToSeek->pPassengers[2])) {
|
||||
SetCarJack(vehToSeek);
|
||||
if (m_objective == OBJECTIVE_ENTER_CAR_AS_DRIVER && m_vehEnterType != CAR_DOOR_LF)
|
||||
vehToSeek->pDriver->bFleeAfterExitingCar = true;
|
||||
} else {
|
||||
SetEnterCar(vehToSeek, m_vehEnterType);
|
||||
}
|
||||
break;
|
||||
case STATUS_ABANDONED:
|
||||
if (m_vehEnterType == CAR_DOOR_RF && vehToSeek->pPassengers[0]) {
|
||||
if (vehToSeek->pPassengers[0]->m_ped_flagF4) {
|
||||
if (IsPlayer())
|
||||
CPed::SetEnterCar(vehToSeek, m_vehEnterType);
|
||||
} else {
|
||||
SetCarJack(vehToSeek);
|
||||
}
|
||||
} else {
|
||||
SetEnterCar(vehToSeek, m_vehEnterType);
|
||||
}
|
||||
break;
|
||||
case STATUS_WRECKED:
|
||||
SetIdle();
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
RestorePreviousState();
|
||||
}
|
||||
} else {
|
||||
SetMoveState(PEDMOVE_STILL);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class CPed_ : public CPed
|
||||
{
|
||||
public:
|
||||
|
@ -15791,4 +15955,5 @@ STARTPATCHES
|
|||
InjectHook(0x4E1010, &CPed::SetExitCar, PATCH_JUMP);
|
||||
InjectHook(0x4C5FE0, &CPed::ScanForThreats, PATCH_JUMP);
|
||||
InjectHook(0x4C6C10, &CPed::ScanForInterestingStuff, PATCH_JUMP);
|
||||
InjectHook(0x4D3F90, &CPed::SeekCar, PATCH_JUMP);
|
||||
ENDPATCHES
|
|
@ -294,9 +294,9 @@ public:
|
|||
uint8 bIsLanding : 1;
|
||||
uint8 bIsRunning : 1; // on some conditions
|
||||
uint8 bHitSomethingLastFrame : 1;
|
||||
uint8 m_ped_flagB80 : 1; // bIsNearCar? it's sure that it's related with cars and used for deciding whether we should move
|
||||
uint8 bVehEnterDoorIsBlocked : 1; // because someone else enters/exits from there
|
||||
|
||||
uint8 m_ped_flagC1 : 1; // bCanPedEnterSeekedCar?
|
||||
uint8 bCanPedEnterSeekedCar : 1;
|
||||
uint8 bRespondsToThreats : 1;
|
||||
uint8 bRenderPedInCar : 1;
|
||||
uint8 bChangedSeat : 1;
|
||||
|
@ -679,6 +679,8 @@ public:
|
|||
void SetEnterCar_AllClear(CVehicle*, uint32, uint32);
|
||||
void SetSolicit(uint32 time);
|
||||
void ScanForInterestingStuff(void);
|
||||
void WarpPedIntoCar(CVehicle*);
|
||||
void SetCarJack(CVehicle*);
|
||||
|
||||
// Static methods
|
||||
static CVector GetLocalPositionToOpenCarDoor(CVehicle *veh, uint32 component, float offset);
|
||||
|
|
|
@ -121,15 +121,15 @@ void CHud::Draw()
|
|||
int32 WeaponType = CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_weapons[CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_currentWeapon].m_eWeaponType;
|
||||
int32 Mode = TheCamera.Cams[TheCamera.ActiveCam].Mode;
|
||||
|
||||
if (Mode == CCam::MODE_SNIPER || Mode == CCam::MODE_ROCKET || Mode == CCam::MODE_M16FIRSTPERSON_34 || Mode == CCam::MODE_EDITOR)
|
||||
if (Mode == CCam::MODE_SNIPER || Mode == CCam::MODE_ROCKETLAUNCHER || Mode == CCam::MODE_M16_1STPERSON || Mode == CCam::MODE_EDITOR)
|
||||
Mode_FirstPerson = 1;
|
||||
if (Mode == CCam::MODE_FIRSTPERSONPEDONPC_41 || Mode == CCam::MODE_SNIPER_RUN_AROUND)
|
||||
if (Mode == CCam::MODE_M16_1STPERSON_RUNABOUT || Mode == CCam::MODE_SNIPER_RUNABOUT)
|
||||
Mode_RunAround = 1;
|
||||
|
||||
/*
|
||||
Draw Crosshairs
|
||||
*/
|
||||
if (TheCamera.Cams->Using3rdPersonMouseCam() && (!CPad::GetPad(0)->GetLookBehindForPed() || TheCamera.m_bPlayerIsInGarage) || Mode == CCam::MODE_FIRSTPERSONPEDONPC_40) {
|
||||
if (TheCamera.Cams->Using3rdPersonMouseCam() && (!CPad::GetPad(0)->GetLookBehindForPed() || TheCamera.m_bPlayerIsInGarage) || Mode == CCam::MODE_1STPERSON_RUNABOUT) {
|
||||
if (CWorld::Players[CWorld::PlayerInFocus].m_pPed) {
|
||||
int32 State = CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_nPedState;
|
||||
if (State != PED_ENTER_CAR && State != PED_CARJACK) {
|
||||
|
@ -180,8 +180,8 @@ void CHud::Draw()
|
|||
}
|
||||
}
|
||||
else {
|
||||
if (Mode == CCam::MODE_M16FIRSTPERSON_34 ||
|
||||
Mode == CCam::MODE_FIRSTPERSONPEDONPC_41 ||
|
||||
if (Mode == CCam::MODE_M16_1STPERSON ||
|
||||
Mode == CCam::MODE_M16_1STPERSON_RUNABOUT ||
|
||||
Mode == CCam::MODE_EDITOR) {
|
||||
rect.left = (SCREEN_WIDTH / 2) - SCREEN_SCALE_X(32.0f);
|
||||
rect.top = (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(32.0f);
|
||||
|
@ -189,7 +189,7 @@ void CHud::Draw()
|
|||
rect.bottom = (SCREEN_HEIGHT / 2) + SCREEN_SCALE_Y(32.0f);
|
||||
Sprites[HUD_SITEM16].Draw(CRect(rect), CRGBA(255, 255, 255, 255));
|
||||
}
|
||||
else if (Mode == CCam::MODE_ROCKET_RUN_AROUND) {
|
||||
else if (Mode == CCam::MODE_ROCKETLAUNCHER_RUNABOUT) {
|
||||
rect.left = (SCREEN_WIDTH / 2) - SCREEN_SCALE_X(32.0f * 0.7f);
|
||||
rect.top = (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(32.0f * 0.7f);
|
||||
rect.right = (SCREEN_WIDTH / 2) + SCREEN_SCALE_X(32.0f * 0.7f);
|
||||
|
@ -197,7 +197,7 @@ void CHud::Draw()
|
|||
|
||||
Sprites[HUD_SITEM16].Draw(CRect(rect), CRGBA(255, 255, 255, 255));
|
||||
}
|
||||
else if (Mode == CCam::MODE_ROCKET || Mode == CCam::MODE_SNIPER_RUN_AROUND) {
|
||||
else if (Mode == CCam::MODE_ROCKETLAUNCHER || Mode == CCam::MODE_SNIPER_RUNABOUT) {
|
||||
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void *)TRUE);
|
||||
RwRenderStateSet(rwRENDERSTATESRCBLEND, (void *)rwBLENDONE);
|
||||
RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void *)rwBLENDONE);
|
||||
|
|
|
@ -353,7 +353,7 @@ CRenderer::SetupEntityVisibility(CEntity *ent)
|
|||
}else{
|
||||
if(mi->m_type != MITYPE_SIMPLE){
|
||||
if(FindPlayerVehicle() == ent &&
|
||||
TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_FIRSTPERSON){
|
||||
TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_1STPERSON){
|
||||
// Player's vehicle in first person mode
|
||||
if(TheCamera.Cams[TheCamera.ActiveCam].DirectionWasLooking == LOOKING_FORWARD ||
|
||||
ent->GetModelIndex() == MI_RHINO ||
|
||||
|
@ -642,8 +642,8 @@ CRenderer::ScanWorld(void)
|
|||
RwV3dTransformPoints((RwV3d*)vectors, (RwV3d*)vectors, 9, cammatrix);
|
||||
|
||||
m_loadingPriority = false;
|
||||
if(TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOPDOWN1 ||
|
||||
TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOPDOWNPED){
|
||||
if(TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOPDOWN ||
|
||||
TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOP_DOWN_PED){
|
||||
CRect rect;
|
||||
int x1, x2, y1, y2;
|
||||
LimitFrustumVector(vectors[CORNER_FAR_TOPLEFT], vectors[CORNER_CAM], -100.0f);
|
||||
|
@ -753,8 +753,8 @@ CRenderer::RequestObjectsInFrustum(void)
|
|||
vectors[CORNER_PRIO_RIGHT].z = vectors[CORNER_LOD_RIGHT].z;
|
||||
RwV3dTransformPoints((RwV3d*)vectors, (RwV3d*)vectors, 9, cammatrix);
|
||||
|
||||
if(TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOPDOWN1 ||
|
||||
TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOPDOWNPED){
|
||||
if(TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOPDOWN ||
|
||||
TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOP_DOWN_PED){
|
||||
CRect rect;
|
||||
int x1, x2, y1, y2;
|
||||
LimitFrustumVector(vectors[CORNER_FAR_TOPLEFT], vectors[CORNER_CAM], -100.0f);
|
||||
|
|
|
@ -532,8 +532,8 @@ CShadows::StoreCarLightShadow(CAutomobile *pCar, int32 nID, RwTexture *pTexture,
|
|||
|
||||
float fDistToCamSqr = (*pPosn - TheCamera.GetPosition()).MagnitudeSqr2D();
|
||||
|
||||
bool bSpecialCam = TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOPDOWN1
|
||||
|| TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOPDOWNPED
|
||||
bool bSpecialCam = TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOPDOWN
|
||||
|| TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOP_DOWN_PED
|
||||
|| CCutsceneMgr::IsRunning();
|
||||
|
||||
float fDrawDistance = 27.0f;
|
||||
|
|
|
@ -44,7 +44,7 @@ CVisibilityPlugins::Initialise(void)
|
|||
m_alphaList.Init(20);
|
||||
m_alphaList.head.item.sort = 0.0f;
|
||||
m_alphaList.tail.item.sort = 100000000.0f;
|
||||
m_alphaEntityList.Init(150);
|
||||
m_alphaEntityList.Init(350); // TODO: set back to 150 when things are fixed
|
||||
m_alphaEntityList.head.item.sort = 0.0f;
|
||||
m_alphaEntityList.tail.item.sort = 100000000.0f;
|
||||
}
|
||||
|
@ -98,8 +98,8 @@ CVisibilityPlugins::SetRenderWareCamera(RwCamera *camera)
|
|||
ms_pCamera = camera;
|
||||
ms_pCameraPosn = RwMatrixGetPos(RwFrameGetMatrix(RwCameraGetFrame(camera)));
|
||||
|
||||
if(TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOPDOWN1 ||
|
||||
TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOPDOWNPED)
|
||||
if(TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOPDOWN ||
|
||||
TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOP_DOWN_PED)
|
||||
ms_cullCompsDist = 1000000.0f;
|
||||
else
|
||||
ms_cullCompsDist = sq(TheCamera.LODDistMultiplier * 20.0f);
|
||||
|
|
|
@ -180,6 +180,14 @@ enum RsKeyCodes
|
|||
rsAPPS = 1055,
|
||||
|
||||
rsNULL = 1056,
|
||||
|
||||
rsMOUSELEFTBUTTON = 1,
|
||||
rsMOUSMIDDLEBUTTON = 2,
|
||||
rsMOUSERIGHTBUTTON = 3,
|
||||
rsMOUSEWHEELUPBUTTON = 4,
|
||||
rsMOUSEWHEELDOWNBUTTON = 5,
|
||||
rsMOUSEX1BUTTON = 6,
|
||||
rsMOUSEX2BUTTON = 7,
|
||||
};
|
||||
typedef enum RsKeyCodes RsKeyCodes;
|
||||
|
||||
|
|
|
@ -115,38 +115,11 @@ DWORD _dwMemAvailVideo;
|
|||
DWORD &_dwOperatingSystemVersion = *(DWORD*)0x70F290;
|
||||
|
||||
RwUInt32 &gGameState = *(RwUInt32*)0x8F5838;
|
||||
|
||||
enum eJoypadState
|
||||
{
|
||||
JOYPAD_UNUSED,
|
||||
JOYPAD_ATTACHED,
|
||||
};
|
||||
|
||||
struct tJoy
|
||||
{
|
||||
eJoypadState m_State;
|
||||
bool m_bInitialised;
|
||||
bool m_bHasAxisZ;
|
||||
bool m_bHasAxisR;
|
||||
char _pad0;
|
||||
int32 m_nVendorID;
|
||||
int32 m_nProductID;
|
||||
};
|
||||
|
||||
class CJoySticks
|
||||
{
|
||||
public:
|
||||
tJoy m_aJoys[2];
|
||||
|
||||
CJoySticks();
|
||||
void ClearJoyInfo(int joyID);
|
||||
};
|
||||
|
||||
static CJoySticks AllValidWinJoys;
|
||||
CJoySticks AllValidWinJoys;
|
||||
|
||||
CJoySticks::CJoySticks()
|
||||
{
|
||||
for (int i = 0; i < _TODOCONST(2); i++)
|
||||
for (int i = 0; i < MAX_JOYSTICKS; i++)
|
||||
{
|
||||
ClearJoyInfo(i);
|
||||
}
|
||||
|
@ -154,7 +127,6 @@ CJoySticks::CJoySticks()
|
|||
|
||||
void CJoySticks::ClearJoyInfo(int joyID)
|
||||
{
|
||||
|
||||
m_aJoys[joyID].m_State = JOYPAD_UNUSED;
|
||||
m_aJoys[joyID].m_bInitialised = false;
|
||||
m_aJoys[joyID].m_bHasAxisZ = false;
|
||||
|
@ -641,14 +613,14 @@ psInitialise(void)
|
|||
|
||||
GetVersionEx(&verInfo);
|
||||
|
||||
_dwOperatingSystemVersion = 0;
|
||||
_dwOperatingSystemVersion = OS_WIN95;
|
||||
|
||||
if ( verInfo.dwPlatformId == VER_PLATFORM_WIN32_NT )
|
||||
{
|
||||
if ( verInfo.dwMajorVersion == 4 )
|
||||
{
|
||||
debug("Operating System is WinNT\n");
|
||||
_dwOperatingSystemVersion = oS_WINNT;
|
||||
_dwOperatingSystemVersion = OS_WINNT;
|
||||
}
|
||||
else if ( verInfo.dwMajorVersion == 5 )
|
||||
{
|
||||
|
@ -2337,12 +2309,12 @@ HRESULT CapturePad(RwInt32 padID)
|
|||
if( FAILED( hr = (*pPad)->GetDeviceState( sizeof(DIJOYSTATE2), &js ) ) )
|
||||
return hr; // The device should have been acquired during the Poll()
|
||||
|
||||
if ( ControlsManager.firstCapture == true )
|
||||
if ( ControlsManager.m_bFirstCapture == true )
|
||||
{
|
||||
memcpy(&ControlsManager.m_OldState, &js, sizeof(DIJOYSTATE2));
|
||||
memcpy(&ControlsManager.m_NewState, &js, sizeof(DIJOYSTATE2));
|
||||
|
||||
ControlsManager.firstCapture = false;
|
||||
ControlsManager.m_bFirstCapture = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -24,11 +24,13 @@ enum eWinVersion
|
|||
{
|
||||
OS_WIN95 = 0,
|
||||
OS_WIN98,
|
||||
oS_WINNT,
|
||||
OS_WINNT,
|
||||
OS_WIN2000,
|
||||
OS_WINXP,
|
||||
};
|
||||
|
||||
extern DWORD &_dwOperatingSystemVersion;
|
||||
|
||||
extern RwUInt32 &gGameState;
|
||||
|
||||
/* platform specfic global data */
|
||||
|
@ -50,6 +52,41 @@ psGlobalType;
|
|||
|
||||
#define PSGLOBAL(var) (((psGlobalType *)(RsGlobal.ps))->var)
|
||||
|
||||
enum eJoypads
|
||||
{
|
||||
JOYSTICK1 = 0,
|
||||
JOYSTICK2,
|
||||
MAX_JOYSTICKS
|
||||
};
|
||||
|
||||
enum eJoypadState
|
||||
{
|
||||
JOYPAD_UNUSED,
|
||||
JOYPAD_ATTACHED,
|
||||
};
|
||||
|
||||
struct tJoy
|
||||
{
|
||||
eJoypadState m_State;
|
||||
bool m_bInitialised;
|
||||
bool m_bHasAxisZ;
|
||||
bool m_bHasAxisR;
|
||||
char _pad0;
|
||||
int m_nVendorID;
|
||||
int m_nProductID;
|
||||
};
|
||||
|
||||
class CJoySticks
|
||||
{
|
||||
public:
|
||||
tJoy m_aJoys[MAX_JOYSTICKS];
|
||||
|
||||
CJoySticks();
|
||||
void ClearJoyInfo(int joyID);
|
||||
};
|
||||
|
||||
extern CJoySticks AllValidWinJoys;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
|
|
|
@ -442,7 +442,7 @@ CMessages::InsertPlayerControlKeysInString(wchar *str)
|
|||
for (i = 0; i < strSize;) {
|
||||
if (str[i] == '~' && str[i + 1] == 'k' && str[i + 2] == '~') {
|
||||
i += 4;
|
||||
for (int32 cont = 0; cont < TOTAL_CONTROL_ACTIONS; cont++) {
|
||||
for (int32 cont = 0; cont < MAX_CONTROLLERACTIONS; cont++) {
|
||||
uint16 contSize = GetWideStringLength(ControlsManager.m_aActionNames[cont]);
|
||||
if (contSize != 0) {
|
||||
if (WideStringCompare(&str[i], ControlsManager.m_aActionNames[cont], contSize)) {
|
||||
|
|
|
@ -2934,7 +2934,7 @@ CAutomobile::DoDriveByShootings(void)
|
|||
|
||||
bool lookingLeft = false;
|
||||
bool lookingRight = false;
|
||||
if(TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOPDOWN1){
|
||||
if(TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOPDOWN){
|
||||
if(CPad::GetPad(0)->GetLookLeft())
|
||||
lookingLeft = true;
|
||||
if(CPad::GetPad(0)->GetLookRight())
|
||||
|
@ -2956,7 +2956,7 @@ CAutomobile::DoDriveByShootings(void)
|
|||
CAnimManager::AddAnimation(pDriver->GetClump(), ASSOCGRP_STD, ANIM_DRIVEBY_L);
|
||||
else
|
||||
anim->SetRun();
|
||||
}else if(pDriver->m_pMyVehicle->pPassengers[0] == nil || TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_FIRSTPERSON){
|
||||
}else if(pDriver->m_pMyVehicle->pPassengers[0] == nil || TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_1STPERSON){
|
||||
anim = RpAnimBlendClumpGetAssociation(pDriver->GetClump(), ANIM_DRIVEBY_L);
|
||||
if(anim)
|
||||
anim->blendDelta = -1000.0f;
|
||||
|
|
Loading…
Reference in a new issue