1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-11-01 00:15:55 +00:00

Merge pull request #339 from erorcun/erorcun

fixes
This commit is contained in:
erorcun 2020-03-01 04:46:12 +03:00 committed by GitHub
commit 971f3cb177
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 42 additions and 10 deletions

View file

@ -2815,7 +2815,11 @@ int8 CRunningScript::ProcessCommands200To299(int32 command)
pVehicle->AutoPilot.m_nCarMission = MISSION_CRUISE; pVehicle->AutoPilot.m_nCarMission = MISSION_CRUISE;
pVehicle->bEngineOn = true; pVehicle->bEngineOn = true;
pPed->bUsesCollision = false; pPed->bUsesCollision = false;
#ifdef FIX_BUGS
AnimationId anim = pVehicle->GetDriverAnim();
#else
AnimationId anim = pVehicle->bLowVehicle ? ANIM_CAR_LSIT : ANIM_CAR_SIT; AnimationId anim = pVehicle->bLowVehicle ? ANIM_CAR_LSIT : ANIM_CAR_SIT;
#endif
pPed->m_pVehicleAnim = CAnimManager::BlendAnimation(pPed->GetClump(), ASSOCGRP_STD, anim, 100.0f); pPed->m_pVehicleAnim = CAnimManager::BlendAnimation(pPed->GetClump(), ASSOCGRP_STD, anim, 100.0f);
pPed->StopNonPartialAnims(); pPed->StopNonPartialAnims();
pPed->m_nZoneLevel = CTheZones::GetLevelFromPosition(pPed->GetPosition()); pPed->m_nZoneLevel = CTheZones::GetLevelFromPosition(pPed->GetPosition());
@ -4009,7 +4013,11 @@ int8 CRunningScript::ProcessCommands400To499(int32 command)
pPed->SetPedState(PED_DRIVING); pPed->SetPedState(PED_DRIVING);
pVehicle->m_status = STATUS_PHYSICS; pVehicle->m_status = STATUS_PHYSICS;
pPed->bUsesCollision = false; pPed->bUsesCollision = false;
#ifdef FIX_BUGS
AnimationId anim = pVehicle->GetDriverAnim();
#else
AnimationId anim = pVehicle->bLowVehicle ? ANIM_CAR_LSIT : ANIM_CAR_SIT; AnimationId anim = pVehicle->bLowVehicle ? ANIM_CAR_LSIT : ANIM_CAR_SIT;
#endif
pPed->m_pVehicleAnim = CAnimManager::BlendAnimation(pPed->GetClump(), ASSOCGRP_STD, anim, 100.0f); pPed->m_pVehicleAnim = CAnimManager::BlendAnimation(pPed->GetClump(), ASSOCGRP_STD, anim, 100.0f);
pPed->StopNonPartialAnims(); pPed->StopNonPartialAnims();
pPed->m_nZoneLevel = CTheZones::GetLevelFromPosition(pPed->GetPosition()); pPed->m_nZoneLevel = CTheZones::GetLevelFromPosition(pPed->GetPosition());

View file

@ -237,7 +237,8 @@ static char PersonalityTypeText[][18] = {
"Geek Girl", "Geek Girl",
"Old Girl", "Old Girl",
"Tough Girl", "Tough Girl",
"Tramp", "Tramp Male",
"Tramp Female",
"Tourist", "Tourist",
"Prostitute", "Prostitute",
"Criminal", "Criminal",
@ -246,6 +247,8 @@ static char PersonalityTypeText[][18] = {
"Psycho", "Psycho",
"Steward", "Steward",
"Sports Fan", "Sports Fan",
"Shopper",
"Old Shopper"
}; };
static char WaitStateText[][16] = { static char WaitStateText[][16] = {
@ -16662,6 +16665,14 @@ CPed::WarpPedIntoCar(CVehicle *car)
car->bEngineOn = true; car->bEngineOn = true;
DMAudio.PlayOneShot(car->m_audioEntityId, SOUND_CAR_ENGINE_START, 1.0f); DMAudio.PlayOneShot(car->m_audioEntityId, SOUND_CAR_ENGINE_START, 1.0f);
} }
#ifdef VC_PED_PORTS
RpAnimBlendClumpSetBlendDeltas(GetClump(), ASSOC_PARTIAL, -1000.0f);
// VC uses AddInCarAnims but we don't have that
m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, car->GetDriverAnim(), 100.0f);
RemoveWeaponWhenEnteringVehicle();
#else
if (car->IsBoat()) { if (car->IsBoat()) {
m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_DRIVE_BOAT, 100.0f); m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_DRIVE_BOAT, 100.0f);
CWeaponInfo *ourWeapon = CWeaponInfo::GetWeaponInfo(GetWeapon()->m_eWeaponType); CWeaponInfo *ourWeapon = CWeaponInfo::GetWeaponInfo(GetWeapon()->m_eWeaponType);
@ -16675,6 +16686,8 @@ CPed::WarpPedIntoCar(CVehicle *car)
else else
m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_SIT, 100.0f); m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_SIT, 100.0f);
} }
#endif
StopNonPartialAnims(); StopNonPartialAnims();
if (car->bIsBus) if (car->bIsBus)
bRenderPedInCar = false; bRenderPedInCar = false;
@ -16904,11 +16917,17 @@ CPed::SetEnterCar_AllClear(CVehicle *car, uint32 doorNode, uint32 doorFlag)
m_vecOffsetSeek = doorOpenPos - GetPosition(); m_vecOffsetSeek = doorOpenPos - GetPosition();
m_nPedStateTimer = CTimer::GetTimeInMilliseconds() + 600; m_nPedStateTimer = CTimer::GetTimeInMilliseconds() + 600;
if (car->IsBoat()) { if (car->IsBoat()) {
m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_DRIVE_BOAT, 100.0f);
#ifdef VC_PED_PORTS #ifdef VC_PED_PORTS
// VC checks for handling flag, but we can't do that
if(car->GetModelIndex() == MI_SPEEDER)
m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_SIT, 100.0f);
else
m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_DRIVE_BOAT, 100.0f);
PedSetInCarCB(nil, this); PedSetInCarCB(nil, this);
m_ped_flagI4 = true; m_ped_flagI4 = true;
#else #else
m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_DRIVE_BOAT, 100.0f);
m_pVehicleAnim->SetFinishCallback(PedSetInCarCB, this); m_pVehicleAnim->SetFinishCallback(PedSetInCarCB, this);
#endif #endif
if (IsPlayer()) if (IsPlayer())

