Credits & fixes

This commit is contained in:
eray orçunus 2020-09-27 02:36:49 +03:00
parent 4cfc61da14
commit a5d6c952a7
15 changed files with 858 additions and 483 deletions

View File

@ -1869,6 +1869,13 @@ CPathFind::TakeWidthIntoAccountForWandering(CPathNode* nextNode, uint16 random)
return CVector(newX, newY, pos.z); return CVector(newX, newY, pos.z);
} }
void
CPathFind::TakeWidthIntoAccountForCoors(CPathNode* node1, CPathNode* node2, uint16 random, float* x, float* y)
{
*x += (Min(node1->width, node2->width) * ((random % 16) - 7));
*y += (Min(node1->width, node2->width) * (((random / 16) % 16) - 7));
}
CPathNode* CPathNode*
CPathFind::GetNode(int16 index) CPathFind::GetNode(int16 index)
{ {

View File

@ -255,6 +255,7 @@ public:
void Load(uint8 *buf, uint32 size); void Load(uint8 *buf, uint32 size);
static CVector TakeWidthIntoAccountForWandering(CPathNode*, uint16); static CVector TakeWidthIntoAccountForWandering(CPathNode*, uint16);
static void TakeWidthIntoAccountForCoors(CPathNode*, CPathNode*, uint16, float*, float*);
CPathNode *GetNode(int16 index); CPathNode *GetNode(int16 index);
int16 GetIndex(CPathNode *node); int16 GetIndex(CPathNode *node);

View File

@ -92,9 +92,15 @@ CRoadBlocks::GenerateRoadBlockCopsForCar(CVehicle* pVehicle, int32 roadBlockType
pCopPed->SetIdle(); pCopPed->SetIdle();
pCopPed->bKindaStayInSamePlace = true; pCopPed->bKindaStayInSamePlace = true;
pCopPed->bNotAllowedToDuck = false; pCopPed->bNotAllowedToDuck = false;
pCopPed->bCrouchWhenShooting = roadBlockType != 2; pCopPed->m_nExtendedRangeTimer = CTimer::GetTimeInMilliseconds() + 10000;
pCopPed->m_nRoadblockVeh = pVehicle;
pCopPed->m_nRoadblockVeh->RegisterReference((CEntity**)&pCopPed->m_nRoadblockVeh);
pCopPed->bCrouchWhenShooting = roadBlockType == 2 ? false : true;
if (pEntityToAttack) { if (pEntityToAttack) {
if (pCopPed->m_pPointGunAt)
pCopPed->m_pPointGunAt->CleanUpOldReference(&pCopPed->m_pPointGunAt);
pCopPed->m_pPointGunAt = pEntityToAttack; pCopPed->m_pPointGunAt = pEntityToAttack;
if (pEntityToAttack)
pEntityToAttack->RegisterReference(&pCopPed->m_pPointGunAt); pEntityToAttack->RegisterReference(&pCopPed->m_pPointGunAt);
pCopPed->SetAttack(pEntityToAttack); pCopPed->SetAttack(pEntityToAttack);
} }

View File

@ -812,7 +812,7 @@ CMenuManager::DoSettingsBeforeStartingAGame()
} }
void void
CMenuManager::DrawStandardMenus(bool drawCurrScreen) CMenuManager::DrawStandardMenus(bool activeScreen)
{ {
float nextYToUse = 0.0f; // III leftover, set but unused in VC float nextYToUse = 0.0f; // III leftover, set but unused in VC
#ifdef PS2_LIKE_MENU #ifdef PS2_LIKE_MENU
@ -1182,7 +1182,7 @@ CMenuManager::DrawStandardMenus(bool drawCurrScreen)
} }
// Highlight trapezoid // Highlight trapezoid
if (drawCurrScreen && i == m_nCurrOption && itemsAreSelectable && section == 0) { if (activeScreen && i == m_nCurrOption && itemsAreSelectable && section == 0) {
int leftXMax, rightXMin; int leftXMax, rightXMin;
@ -2460,16 +2460,16 @@ CMenuManager::DrawBackground(bool transitionCall)
m_nMenuFadeAlpha = 255 - m_nMenuFadeAlpha; m_nMenuFadeAlpha = 255 - m_nMenuFadeAlpha;
switch (m_nCurrScreen) { switch (m_nCurrScreen) {
case MENUPAGE_SKIN_SELECT: case MENUPAGE_SKIN_SELECT:
CMenuManager::DrawPlayerSetupScreen(); DrawPlayerSetupScreen(false);
break; break;
case MENUPAGE_KEYBOARD_CONTROLS: case MENUPAGE_KEYBOARD_CONTROLS:
CMenuManager::DrawControllerSetupScreen(); DrawControllerSetupScreen();
break; break;
case MENUPAGE_OUTRO: case MENUPAGE_OUTRO:
CMenuManager::DrawQuitGameScreen(); DrawQuitGameScreen();
break; break;
default: default:
CMenuManager::DrawStandardMenus(false); DrawStandardMenus(false);
break; break;
} }
m_nCurrScreen = actualScreen; m_nCurrScreen = actualScreen;
@ -2479,7 +2479,7 @@ CMenuManager::DrawBackground(bool transitionCall)
switch (m_nCurrScreen) { switch (m_nCurrScreen) {
case MENUPAGE_SKIN_SELECT: case MENUPAGE_SKIN_SELECT:
DrawPlayerSetupScreen(); DrawPlayerSetupScreen(true);
break; break;
case MENUPAGE_KEYBOARD_CONTROLS: case MENUPAGE_KEYBOARD_CONTROLS:
DrawControllerSetupScreen(); DrawControllerSetupScreen();
@ -2530,7 +2530,7 @@ CMenuManager::DrawBackground(bool transitionCall)
#endif #endif
void void
CMenuManager::DrawPlayerSetupScreen() CMenuManager::DrawPlayerSetupScreen(bool activeScreen)
{ {
CFont::SetBackgroundOff(); CFont::SetBackgroundOff();
CFont::SetScale(MENU_X(MENUACTION_SCALE_MULT), MENU_Y(MENUACTION_SCALE_MULT)); CFont::SetScale(MENU_X(MENUACTION_SCALE_MULT), MENU_Y(MENUACTION_SCALE_MULT));
@ -2807,6 +2807,7 @@ CMenuManager::DrawPlayerSetupScreen()
#endif #endif
} }
if (activeScreen)
CPlayerSkin::RenderFrontendSkinEdit(); CPlayerSkin::RenderFrontendSkinEdit();
// Big apply button // Big apply button
@ -4112,6 +4113,9 @@ CMenuManager::ProcessButtonPresses(uint8 goDown, uint8 goUp, uint8 optionSelecte
int oldOption = m_nCurrOption; int oldOption = m_nCurrOption;
if (goDown) { if (goDown) {
if (m_nCurrScreen != MENUPAGE_MAP)
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
m_nCurrOption++; m_nCurrOption++;
if (m_nCurrOption == NUM_MENUROWS || (aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action == MENUACTION_NOTHING)) { if (m_nCurrOption == NUM_MENUROWS || (aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action == MENUACTION_NOTHING)) {
m_nCurrOption = 0; m_nCurrOption = 0;
@ -4120,6 +4124,9 @@ CMenuManager::ProcessButtonPresses(uint8 goDown, uint8 goUp, uint8 optionSelecte
m_nOptionHighlightTransitionBlend = 0; m_nOptionHighlightTransitionBlend = 0;
} }
if (goUp) { if (goUp) {
if (m_nCurrScreen != MENUPAGE_MAP)
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
if (m_nCurrOption == (aScreens[m_nCurrScreen].m_aEntries[0].m_Action == MENUACTION_LABEL)) { if (m_nCurrOption == (aScreens[m_nCurrScreen].m_aEntries[0].m_Action == MENUACTION_LABEL)) {
while (m_nCurrOption != NUM_MENUROWS - 1 while (m_nCurrOption != NUM_MENUROWS - 1
&& aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption + 1].m_Action != MENUACTION_NOTHING) { && aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption + 1].m_Action != MENUACTION_NOTHING) {

View File

@ -663,7 +663,7 @@ public:
void DrawQuitGameScreen(); void DrawQuitGameScreen();
void DrawFrontEnd(); void DrawFrontEnd();
void DrawBackground(bool transitionCall); void DrawBackground(bool transitionCall);
void DrawPlayerSetupScreen(); void DrawPlayerSetupScreen(bool);
int FadeIn(int alpha); int FadeIn(int alpha);
void FilterOutColorMarkersFromString(wchar*); void FilterOutColorMarkersFromString(wchar*);
int GetStartOptionsCntrlConfigScreens(); int GetStartOptionsCntrlConfigScreens();

View File

@ -3105,10 +3105,11 @@ void CPad::PrintErrorMessage(void)
{ {
if ( bDisplayNoControllerMessage && !CGame::playingIntro && !FrontEndMenuManager.m_bMenuActive ) if ( bDisplayNoControllerMessage && !CGame::playingIntro && !FrontEndMenuManager.m_bMenuActive )
{ {
CFont::SetScale(0.85f, 1.0f); CSprite2d::DrawRect(CRect(SCREEN_STRETCH_X(20.0f), SCREEN_SCALE_FROM_BOTTOM(130.0f), SCREEN_STRETCH_FROM_RIGHT(20.0f), SCREEN_SCALE_Y(140.0f)), CRGBA(50, 50, 50, 210));
CFont::SetScale(SCREEN_SCALE_X(0.85f), SCREEN_SCALE_Y(1.0f));
CFont::SetJustifyOff(); CFont::SetJustifyOff();
CFont::SetBackgroundOff(); CFont::SetBackgroundOff();
CFont::SetCentreSize(SCREEN_WIDTH - 20); CFont::SetCentreSize(SCREEN_STRETCH_FROM_RIGHT(50.0f));
CFont::SetCentreOn(); CFont::SetCentreOn();
CFont::SetPropOn(); CFont::SetPropOn();
CFont::SetColor(CRGBA(255, 255, 200, 200)); CFont::SetColor(CRGBA(255, 255, 200, 200));
@ -3116,16 +3117,17 @@ void CPad::PrintErrorMessage(void)
CFont::PrintString CFont::PrintString
( (
SCREEN_WIDTH / 2, SCREEN_WIDTH / 2,
SCREEN_HEIGHT / 2, SCREEN_HEIGHT / 2 - SCREEN_SCALE_Y(40.0f),
TheText.Get("NOCONT") // Please reconnect an analog controller (DUALSHOCK@) or analog controller (DUALSHOCK@2). to controller port 1 to continue TheText.Get("NOCONT") // Please reconnect an analog controller (DUALSHOCK@) or analog controller (DUALSHOCK@2). to controller port 1 to continue
); );
} }
else if ( bObsoleteControllerMessage ) else if ( bObsoleteControllerMessage )
{ {
CFont::SetScale(0.85f, 1.0f); CSprite2d::DrawRect(CRect(SCREEN_STRETCH_X(20.0f), SCREEN_SCALE_FROM_BOTTOM(130.0f), SCREEN_STRETCH_FROM_RIGHT(20.0f), SCREEN_SCALE_Y(140.0f)), CRGBA(50, 50, 50, 210));
CFont::SetScale(SCREEN_SCALE_X(0.85f), SCREEN_SCALE_Y(1.0f));
CFont::SetJustifyOff(); CFont::SetJustifyOff();
CFont::SetBackgroundOff(); CFont::SetBackgroundOff();
CFont::SetCentreSize(SCREEN_WIDTH - 20); CFont::SetCentreSize(SCREEN_STRETCH_FROM_RIGHT(50.0f));
CFont::SetCentreOn(); CFont::SetCentreOn();
CFont::SetPropOn(); CFont::SetPropOn();
CFont::SetColor(CRGBA(255, 255, 200, 200)); CFont::SetColor(CRGBA(255, 255, 200, 200));
@ -3133,7 +3135,7 @@ void CPad::PrintErrorMessage(void)
CFont::PrintString CFont::PrintString
( (
SCREEN_WIDTH / 2, SCREEN_WIDTH / 2,
SCREEN_HEIGHT / 2, SCREEN_HEIGHT / 2 - SCREEN_SCALE_Y(40.0f),
TheText.Get("WRCONT") // The controller connected to controller port 1 is an unsupported controller. Grand Theft Auto III requires an analog controller (DUALSHOCK@) or analog controller (DUALSHOCK@2). TheText.Get("WRCONT") // The controller connected to controller port 1 is an unsupported controller. Grand Theft Auto III requires an analog controller (DUALSHOCK@) or analog controller (DUALSHOCK@2).
); );
} }

View File

@ -200,7 +200,7 @@ enum
MI_WMYCR, MI_WMYCR,
MI_WFYST, MI_WFYST,
MI_WFOST, MI_WFOST,
MI_WMIST, MI_WMYST,
MI_WMOST, MI_WMOST,
MI_WFYRI, MI_WFYRI,
MI_WFORI, MI_WFORI,
@ -214,6 +214,24 @@ enum
MI_WMYGO, MI_WMYGO,
MI_WFOGO, MI_WFOGO,
MI_WMOGO, MI_WMOGO,
MI_WFYLG,
MI_WMYLG,
MI_WFYBU,
MI_WMYBU,
MI_WMOBU,
MI_WFYPR,
MI_WFOTR,
MI_WMOTR,
MI_WMYPI,
MI_WMOCA,
MI_WFYJG,
MI_WMYJG,
MI_WFYSK,
MI_WMYSK,
MI_WFYSH,
MI_WFOSH,
MI_JFOTO,
MI_JMOTO,
MI_CBA = 83, MI_CBA = 83,
MI_CBB, MI_CBB,

View File

@ -18,7 +18,8 @@
#include <float.h> #include <float.h>
#endif #endif
// --MIAMI: Done // --MIAMI: file done except TODOs
CCivilianPed::CCivilianPed(ePedType pedtype, uint32 mi) : CPed(pedtype) CCivilianPed::CCivilianPed(ePedType pedtype, uint32 mi) : CPed(pedtype)
{ {
SetModelIndex(mi); SetModelIndex(mi);
@ -43,7 +44,6 @@ CCivilianPed::CCivilianPed(ePedType pedtype, uint32 mi) : CPed(pedtype)
m_bAttractorUnk = (CGeneral::GetRandomNumberInRange(0.0f, 1.0f) < 1.25f); m_bAttractorUnk = (CGeneral::GetRandomNumberInRange(0.0f, 1.0f) < 1.25f);
} }
// --MIAMI: Done
void void
CCivilianPed::CivilianAI(void) CCivilianPed::CivilianAI(void)
{ {
@ -221,7 +221,6 @@ CCivilianPed::CivilianAI(void)
} }
} }
// --MIAMI: Done except comments
void void
CCivilianPed::ProcessControl(void) CCivilianPed::ProcessControl(void)
{ {
@ -504,7 +503,6 @@ bool CCivilianPed::IsAttractedTo(int8 type)
return false; return false;
} }
// --MIAMI: Done
void void
CCivilianPed::EnterVacantNearbyCars(void) CCivilianPed::EnterVacantNearbyCars(void)
{ {

View File

@ -20,6 +20,8 @@
#include "Ropes.h" #include "Ropes.h"
#include "Stinger.h" #include "Stinger.h"
// --MIAMI: file done except TODOs
CCopPed::CCopPed(eCopType copType, int32 modifier) : CPed(PEDTYPE_COP) CCopPed::CCopPed(eCopType copType, int32 modifier) : CPed(PEDTYPE_COP)
{ {
m_nCopType = copType; m_nCopType = copType;
@ -83,10 +85,10 @@ CCopPed::CCopPed(eCopType copType, int32 modifier) : CPed(PEDTYPE_COP)
m_attackTimer = 0; m_attackTimer = 0;
m_bBeatingSuspect = false; m_bBeatingSuspect = false;
m_bStopAndShootDisabledZone = false; m_bStopAndShootDisabledZone = false;
field_601 = false; m_bDragsPlayerFromCar = false;
m_bZoneDisabled = false; m_bZoneDisabled = false;
field_628 = -1; field_628 = -1;
m_nRoadblockNode = -1; // TODO(Miami): this will be nil m_nRoadblockVeh = nil;
m_bThrowsSpikeTrap = false; m_bThrowsSpikeTrap = false;
m_pRopeEntity = nil; m_pRopeEntity = nil;
m_fAbseilPos = 0.0f; m_fAbseilPos = 0.0f;
@ -106,7 +108,6 @@ CCopPed::~CCopPed()
delete m_pStinger; delete m_pStinger;
} }
// --MIAMI: Done
// Parameter should always be CPlayerPed, but it seems they considered making civilians arrestable at some point // Parameter should always be CPlayerPed, but it seems they considered making civilians arrestable at some point
void void
CCopPed::SetArrestPlayer(CPed *player) CCopPed::SetArrestPlayer(CPed *player)
@ -155,7 +156,6 @@ CCopPed::SetArrestPlayer(CPed *player)
SetCurrentWeapon(WEAPONTYPE_COLT45); SetCurrentWeapon(WEAPONTYPE_COLT45);
} }
// --MIAMI: Done
void void
CCopPed::ClearPursuit(void) CCopPed::ClearPursuit(void)
{ {
@ -194,7 +194,7 @@ CCopPed::ClearPursuit(void)
bNotAllowedToDuck = false; bNotAllowedToDuck = false;
bKindaStayInSamePlace = false; bKindaStayInSamePlace = false;
m_bStopAndShootDisabledZone = false; m_bStopAndShootDisabledZone = false;
field_601 = false; m_bDragsPlayerFromCar = false;
m_bZoneDisabled = false; m_bZoneDisabled = false;
ClearObjective(); ClearObjective();
if (IsPedInControl()) { if (IsPedInControl()) {
@ -212,7 +212,6 @@ CCopPed::ClearPursuit(void)
} }
} }
// --MIAMI: Done
// TODO: I don't know why they needed that parameter. // TODO: I don't know why they needed that parameter.
void void
CCopPed::SetPursuit(bool ignoreCopLimit) CCopPed::SetPursuit(bool ignoreCopLimit)
@ -245,7 +244,6 @@ CCopPed::SetPursuit(bool ignoreCopLimit)
} }
} }
// --MIAMI: Done
void void
CCopPed::ArrestPlayer(void) CCopPed::ArrestPlayer(void)
{ {
@ -311,7 +309,6 @@ CCopPed::ScanForCrimes(void)
} }
} }
// --MIAMI: Done
void void
CCopPed::CopAI(void) CCopPed::CopAI(void)
{ {
@ -465,17 +462,13 @@ CCopPed::CopAI(void)
bNotAllowedToDuck = false; bNotAllowedToDuck = false;
bDuckAndCover = false; bDuckAndCover = false;
} else { } else {
// TODO(Miami): Roadblock system is still III
float dotProd; float dotProd;
if (m_nRoadblockNode != -1) { if (m_nRoadblockVeh) {
CPathNode *roadBlockNode = &ThePaths.m_pathNodes[CRoadBlocks::RoadBlockNodes[m_nRoadblockNode]]; dotProd = DotProduct2D(playerOrHisVeh->GetPosition() - m_nRoadblockVeh->GetPosition(), GetPosition() - m_nRoadblockVeh->GetPosition());
dotProd = DotProduct2D(playerOrHisVeh->GetPosition() - roadBlockNode->GetPosition(), GetPosition() - roadBlockNode->GetPosition());
} else } else
dotProd = -1.0f; dotProd = -1.0f;
if(dotProd >= 0.0f) { if(dotProd < 0.0f) {
bIsPointingGunAt = true;
} else {
if (bIsDucking) if (bIsDucking)
ClearDuck(); ClearDuck();
m_bIsDisabledCop = false; m_bIsDisabledCop = false;
@ -484,6 +477,8 @@ CCopPed::CopAI(void)
bCrouchWhenShooting = false; bCrouchWhenShooting = false;
bDuckAndCover = false; bDuckAndCover = false;
SetPursuit(false); SetPursuit(false);
} else {
bIsPointingGunAt = true;
} }
} }
} }
@ -601,7 +596,6 @@ CCopPed::CopAI(void)
} }
} }
// --MIAMI: Done
void void
CCopPed::ProcessControl(void) CCopPed::ProcessControl(void)
{ {
@ -822,7 +816,6 @@ CCopPed::ProcessControl(void)
field_624 = 0; field_624 = 0;
} }
// --MIAMI: Done
void void
CCopPed::ProcessHeliSwat(void) CCopPed::ProcessHeliSwat(void)
{ {
@ -858,7 +851,6 @@ CCopPed::ProcessHeliSwat(void)
} }
} }
// --MIAMI: Done
void void
CCopPed::ProcessStingerCop(void) CCopPed::ProcessStingerCop(void)
{ {

View File

@ -14,14 +14,14 @@ enum eCopType
class CCopPed : public CPed class CCopPed : public CPed
{ {
public: public:
int16 m_nRoadblockNode; CVehicle* m_nRoadblockVeh;
float m_fDistanceToTarget; float m_fDistanceToTarget;
bool m_bIsInPursuit; bool m_bIsInPursuit;
bool m_bIsDisabledCop; bool m_bIsDisabledCop;
int8 field_5FE; int8 field_5FE;
bool m_bBeatingSuspect; bool m_bBeatingSuspect;
bool m_bStopAndShootDisabledZone; bool m_bStopAndShootDisabledZone;
bool field_601; // set when police dragging player from car bool m_bDragsPlayerFromCar;
bool m_bZoneDisabled; bool m_bZoneDisabled;
float m_fAbseilPos; float m_fAbseilPos;
eCopType m_nCopType; eCopType m_nCopType;

View File

@ -67,6 +67,8 @@
#include "CutsceneShadow.h" #include "CutsceneShadow.h"
#include "Clock.h" #include "Clock.h"
// --MIAMI: file done except TODOs
#define CAN_SEE_ENTITY_ANGLE_THRESHOLD DEGTORAD(60.0f) #define CAN_SEE_ENTITY_ANGLE_THRESHOLD DEGTORAD(60.0f)
CPed *gapTempPedList[50]; CPed *gapTempPedList[50];
@ -10945,7 +10947,7 @@ CPed::PedAnimAlignCB(CAnimBlendAssociation *animAssoc, void *arg)
pedToDragOut->RegisterThreatWithGangPeds(ped); pedToDragOut->RegisterThreatWithGangPeds(ped);
if (ped->m_nPedType == PEDTYPE_COP && pedToDragOut == FindPlayerPed() && veh->IsBike()) if (ped->m_nPedType == PEDTYPE_COP && pedToDragOut == FindPlayerPed() && veh->IsBike())
((CCopPed*)ped)->field_601 = 1; ((CCopPed*)ped)->m_bDragsPlayerFromCar = 1;
if (pedToDragOut == veh->pDriver) { if (pedToDragOut == veh->pDriver) {
if (veh->pPassengers[0]) if (veh->pPassengers[0])
@ -20894,11 +20896,11 @@ CPed::KillCharOnFootMelee(CVector &ourPos, CVector &targetPos, CVector &distWith
} }
if (m_nPedType == PEDTYPE_COP && m_pedInObjective->IsPlayer()) { if (m_nPedType == PEDTYPE_COP && m_pedInObjective->IsPlayer()) {
float maxArrestDist = 1.5f; float maxArrestDist = 1.5f;
if (((CCopPed*)this)->field_601) { if (((CCopPed*)this)->m_bDragsPlayerFromCar) {
if (m_nPedState == PED_FALL) { if (m_nPedState == PED_FALL) {
maxArrestDist = 3.5f; maxArrestDist = 3.5f;
} else if (m_nPedState != PED_DRAG_FROM_CAR) { } else if (m_nPedState != PED_DRAG_FROM_CAR) {
((CCopPed*)this)->field_601 = 0; ((CCopPed*)this)->m_bDragsPlayerFromCar = 0;
} }
} }
@ -21139,11 +21141,11 @@ CPed::KillCharOnFootArmed(CVector &ourPos, CVector &targetPos, CVector &distWith
} }
if (m_nPedType == PEDTYPE_COP && m_pedInObjective->IsPlayer()) { if (m_nPedType == PEDTYPE_COP && m_pedInObjective->IsPlayer()) {
float maxArrestDist = 1.5f; float maxArrestDist = 1.5f;
if (((CCopPed*)this)->field_601) { if (((CCopPed*)this)->m_bDragsPlayerFromCar) {
if (m_nPedState == PED_FALL) { if (m_nPedState == PED_FALL) {
maxArrestDist = 3.5f; maxArrestDist = 3.5f;
} else if (m_nPedState != PED_DRAG_FROM_CAR) { } else if (m_nPedState != PED_DRAG_FROM_CAR) {
((CCopPed*)this)->field_601 = 0; ((CCopPed*)this)->m_bDragsPlayerFromCar = 0;
} }
} }

View File

@ -14,9 +14,9 @@ enum ePedType
PEDTYPE_GANG2, PEDTYPE_GANG2,
PEDTYPE_GANG3, PEDTYPE_GANG3,
PEDTYPE_GANG4, PEDTYPE_GANG4,
PEDTYPE_GANG5, PEDTYPE_GANG5, // Security - hardcoded
PEDTYPE_GANG6, PEDTYPE_GANG6,
PEDTYPE_GANG7, // Vercetti gang PEDTYPE_GANG7, // Vercetti gang - hardcoded
PEDTYPE_GANG8, PEDTYPE_GANG8,
PEDTYPE_GANG9, PEDTYPE_GANG9,
PEDTYPE_EMERGENCY, PEDTYPE_EMERGENCY,

File diff suppressed because it is too large Load Diff

View File

@ -84,7 +84,9 @@ enum eBeachToy
BEACHTOY_2, BEACHTOY_2,
BEACHTOY_3, BEACHTOY_3,
BEACHTOY_4, BEACHTOY_4,
BEACHTOY_LOUNGE = 5 BEACHTOY_LOUNGE = 5,
BEACHTOY_6,
BEACHTOY_11 = 11
}; };
extern RwRaster* gpWaterRaster; extern RwRaster* gpWaterRaster;

View File

@ -826,6 +826,9 @@ void joysChangeCB(int jid, int event);
bool IsThisJoystickBlacklisted(int i) bool IsThisJoystickBlacklisted(int i)
{ {
if (glfwJoystickIsGamepad(i))
return false;
const char* joyname = glfwGetJoystickName(i); const char* joyname = glfwGetJoystickName(i);
// this is just a keyboard and mouse // this is just a keyboard and mouse
@ -833,6 +836,19 @@ bool IsThisJoystickBlacklisted(int i)
// Microsoft Microsoft® 2.4GHz Transceiver v8.0 System Control // Microsoft Microsoft® 2.4GHz Transceiver v8.0 System Control
if (strstr(joyname, "2.4GHz Transceiver")) if (strstr(joyname, "2.4GHz Transceiver"))
return true; return true;
// COMPANY USB Device System Control
// COMPANY USB Device Consumer Control
if (strstr(joyname, "COMPANY USB"))
return true;
// i.e. Synaptics TM2438-005
if (strstr(joyname, "Synaptics "))
return true;
// i.e. ELAN Touchscreen
if (strstr(joyname, "ELAN "))
return true;
// i.e. Primax Electronics, Ltd HP Wireless Keyboard Mouse Kit Consumer Control
if (strstr(joyname, "Keyboard"))
return true;
return false; return false;
} }
@ -2031,11 +2047,11 @@ void CapturePad(RwInt32 padID)
// Gamepad axes are guaranteed to return 0.0f if that particular gamepad doesn't have that axis. // Gamepad axes are guaranteed to return 0.0f if that particular gamepad doesn't have that axis.
if ( glfwPad != -1 ) { if ( glfwPad != -1 ) {
leftStickPos.x = ControlsManager.m_NewState.isGamepad ? gamepadState.axes[0] : numAxes >= 0 ? axes[0] : 0.0f; leftStickPos.x = ControlsManager.m_NewState.isGamepad ? gamepadState.axes[0] : numAxes >= 1 ? axes[0] : 0.0f;
leftStickPos.y = ControlsManager.m_NewState.isGamepad ? gamepadState.axes[1] : numAxes >= 1 ? axes[1] : 0.0f; leftStickPos.y = ControlsManager.m_NewState.isGamepad ? gamepadState.axes[1] : numAxes >= 2 ? axes[1] : 0.0f;
rightStickPos.x = ControlsManager.m_NewState.isGamepad ? gamepadState.axes[2] : numAxes >= 2 ? axes[2] : 0.0f; rightStickPos.x = ControlsManager.m_NewState.isGamepad ? gamepadState.axes[2] : numAxes >= 3 ? axes[2] : 0.0f;
rightStickPos.y = ControlsManager.m_NewState.isGamepad ? gamepadState.axes[3] : numAxes >= 3 ? axes[3] : 0.0f; rightStickPos.y = ControlsManager.m_NewState.isGamepad ? gamepadState.axes[3] : numAxes >= 4 ? axes[3] : 0.0f;
} }
{ {