Merge pull request #320 from erorcun/erorcun
Some fixes and some cosmetic things
This commit is contained in:
commit
3c80b07d12
@ -93,11 +93,11 @@ int32 CGarages::QueryCarsCollected(int16 garage)
|
|||||||
void CGarages::GivePlayerDetonator()
|
void CGarages::GivePlayerDetonator()
|
||||||
{
|
{
|
||||||
FindPlayerPed()->GiveWeapon(WEAPONTYPE_DETONATOR, 1);
|
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 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); }
|
WRAPPER bool CGarages::HasResprayHappened(int16 garage) { EAXJMP(0x4274F0); }
|
||||||
|
|
||||||
void CGarage::OpenThisGarage()
|
void CGarage::OpenThisGarage()
|
||||||
|
@ -146,7 +146,7 @@ public:
|
|||||||
static void DeActivateGarage(int16);
|
static void DeActivateGarage(int16);
|
||||||
static int32 QueryCarsCollected(int16);
|
static int32 QueryCarsCollected(int16);
|
||||||
static bool HasThisCarBeenCollected(int16, uint8);
|
static bool HasThisCarBeenCollected(int16, uint8);
|
||||||
static void ChangeGarageType(int16, eGarageType);
|
static void ChangeGarageType(int16, eGarageType, int32);
|
||||||
static bool HasResprayHappened(int16);
|
static bool HasResprayHappened(int16);
|
||||||
static void GivePlayerDetonator();
|
static void GivePlayerDetonator();
|
||||||
};
|
};
|
||||||
|
@ -6176,7 +6176,7 @@ int8 CRunningScript::ProcessCommands700To799(int32 command)
|
|||||||
}
|
}
|
||||||
case COMMAND_CHANGE_GARAGE_TYPE:
|
case COMMAND_CHANGE_GARAGE_TYPE:
|
||||||
CollectParameters(&m_nIp, 2);
|
CollectParameters(&m_nIp, 2);
|
||||||
CGarages::ChangeGarageType(ScriptParams[0], (eGarageType)ScriptParams[1]);
|
CGarages::ChangeGarageType(ScriptParams[0], (eGarageType)ScriptParams[1], 0);
|
||||||
return 0;
|
return 0;
|
||||||
case COMMAND_ACTIVATE_CRUSHER_CRANE:
|
case COMMAND_ACTIVATE_CRUSHER_CRANE:
|
||||||
{
|
{
|
||||||
|
@ -350,7 +350,6 @@ DebugMenuPopulate(void)
|
|||||||
|
|
||||||
DebugMenuAddCmd("Debug", "Make peds follow you in formation", LetThemFollowYou);
|
DebugMenuAddCmd("Debug", "Make peds follow you in formation", LetThemFollowYou);
|
||||||
#ifdef TOGGLEABLE_BETA_FEATURES
|
#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 banned particles", (int8*)&CParticle::bEnableBannedParticles, nil);
|
||||||
DebugMenuAddVarBool8("Debug", "Toggle popping heads on headshot", (int8*)&CPed::bPopHeadsOnHeadshot, 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);
|
DebugMenuAddVarBool8("Debug", "Toggle peds running to phones to report crimes", (int8*)&CPed::bMakePedsRunToPhonesToReportCrimes, nil);
|
||||||
|
@ -273,7 +273,6 @@ static char WaitStateText[][16] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#ifdef TOGGLEABLE_BETA_FEATURES
|
#ifdef TOGGLEABLE_BETA_FEATURES
|
||||||
bool CPed::bUnusedFightThingOnPlayer = false;
|
|
||||||
bool CPed::bPopHeadsOnHeadshot = false;
|
bool CPed::bPopHeadsOnHeadshot = false;
|
||||||
bool CPed::bMakePedsRunToPhonesToReportCrimes = false;
|
bool CPed::bMakePedsRunToPhonesToReportCrimes = false;
|
||||||
#endif
|
#endif
|
||||||
@ -1068,6 +1067,7 @@ CPed::FinishedAttackCB(CAnimBlendAssociation *attackAssoc, void *arg)
|
|||||||
if (attackAssoc) {
|
if (attackAssoc) {
|
||||||
switch (attackAssoc->animId) {
|
switch (attackAssoc->animId) {
|
||||||
case ANIM_WEAPON_START_THROW:
|
case ANIM_WEAPON_START_THROW:
|
||||||
|
// what?!
|
||||||
if ((!ped->IsPlayer() || ((CPlayerPed*)ped)->m_bHaveTargetSelected) && ped->IsPlayer()) {
|
if ((!ped->IsPlayer() || ((CPlayerPed*)ped)->m_bHaveTargetSelected) && ped->IsPlayer()) {
|
||||||
attackAssoc->blendDelta = -1000.0f;
|
attackAssoc->blendDelta = -1000.0f;
|
||||||
newAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_WEAPON_THROWU);
|
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 limitedDest = CGeneral::LimitRadianAngle(m_fRotationDest);
|
||||||
float timeUntilStateChange = (m_nPedStateTimer - CTimer::GetTimeInMilliseconds())/600.0f;
|
float timeUntilStateChange = (m_nPedStateTimer - CTimer::GetTimeInMilliseconds())/600.0f;
|
||||||
|
|
||||||
m_vecOffsetSeek.z = 0.0f;
|
|
||||||
if (timeUntilStateChange <= 0.0f) {
|
if (timeUntilStateChange <= 0.0f) {
|
||||||
m_vecOffsetSeek.x = 0.0f;
|
m_vecOffsetSeek.x = 0.0f;
|
||||||
m_vecOffsetSeek.y = 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) {
|
if (PI + m_fRotationCur < limitedDest) {
|
||||||
limitedDest -= 2 * PI;
|
limitedDest -= 2 * PI;
|
||||||
@ -4827,10 +4827,6 @@ CPed::StartFightAttack(uint8 buttonPressure)
|
|||||||
animAssoc->SetFinishCallback(FinishFightMoveCB, this);
|
animAssoc->SetFinishCallback(FinishFightMoveCB, this);
|
||||||
m_fightState = FIGHTSTATE_NO_MOVE;
|
m_fightState = FIGHTSTATE_NO_MOVE;
|
||||||
m_takeAStepAfterAttack = false;
|
m_takeAStepAfterAttack = false;
|
||||||
#ifdef TOGGLEABLE_BETA_FEATURES
|
|
||||||
m_takeAStepAfterAttack = IsPlayer() && bUnusedFightThingOnPlayer;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
bIsAttacking = true;
|
bIsAttacking = true;
|
||||||
|
|
||||||
if (IsPlayer())
|
if (IsPlayer())
|
||||||
|
@ -824,7 +824,6 @@ public:
|
|||||||
static CPedAudioData (&CommentWaitTime)[38];
|
static CPedAudioData (&CommentWaitTime)[38];
|
||||||
|
|
||||||
#ifdef TOGGLEABLE_BETA_FEATURES
|
#ifdef TOGGLEABLE_BETA_FEATURES
|
||||||
static bool bUnusedFightThingOnPlayer;
|
|
||||||
static bool bPopHeadsOnHeadshot;
|
static bool bPopHeadsOnHeadshot;
|
||||||
static bool bMakePedsRunToPhonesToReportCrimes;
|
static bool bMakePedsRunToPhonesToReportCrimes;
|
||||||
#endif
|
#endif
|
||||||
|
@ -413,7 +413,7 @@ CRenderer::SetupEntityVisibility(CEntity *ent)
|
|||||||
// Make sure our atomic uses the right geometry and not
|
// Make sure our atomic uses the right geometry and not
|
||||||
// that of an atomic for another draw distance.
|
// that of an atomic for another draw distance.
|
||||||
if(RpAtomicGetGeometry(a) != RpAtomicGetGeometry(rwobj))
|
if(RpAtomicGetGeometry(a) != RpAtomicGetGeometry(rwobj))
|
||||||
RpAtomicSetGeometry(rwobj, RpAtomicGetGeometry(a), 0);
|
RpAtomicSetGeometry(rwobj, RpAtomicGetGeometry(a), rpATOMICSAMEBOUNDINGSPHERE); // originally 5 (mistake?)
|
||||||
mi->IncreaseAlpha();
|
mi->IncreaseAlpha();
|
||||||
if(ent->m_rwObject == nil || !ent->bIsVisible)
|
if(ent->m_rwObject == nil || !ent->bIsVisible)
|
||||||
return VIS_INVISIBLE;
|
return VIS_INVISIBLE;
|
||||||
@ -463,7 +463,7 @@ CRenderer::SetupEntityVisibility(CEntity *ent)
|
|||||||
assert(ent->m_rwObject);
|
assert(ent->m_rwObject);
|
||||||
RpAtomic *rwobj = (RpAtomic*)ent->m_rwObject;
|
RpAtomic *rwobj = (RpAtomic*)ent->m_rwObject;
|
||||||
if(RpAtomicGetGeometry(a) != RpAtomicGetGeometry(rwobj))
|
if(RpAtomicGetGeometry(a) != RpAtomicGetGeometry(rwobj))
|
||||||
RpAtomicSetGeometry(rwobj, RpAtomicGetGeometry(a), 0);
|
RpAtomicSetGeometry(rwobj, RpAtomicGetGeometry(a), rpATOMICSAMEBOUNDINGSPHERE); // originally 5 (mistake?)
|
||||||
mi->IncreaseAlpha();
|
mi->IncreaseAlpha();
|
||||||
if(ent->m_rwObject == nil || !ent->bIsVisible)
|
if(ent->m_rwObject == nil || !ent->bIsVisible)
|
||||||
return VIS_INVISIBLE;
|
return VIS_INVISIBLE;
|
||||||
@ -528,7 +528,7 @@ CRenderer::SetupBigBuildingVisibility(CEntity *ent)
|
|||||||
// Make sure our atomic uses the right geometry and not
|
// Make sure our atomic uses the right geometry and not
|
||||||
// that of an atomic for another draw distance.
|
// that of an atomic for another draw distance.
|
||||||
if(RpAtomicGetGeometry(a) != RpAtomicGetGeometry(rwobj))
|
if(RpAtomicGetGeometry(a) != RpAtomicGetGeometry(rwobj))
|
||||||
RpAtomicSetGeometry(rwobj, RpAtomicGetGeometry(a), 0);
|
RpAtomicSetGeometry(rwobj, RpAtomicGetGeometry(a), rpATOMICSAMEBOUNDINGSPHERE); // originally 5 (mistake?)
|
||||||
if(!ent->IsVisibleComplex())
|
if(!ent->IsVisibleComplex())
|
||||||
return 0;
|
return 0;
|
||||||
if(mi->m_drawLast){
|
if(mi->m_drawLast){
|
||||||
@ -558,7 +558,7 @@ CRenderer::SetupBigBuildingVisibility(CEntity *ent)
|
|||||||
assert(ent->m_rwObject);
|
assert(ent->m_rwObject);
|
||||||
RpAtomic *rwobj = (RpAtomic*)ent->m_rwObject;
|
RpAtomic *rwobj = (RpAtomic*)ent->m_rwObject;
|
||||||
if(RpAtomicGetGeometry(a) != RpAtomicGetGeometry(rwobj))
|
if(RpAtomicGetGeometry(a) != RpAtomicGetGeometry(rwobj))
|
||||||
RpAtomicSetGeometry(rwobj, RpAtomicGetGeometry(a), 0);
|
RpAtomicSetGeometry(rwobj, RpAtomicGetGeometry(a), rpATOMICSAMEBOUNDINGSPHERE); // originally 5 (mistake?)
|
||||||
if(ent->IsVisibleComplex())
|
if(ent->IsVisibleComplex())
|
||||||
CVisibilityPlugins::InsertEntityIntoSortedList(ent, dist);
|
CVisibilityPlugins::InsertEntityIntoSortedList(ent, dist);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -248,7 +248,7 @@ CVisibilityPlugins::RenderFadingAtomic(RpAtomic *atomic, float camdist)
|
|||||||
RpGeometrySetFlags(geo, flags | rpGEOMETRYMODULATEMATERIALCOLOR);
|
RpGeometrySetFlags(geo, flags | rpGEOMETRYMODULATEMATERIALCOLOR);
|
||||||
RpGeometryForAllMaterials(geo, SetAlphaCB, (void*)alpha);
|
RpGeometryForAllMaterials(geo, SetAlphaCB, (void*)alpha);
|
||||||
if(geo != RpAtomicGetGeometry(atomic))
|
if(geo != RpAtomicGetGeometry(atomic))
|
||||||
RpAtomicSetGeometry(atomic, geo, 0);
|
RpAtomicSetGeometry(atomic, geo, rpATOMICSAMEBOUNDINGSPHERE); // originally 5 (mistake?)
|
||||||
AtomicDefaultRenderCallBack(atomic);
|
AtomicDefaultRenderCallBack(atomic);
|
||||||
RpGeometryForAllMaterials(geo, SetAlphaCB, (void*)255);
|
RpGeometryForAllMaterials(geo, SetAlphaCB, (void*)255);
|
||||||
RpGeometrySetFlags(geo, flags);
|
RpGeometrySetFlags(geo, flags);
|
||||||
|
Loading…
Reference in New Issue
Block a user