summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-02-02 14:51:33 +0100
committereray orçunus <erayorcunus@gmail.com>2020-02-02 14:58:52 +0100
commit03b995c6efb4b6b559b61dd0f789b16c0d8b474f (patch)
treeab7c893d774ed6a07d0d83d729b5df7a08df5b7b
parentfixed firetruck crash (diff)
downloadre3-03b995c6efb4b6b559b61dd0f789b16c0d8b474f.tar
re3-03b995c6efb4b6b559b61dd0f789b16c0d8b474f.tar.gz
re3-03b995c6efb4b6b559b61dd0f789b16c0d8b474f.tar.bz2
re3-03b995c6efb4b6b559b61dd0f789b16c0d8b474f.tar.lz
re3-03b995c6efb4b6b559b61dd0f789b16c0d8b474f.tar.xz
re3-03b995c6efb4b6b559b61dd0f789b16c0d8b474f.tar.zst
re3-03b995c6efb4b6b559b61dd0f789b16c0d8b474f.zip
-rw-r--r--src/control/Garages.cpp4
-rw-r--r--src/control/Garages.h2
-rw-r--r--src/control/Script.cpp2
-rw-r--r--src/core/re3.cpp1
-rw-r--r--src/peds/Ped.cpp12
-rw-r--r--src/peds/Ped.h1
-rw-r--r--src/render/Renderer.cpp8
-rw-r--r--src/render/VisibilityPlugins.cpp2
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);