diff options
author | erorcun <erayorcunus@gmail.com> | 2020-02-02 15:02:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-02 15:02:15 +0100 |
commit | 3c80b07d120244b6c671f3dc99bcc9c4034998be (patch) | |
tree | ab7c893d774ed6a07d0d83d729b5df7a08df5b7b /src | |
parent | fixed firetruck crash (diff) | |
parent | Some fixes and some cosmetic things (diff) | |
download | re3-3c80b07d120244b6c671f3dc99bcc9c4034998be.tar re3-3c80b07d120244b6c671f3dc99bcc9c4034998be.tar.gz re3-3c80b07d120244b6c671f3dc99bcc9c4034998be.tar.bz2 re3-3c80b07d120244b6c671f3dc99bcc9c4034998be.tar.lz re3-3c80b07d120244b6c671f3dc99bcc9c4034998be.tar.xz re3-3c80b07d120244b6c671f3dc99bcc9c4034998be.tar.zst re3-3c80b07d120244b6c671f3dc99bcc9c4034998be.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/control/Garages.cpp | 4 | ||||
-rw-r--r-- | src/control/Garages.h | 2 | ||||
-rw-r--r-- | src/control/Script.cpp | 2 | ||||
-rw-r--r-- | src/core/re3.cpp | 1 | ||||
-rw-r--r-- | src/peds/Ped.cpp | 12 | ||||
-rw-r--r-- | src/peds/Ped.h | 1 | ||||
-rw-r--r-- | src/render/Renderer.cpp | 8 | ||||
-rw-r--r-- | src/render/VisibilityPlugins.cpp | 2 |
8 files changed, 13 insertions, 19 deletions
diff --git a/src/control/Garages.cpp b/src/control/Garages.cpp index dc77a154..04bfb5a2 100644 --- a/src/control/Garages.cpp +++ b/src/control/Garages.cpp @@ -93,11 +93,11 @@ int32 CGarages::QueryCarsCollected(int16 garage) void CGarages::GivePlayerDetonator() { FindPlayerPed()->GiveWeapon(WEAPONTYPE_DETONATOR, 1); - FindPlayerPed()->m_weapons[FindPlayerPed()->GetWeaponSlot(WEAPONTYPE_DETONATOR)].m_eWeaponState = WEAPONSTATE_READY; + FindPlayerPed()->GetWeapon(FindPlayerPed()->GetWeaponSlot(WEAPONTYPE_DETONATOR)).m_eWeaponState = WEAPONSTATE_READY; } WRAPPER bool CGarages::HasThisCarBeenCollected(int16 garage, uint8 id) { EAXJMP(0x426D50); } -WRAPPER void CGarages::ChangeGarageType(int16 garage, eGarageType type) { EAXJMP(0x4222A0); } +WRAPPER void CGarages::ChangeGarageType(int16 garage, eGarageType type, int32 unk) { EAXJMP(0x4222A0); } WRAPPER bool CGarages::HasResprayHappened(int16 garage) { EAXJMP(0x4274F0); } void CGarage::OpenThisGarage() diff --git a/src/control/Garages.h b/src/control/Garages.h index 945922fe..7cb25445 100644 --- a/src/control/Garages.h +++ b/src/control/Garages.h @@ -146,7 +146,7 @@ public: static void DeActivateGarage(int16); static int32 QueryCarsCollected(int16); static bool HasThisCarBeenCollected(int16, uint8); - static void ChangeGarageType(int16, eGarageType); + static void ChangeGarageType(int16, eGarageType, int32); static bool HasResprayHappened(int16); static void GivePlayerDetonator(); }; diff --git a/src/control/Script.cpp b/src/control/Script.cpp index a3d4a747..84d4f179 100644 --- a/src/control/Script.cpp +++ b/src/control/Script.cpp @@ -6176,7 +6176,7 @@ int8 CRunningScript::ProcessCommands700To799(int32 command) } case COMMAND_CHANGE_GARAGE_TYPE: CollectParameters(&m_nIp, 2); - CGarages::ChangeGarageType(ScriptParams[0], (eGarageType)ScriptParams[1]); + CGarages::ChangeGarageType(ScriptParams[0], (eGarageType)ScriptParams[1], 0); return 0; case COMMAND_ACTIVATE_CRUSHER_CRANE: { diff --git a/src/core/re3.cpp b/src/core/re3.cpp index d3b8200d..989a05b5 100644 --- a/src/core/re3.cpp +++ b/src/core/re3.cpp @@ -350,7 +350,6 @@ DebugMenuPopulate(void) DebugMenuAddCmd("Debug", "Make peds follow you in formation", LetThemFollowYou); #ifdef TOGGLEABLE_BETA_FEATURES - DebugMenuAddVarBool8("Debug", "Toggle unused fight feature", (int8*)&CPed::bUnusedFightThingOnPlayer, nil); DebugMenuAddVarBool8("Debug", "Toggle banned particles", (int8*)&CParticle::bEnableBannedParticles, nil); DebugMenuAddVarBool8("Debug", "Toggle popping heads on headshot", (int8*)&CPed::bPopHeadsOnHeadshot, nil); DebugMenuAddVarBool8("Debug", "Toggle peds running to phones to report crimes", (int8*)&CPed::bMakePedsRunToPhonesToReportCrimes, nil); diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp index 797262d4..f7578bac 100644 --- a/src/peds/Ped.cpp +++ b/src/peds/Ped.cpp @@ -273,7 +273,6 @@ static char WaitStateText[][16] = { }; #ifdef TOGGLEABLE_BETA_FEATURES -bool CPed::bUnusedFightThingOnPlayer = false; bool CPed::bPopHeadsOnHeadshot = false; bool CPed::bMakePedsRunToPhonesToReportCrimes = false; #endif @@ -1068,6 +1067,7 @@ CPed::FinishedAttackCB(CAnimBlendAssociation *attackAssoc, void *arg) if (attackAssoc) { switch (attackAssoc->animId) { case ANIM_WEAPON_START_THROW: + // what?! if ((!ped->IsPlayer() || ((CPlayerPed*)ped)->m_bHaveTargetSelected) && ped->IsPlayer()) { attackAssoc->blendDelta = -1000.0f; newAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_WEAPON_THROWU); @@ -1929,13 +1929,13 @@ CPed::LineUpPedWithCar(PedLineUpPhase phase) float limitedDest = CGeneral::LimitRadianAngle(m_fRotationDest); float timeUntilStateChange = (m_nPedStateTimer - CTimer::GetTimeInMilliseconds())/600.0f; - m_vecOffsetSeek.z = 0.0f; if (timeUntilStateChange <= 0.0f) { m_vecOffsetSeek.x = 0.0f; m_vecOffsetSeek.y = 0.0f; - } else { - neededPos -= timeUntilStateChange * m_vecOffsetSeek; } + m_vecOffsetSeek.z = 0.0f; + + neededPos -= timeUntilStateChange * m_vecOffsetSeek; if (PI + m_fRotationCur < limitedDest) { limitedDest -= 2 * PI; @@ -4827,10 +4827,6 @@ CPed::StartFightAttack(uint8 buttonPressure) animAssoc->SetFinishCallback(FinishFightMoveCB, this); m_fightState = FIGHTSTATE_NO_MOVE; m_takeAStepAfterAttack = false; -#ifdef TOGGLEABLE_BETA_FEATURES - m_takeAStepAfterAttack = IsPlayer() && bUnusedFightThingOnPlayer; -#endif - bIsAttacking = true; if (IsPlayer()) diff --git a/src/peds/Ped.h b/src/peds/Ped.h index b421bc83..50c1fc39 100644 --- a/src/peds/Ped.h +++ b/src/peds/Ped.h @@ -824,7 +824,6 @@ public: static CPedAudioData (&CommentWaitTime)[38]; #ifdef TOGGLEABLE_BETA_FEATURES - static bool bUnusedFightThingOnPlayer; static bool bPopHeadsOnHeadshot; static bool bMakePedsRunToPhonesToReportCrimes; #endif diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index 78a4e5b4..ff9f5755 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -413,7 +413,7 @@ CRenderer::SetupEntityVisibility(CEntity *ent) // Make sure our atomic uses the right geometry and not // that of an atomic for another draw distance. if(RpAtomicGetGeometry(a) != RpAtomicGetGeometry(rwobj)) - RpAtomicSetGeometry(rwobj, RpAtomicGetGeometry(a), 0); + RpAtomicSetGeometry(rwobj, RpAtomicGetGeometry(a), rpATOMICSAMEBOUNDINGSPHERE); // originally 5 (mistake?) mi->IncreaseAlpha(); if(ent->m_rwObject == nil || !ent->bIsVisible) return VIS_INVISIBLE; @@ -463,7 +463,7 @@ CRenderer::SetupEntityVisibility(CEntity *ent) assert(ent->m_rwObject); RpAtomic *rwobj = (RpAtomic*)ent->m_rwObject; if(RpAtomicGetGeometry(a) != RpAtomicGetGeometry(rwobj)) - RpAtomicSetGeometry(rwobj, RpAtomicGetGeometry(a), 0); + RpAtomicSetGeometry(rwobj, RpAtomicGetGeometry(a), rpATOMICSAMEBOUNDINGSPHERE); // originally 5 (mistake?) mi->IncreaseAlpha(); if(ent->m_rwObject == nil || !ent->bIsVisible) return VIS_INVISIBLE; @@ -528,7 +528,7 @@ CRenderer::SetupBigBuildingVisibility(CEntity *ent) // Make sure our atomic uses the right geometry and not // that of an atomic for another draw distance. if(RpAtomicGetGeometry(a) != RpAtomicGetGeometry(rwobj)) - RpAtomicSetGeometry(rwobj, RpAtomicGetGeometry(a), 0); + RpAtomicSetGeometry(rwobj, RpAtomicGetGeometry(a), rpATOMICSAMEBOUNDINGSPHERE); // originally 5 (mistake?) if(!ent->IsVisibleComplex()) return 0; if(mi->m_drawLast){ @@ -558,7 +558,7 @@ CRenderer::SetupBigBuildingVisibility(CEntity *ent) assert(ent->m_rwObject); RpAtomic *rwobj = (RpAtomic*)ent->m_rwObject; if(RpAtomicGetGeometry(a) != RpAtomicGetGeometry(rwobj)) - RpAtomicSetGeometry(rwobj, RpAtomicGetGeometry(a), 0); + RpAtomicSetGeometry(rwobj, RpAtomicGetGeometry(a), rpATOMICSAMEBOUNDINGSPHERE); // originally 5 (mistake?) if(ent->IsVisibleComplex()) CVisibilityPlugins::InsertEntityIntoSortedList(ent, dist); return 0; diff --git a/src/render/VisibilityPlugins.cpp b/src/render/VisibilityPlugins.cpp index bbaa08ce..e01bbb92 100644 --- a/src/render/VisibilityPlugins.cpp +++ b/src/render/VisibilityPlugins.cpp @@ -248,7 +248,7 @@ CVisibilityPlugins::RenderFadingAtomic(RpAtomic *atomic, float camdist) RpGeometrySetFlags(geo, flags | rpGEOMETRYMODULATEMATERIALCOLOR); RpGeometryForAllMaterials(geo, SetAlphaCB, (void*)alpha); if(geo != RpAtomicGetGeometry(atomic)) - RpAtomicSetGeometry(atomic, geo, 0); + RpAtomicSetGeometry(atomic, geo, rpATOMICSAMEBOUNDINGSPHERE); // originally 5 (mistake?) AtomicDefaultRenderCallBack(atomic); RpGeometryForAllMaterials(geo, SetAlphaCB, (void*)255); RpGeometrySetFlags(geo, flags); |