View file

@ -79,7 +79,11 @@ void
CPlayerPed::MakeObjectTargettable(int32 handle) CPlayerPed::MakeObjectTargettable(int32 handle)
{ {
for (int i = 0; i < ARRAY_SIZE(m_nTargettableObjects); i++) { for (int i = 0; i < ARRAY_SIZE(m_nTargettableObjects); i++) {
if (CPools::GetObjectPool()->GetAt(m_nTargettableObjects[i]) == nil) { if (
#ifdef FIX_BUGS
m_nTargettableObjects[i] == -1 ||
#endif
CPools::GetObjectPool()->GetAt(m_nTargettableObjects[i]) == nil) {
m_nTargettableObjects[i] = handle; m_nTargettableObjects[i] = handle;
return; return;
} }

View file

@ -820,15 +820,14 @@ CPopulation::AddPedInCar(CVehicle* car)
// FIX: Make peds comfortable while driving car/boat // FIX: Make peds comfortable while driving car/boat
#ifdef FIX_BUGS #ifdef FIX_BUGS
if (car->IsBoat()) { {
newPed->m_pVehicleAnim = CAnimManager::BlendAnimation(newPed->GetClump(), ASSOCGRP_STD, ANIM_DRIVE_BOAT, 100.0f); newPed->m_pVehicleAnim = CAnimManager::BlendAnimation(newPed->GetClump(), ASSOCGRP_STD, car->GetDriverAnim(), 100.0f);
} else if (car->IsVehicle() && ((CVehicle*)car)->bLowVehicle) { }
newPed->m_pVehicleAnim = CAnimManager::BlendAnimation(newPed->GetClump(), ASSOCGRP_STD, ANIM_CAR_LSIT, 100.0f); #else
} else
#endif
{ {
newPed->m_pVehicleAnim = CAnimManager::BlendAnimation(newPed->GetClump(), ASSOCGRP_STD, ANIM_CAR_SIT, 100.0f); newPed->m_pVehicleAnim = CAnimManager::BlendAnimation(newPed->GetClump(), ASSOCGRP_STD, ANIM_CAR_SIT, 100.0f);
} }
#endif
newPed->StopNonPartialAnims(); newPed->StopNonPartialAnims();
return newPed; return newPed;

View file

@ -3,6 +3,7 @@
#include "Physical.h" #include "Physical.h"
#include "AutoPilot.h" #include "AutoPilot.h"
#include "ModelIndices.h" #include "ModelIndices.h"
#include "AnimManager.h"
class CPed; class CPed;
class CFire; class CFire;
@ -269,7 +270,8 @@ public:
bool IsAlarmOn(void) { return m_nAlarmState != 0 && m_nAlarmState != -1; } bool IsAlarmOn(void) { return m_nAlarmState != 0 && m_nAlarmState != -1; }
CVehicleModelInfo* GetModelInfo() { return (CVehicleModelInfo*)CModelInfo::GetModelInfo(GetModelIndex()); } CVehicleModelInfo* GetModelInfo() { return (CVehicleModelInfo*)CModelInfo::GetModelInfo(GetModelIndex()); }
bool IsTaxi(void) { return GetModelIndex() == MI_TAXI || GetModelIndex() == MI_CABBIE || GetModelIndex() == MI_BORGNINE; } bool IsTaxi(void) { return GetModelIndex() == MI_TAXI || GetModelIndex() == MI_CABBIE || GetModelIndex() == MI_BORGNINE; }
AnimationId GetDriverAnim(void) { return IsCar() && bLowVehicle ? ANIM_CAR_LSIT : (IsBoat() && GetModelIndex() != MI_SPEEDER ? ANIM_DRIVE_BOAT : ANIM_CAR_SIT); }
static bool &bWheelsOnlyCheat; static bool &bWheelsOnlyCheat;
static bool &bAllDodosCheat; static bool &bAllDodosCheat;
static bool &bCheat3; static bool &bCheat3;